mirror of
https://github.com/thousandeyes/thousandeyes-sdk-python.git
synced 2026-08-04 00:46:52 +00:00
[GitHub Bot] Generated python SDK
This commit is contained in:
parent
75929e93d0
commit
eb794622f4
@ -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.96
|
||||
- API version: 7.0.97
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
@ -2,15 +2,36 @@
|
||||
|
||||
import json
|
||||
import unittest
|
||||
from typing import Any
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
def _project_onto_constructed(expected: Any, constructed: Any) -> Any:
|
||||
"""Keep only example fields that appear in the constructed model output."""
|
||||
if isinstance(constructed, dict):
|
||||
if not isinstance(expected, dict):
|
||||
return expected
|
||||
return {
|
||||
key: _project_onto_constructed(expected.get(key), value)
|
||||
for key, value in constructed.items()
|
||||
}
|
||||
if isinstance(constructed, list):
|
||||
if not isinstance(expected, list):
|
||||
return expected
|
||||
return [
|
||||
_project_onto_constructed(expected[index], value)
|
||||
for index, value in enumerate(constructed)
|
||||
]
|
||||
return expected
|
||||
|
||||
|
||||
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)
|
||||
projected_loaded_json = _project_onto_constructed(loaded_json, constructed_json)
|
||||
sorted_loaded_json = json.dumps(projected_loaded_json, sort_keys=True)
|
||||
sorted_constructed_json = json.dumps(constructed_json, sort_keys=True)
|
||||
test_case.assertEqual(sorted_loaded_json, sorted_constructed_json)
|
||||
|
||||
@ -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.96
|
||||
- API version: 7.0.97
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
@ -2,15 +2,36 @@
|
||||
|
||||
import json
|
||||
import unittest
|
||||
from typing import Any
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
def _project_onto_constructed(expected: Any, constructed: Any) -> Any:
|
||||
"""Keep only example fields that appear in the constructed model output."""
|
||||
if isinstance(constructed, dict):
|
||||
if not isinstance(expected, dict):
|
||||
return expected
|
||||
return {
|
||||
key: _project_onto_constructed(expected.get(key), value)
|
||||
for key, value in constructed.items()
|
||||
}
|
||||
if isinstance(constructed, list):
|
||||
if not isinstance(expected, list):
|
||||
return expected
|
||||
return [
|
||||
_project_onto_constructed(expected[index], value)
|
||||
for index, value in enumerate(constructed)
|
||||
]
|
||||
return expected
|
||||
|
||||
|
||||
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)
|
||||
projected_loaded_json = _project_onto_constructed(loaded_json, constructed_json)
|
||||
sorted_loaded_json = json.dumps(projected_loaded_json, sort_keys=True)
|
||||
sorted_constructed_json = json.dumps(constructed_json, sort_keys=True)
|
||||
test_case.assertEqual(sorted_loaded_json, sorted_constructed_json)
|
||||
|
||||
@ -134,7 +134,13 @@ src/thousandeyes_sdk/alerts/models/validation_error_item.py
|
||||
src/thousandeyes_sdk/alerts/models/webhook_integration_type.py
|
||||
src/thousandeyes_sdk/alerts/py.typed
|
||||
test/__init__.py
|
||||
test/conftest.py
|
||||
test/integration_test_utils.py
|
||||
test/mock_manifest.py
|
||||
test/test_alert_rules_api.py
|
||||
test/test_alert_rules_api_integration.py
|
||||
test/test_alert_suppression_windows_api.py
|
||||
test/test_alert_suppression_windows_api_integration.py
|
||||
test/test_alerts_api.py
|
||||
test/test_alerts_api_integration.py
|
||||
test/test_utils.py
|
||||
|
||||
@ -14,7 +14,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.96
|
||||
- API version: 7.0.97
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
@ -87,7 +87,7 @@ configuration = thousandeyes_sdk.core.Configuration(
|
||||
with thousandeyes_sdk.core.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = thousandeyes_sdk.alerts.AlertRulesApi(api_client)
|
||||
rule_detail_update = thousandeyes_sdk.alerts.RuleDetailUpdate() # RuleDetailUpdate |
|
||||
rule_detail_update = # RuleDetailUpdate |
|
||||
aid = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)
|
||||
|
||||
try:
|
||||
|
||||
@ -49,7 +49,7 @@ configuration = thousandeyes_sdk.core.Configuration(
|
||||
with thousandeyes_sdk.core.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = thousandeyes_sdk.alerts.AlertRulesApi(api_client)
|
||||
rule_detail_update = thousandeyes_sdk.alerts.RuleDetailUpdate() # RuleDetailUpdate |
|
||||
rule_detail_update = # RuleDetailUpdate |
|
||||
aid = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)
|
||||
|
||||
try:
|
||||
@ -388,7 +388,7 @@ with thousandeyes_sdk.core.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = thousandeyes_sdk.alerts.AlertRulesApi(api_client)
|
||||
rule_id = '127094' # str | Unique alert rule ID.
|
||||
rule_detail_update = thousandeyes_sdk.alerts.RuleDetailUpdate() # RuleDetailUpdate |
|
||||
rule_detail_update = # RuleDetailUpdate |
|
||||
aid = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)
|
||||
|
||||
try:
|
||||
|
||||
@ -50,9 +50,9 @@ configuration = thousandeyes_sdk.core.Configuration(
|
||||
with thousandeyes_sdk.core.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = thousandeyes_sdk.alerts.AlertSuppressionWindowsApi(api_client)
|
||||
alert_suppression_window_request = thousandeyes_sdk.alerts.AlertSuppressionWindowRequest() # AlertSuppressionWindowRequest |
|
||||
alert_suppression_window_request = # AlertSuppressionWindowRequest |
|
||||
aid = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)
|
||||
expand = [thousandeyes_sdk.alerts.ExpandAlertTestOptions()] # List[ExpandAlertTestOptions] | Optional parameter on whether or not to expand alert related resources. Without this parameter, there's no default expansion. For example, to expand the \"tests\" resource, use the `?expand=test` query. (optional)
|
||||
expand = # List[ExpandAlertTestOptions] | Optional parameter on whether or not to expand alert related resources. Without this parameter, there's no default expansion. For example, to expand the \"tests\" resource, use the `?expand=test` query. (optional)
|
||||
|
||||
try:
|
||||
# Create alert suppression window
|
||||
@ -224,7 +224,7 @@ with thousandeyes_sdk.core.ApiClient(configuration) as api_client:
|
||||
api_instance = thousandeyes_sdk.alerts.AlertSuppressionWindowsApi(api_client)
|
||||
window_id = '2411' # str | Unique window ID.
|
||||
aid = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)
|
||||
expand = [thousandeyes_sdk.alerts.ExpandAlertTestOptions()] # List[ExpandAlertTestOptions] | Optional parameter on whether or not to expand alert related resources. Without this parameter, there's no default expansion. For example, to expand the \"tests\" resource, use the `?expand=test` query. (optional)
|
||||
expand = # List[ExpandAlertTestOptions] | Optional parameter on whether or not to expand alert related resources. Without this parameter, there's no default expansion. For example, to expand the \"tests\" resource, use the `?expand=test` query. (optional)
|
||||
|
||||
try:
|
||||
# Retrieve alert suppression window
|
||||
@ -395,9 +395,9 @@ with thousandeyes_sdk.core.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = thousandeyes_sdk.alerts.AlertSuppressionWindowsApi(api_client)
|
||||
window_id = '2411' # str | Unique window ID.
|
||||
alert_suppression_window_request = thousandeyes_sdk.alerts.AlertSuppressionWindowRequest() # AlertSuppressionWindowRequest |
|
||||
alert_suppression_window_request = # AlertSuppressionWindowRequest |
|
||||
aid = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)
|
||||
expand = [thousandeyes_sdk.alerts.ExpandAlertTestOptions()] # List[ExpandAlertTestOptions] | Optional parameter on whether or not to expand alert related resources. Without this parameter, there's no default expansion. For example, to expand the \"tests\" resource, use the `?expand=test` query. (optional)
|
||||
expand = # List[ExpandAlertTestOptions] | Optional parameter on whether or not to expand alert related resources. Without this parameter, there's no default expansion. For example, to expand the \"tests\" resource, use the `?expand=test` query. (optional)
|
||||
|
||||
try:
|
||||
# Update alert suppression window
|
||||
|
||||
@ -136,7 +136,7 @@ with thousandeyes_sdk.core.ApiClient(configuration) as api_client:
|
||||
end_date = '2022-07-18T22:00:54Z' # datetime | Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. (optional)
|
||||
max = 5 # int | (Optional) Maximum number of objects to return. (optional)
|
||||
cursor = 'cursor_example' # str | (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. (optional)
|
||||
state = thousandeyes_sdk.alerts.State() # State | Optional parameter to match a specific alert state. If not specified, it defaults to `trigger`. (optional)
|
||||
state = # State | Optional parameter to match a specific alert state. If not specified, it defaults to `trigger`. (optional)
|
||||
|
||||
try:
|
||||
# List alerts
|
||||
|
||||
7
thousandeyes-sdk-alerts/test/conftest.py
Normal file
7
thousandeyes-sdk-alerts/test/conftest.py
Normal file
@ -0,0 +1,7 @@
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
_repo_root = Path(__file__).resolve().parents[2]
|
||||
_core_test_support = _repo_root / "thousandeyes-sdk-core" / "test"
|
||||
if str(_core_test_support) not in sys.path:
|
||||
sys.path.insert(0, str(_core_test_support))
|
||||
37
thousandeyes-sdk-alerts/test/integration_test_utils.py
Normal file
37
thousandeyes-sdk-alerts/test/integration_test_utils.py
Normal file
@ -0,0 +1,37 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Alerts API
|
||||
|
||||
**Note:** API operations for the creation or retrieval of API, Page Load, or Web-Transaction alert rules are not available for ThousandEyes for Government instance. You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts).
|
||||
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
import unittest
|
||||
|
||||
from thousandeyes_sdk.core.api_client import ApiClient
|
||||
from thousandeyes_sdk.core.configuration import Configuration
|
||||
from sdk_test_support.mock_server import ERROR_STATUS_HEADER, OPERATION_ID_HEADER, MockApiServer
|
||||
|
||||
from .mock_manifest import OPERATION_MANIFEST
|
||||
|
||||
|
||||
class IntegrationTestBase(unittest.TestCase):
|
||||
def setUp(self) -> None:
|
||||
self.server = MockApiServer(OPERATION_MANIFEST)
|
||||
self.server.start()
|
||||
configuration = Configuration(host=self.server.base_url, access_token="test-token")
|
||||
self.api_client = ApiClient(configuration=configuration)
|
||||
|
||||
def tearDown(self) -> None:
|
||||
self.server.stop()
|
||||
|
||||
def te_headers(self, operation_id: str, error_status=None):
|
||||
headers = {OPERATION_ID_HEADER: operation_id}
|
||||
if error_status is not None:
|
||||
headers[ERROR_STATUS_HEADER] = error_status
|
||||
return headers
|
||||
2247
thousandeyes-sdk-alerts/test/mock_manifest.py
Normal file
2247
thousandeyes-sdk-alerts/test/mock_manifest.py
Normal file
File diff suppressed because it is too large
Load Diff
2130
thousandeyes-sdk-alerts/test/test_alert_rules_api_integration.py
Normal file
2130
thousandeyes-sdk-alerts/test/test_alert_rules_api_integration.py
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
680
thousandeyes-sdk-alerts/test/test_alerts_api_integration.py
Normal file
680
thousandeyes-sdk-alerts/test/test_alerts_api_integration.py
Normal file
@ -0,0 +1,680 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Alerts API
|
||||
|
||||
**Note:** API operations for the creation or retrieval of API, Page Load, or Web-Transaction alert rules are not available for ThousandEyes for Government instance. You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts).
|
||||
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
import json
|
||||
import unittest
|
||||
import thousandeyes_sdk.alerts.models
|
||||
|
||||
from thousandeyes_sdk.core.exceptions import ApiException
|
||||
from thousandeyes_sdk.alerts.api.alerts_api import AlertsApi
|
||||
from .integration_test_utils import IntegrationTestBase
|
||||
from .test_utils import assert_constructed_model_matches_example_json
|
||||
|
||||
|
||||
class TestAlertsApiIntegration(IntegrationTestBase):
|
||||
"""AlertsApi integration test stubs"""
|
||||
|
||||
def setUp(self) -> None:
|
||||
super().setUp()
|
||||
self.api = AlertsApi(self.api_client)
|
||||
|
||||
|
||||
def test_get_alert_happy_path(self) -> None:
|
||||
"""Integration test for get_alert success path"""
|
||||
alert_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569'
|
||||
aid = '1234'
|
||||
response_body_json = """
|
||||
{
|
||||
"severity" : "major",
|
||||
"alertType" : "http-server",
|
||||
"endDate" : "2022-07-18T22:00:54Z",
|
||||
"_links" : {
|
||||
"appLink" : {
|
||||
"hreflang" : "hreflang",
|
||||
"templated" : true,
|
||||
"profile" : "profile",
|
||||
"name" : "name",
|
||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||||
"type" : "type",
|
||||
"deprecation" : "deprecation",
|
||||
"title" : "title"
|
||||
},
|
||||
"test" : {
|
||||
"hreflang" : "hreflang",
|
||||
"templated" : true,
|
||||
"profile" : "profile",
|
||||
"name" : "name",
|
||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||||
"type" : "type",
|
||||
"deprecation" : "deprecation",
|
||||
"title" : "title"
|
||||
},
|
||||
"rule" : {
|
||||
"hreflang" : "hreflang",
|
||||
"templated" : true,
|
||||
"profile" : "profile",
|
||||
"name" : "name",
|
||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||||
"type" : "type",
|
||||
"deprecation" : "deprecation",
|
||||
"title" : "title"
|
||||
},
|
||||
"self" : {
|
||||
"hreflang" : "hreflang",
|
||||
"templated" : true,
|
||||
"profile" : "profile",
|
||||
"name" : "name",
|
||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||||
"type" : "type",
|
||||
"deprecation" : "deprecation",
|
||||
"title" : "title"
|
||||
}
|
||||
},
|
||||
"alertSeverity" : "major",
|
||||
"duration" : 60,
|
||||
"violationCount" : 2,
|
||||
"_embedded" : {
|
||||
"asn" : {
|
||||
"name" : "Cisco Webex LLC",
|
||||
"id" : "13445",
|
||||
"type" : "asn"
|
||||
}
|
||||
},
|
||||
"meta" : {
|
||||
"version" : 1
|
||||
},
|
||||
"details" : [ {
|
||||
"name" : "Bucharest, Romania",
|
||||
"start" : {
|
||||
"metrics" : "metrics"
|
||||
},
|
||||
"end" : {
|
||||
"metrics" : "metrics"
|
||||
},
|
||||
"id" : "3379",
|
||||
"state" : "trigger",
|
||||
"type" : "cea_agent"
|
||||
}, {
|
||||
"name" : "Bucharest, Romania",
|
||||
"start" : {
|
||||
"metrics" : "metrics"
|
||||
},
|
||||
"end" : {
|
||||
"metrics" : "metrics"
|
||||
},
|
||||
"id" : "3379",
|
||||
"state" : "trigger",
|
||||
"type" : "cea_agent"
|
||||
} ],
|
||||
"id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569",
|
||||
"suppressed" : false,
|
||||
"state" : "trigger",
|
||||
"alertState" : "trigger",
|
||||
"startDate" : "2022-07-17T22:00:54Z"
|
||||
}
|
||||
"""
|
||||
expected_response = json.loads(response_body_json)
|
||||
response = self.api.get_alert(
|
||||
|
||||
alert_id=alert_id,
|
||||
|
||||
aid=aid,
|
||||
|
||||
_headers=self.te_headers("get_alert"),
|
||||
)
|
||||
assert_constructed_model_matches_example_json(response, expected_response)
|
||||
|
||||
|
||||
def test_get_alert_error_401(self) -> None:
|
||||
"""Integration test for get_alert error path (HTTP 401)"""
|
||||
alert_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569'
|
||||
aid = '1234'
|
||||
error_body_json = """
|
||||
{
|
||||
"error_description" : "Invalid access token",
|
||||
"error" : "invalid_token"
|
||||
}
|
||||
"""
|
||||
expected_error = json.loads(error_body_json)
|
||||
with self.assertRaises(
|
||||
ApiException.exception_class_for_http_status(401)
|
||||
) as context:
|
||||
self.api.get_alert(
|
||||
|
||||
alert_id=alert_id,
|
||||
|
||||
aid=aid,
|
||||
|
||||
_headers=self.te_headers("get_alert", error_status="401"),
|
||||
)
|
||||
assert_constructed_model_matches_example_json(context.exception.data, expected_error)
|
||||
|
||||
|
||||
def test_get_alert_error_403(self) -> None:
|
||||
"""Integration test for get_alert error path (HTTP 403)"""
|
||||
alert_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569'
|
||||
aid = '1234'
|
||||
error_body_json = """
|
||||
{
|
||||
"instance" : "instance",
|
||||
"detail" : "detail",
|
||||
"type" : "type",
|
||||
"title" : "title",
|
||||
"status" : 0
|
||||
}
|
||||
"""
|
||||
expected_error = json.loads(error_body_json)
|
||||
with self.assertRaises(
|
||||
ApiException.exception_class_for_http_status(403)
|
||||
) as context:
|
||||
self.api.get_alert(
|
||||
|
||||
alert_id=alert_id,
|
||||
|
||||
aid=aid,
|
||||
|
||||
_headers=self.te_headers("get_alert", error_status="403"),
|
||||
)
|
||||
assert_constructed_model_matches_example_json(context.exception.data, expected_error)
|
||||
|
||||
|
||||
def test_get_alert_error_404(self) -> None:
|
||||
"""Integration test for get_alert error path (HTTP 404)"""
|
||||
alert_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569'
|
||||
aid = '1234'
|
||||
error_body_json = """
|
||||
{
|
||||
"instance" : "instance",
|
||||
"detail" : "detail",
|
||||
"type" : "type",
|
||||
"title" : "title",
|
||||
"status" : 0
|
||||
}
|
||||
"""
|
||||
expected_error = json.loads(error_body_json)
|
||||
with self.assertRaises(
|
||||
ApiException.exception_class_for_http_status(404)
|
||||
) as context:
|
||||
self.api.get_alert(
|
||||
|
||||
alert_id=alert_id,
|
||||
|
||||
aid=aid,
|
||||
|
||||
_headers=self.te_headers("get_alert", error_status="404"),
|
||||
)
|
||||
assert_constructed_model_matches_example_json(context.exception.data, expected_error)
|
||||
|
||||
|
||||
def test_get_alert_error_429(self) -> None:
|
||||
"""Integration test for get_alert error path (HTTP 429)"""
|
||||
alert_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569'
|
||||
aid = '1234'
|
||||
error_body_json = """
|
||||
{
|
||||
"instance" : "instance",
|
||||
"detail" : "detail",
|
||||
"type" : "type",
|
||||
"title" : "title",
|
||||
"status" : 0
|
||||
}
|
||||
"""
|
||||
expected_error = json.loads(error_body_json)
|
||||
with self.assertRaises(
|
||||
ApiException.exception_class_for_http_status(429)
|
||||
) as context:
|
||||
self.api.get_alert(
|
||||
|
||||
alert_id=alert_id,
|
||||
|
||||
aid=aid,
|
||||
|
||||
_headers=self.te_headers("get_alert", error_status="429"),
|
||||
)
|
||||
assert_constructed_model_matches_example_json(context.exception.data, expected_error)
|
||||
|
||||
|
||||
def test_get_alert_error_500(self) -> None:
|
||||
"""Integration test for get_alert error path (HTTP 500)"""
|
||||
alert_id = 'e9c3bf02-a48c-4aa8-9e5f-898800d6f569'
|
||||
aid = '1234'
|
||||
error_body_json = """
|
||||
{
|
||||
"instance" : "instance",
|
||||
"detail" : "detail",
|
||||
"type" : "type",
|
||||
"title" : "title",
|
||||
"status" : 0
|
||||
}
|
||||
"""
|
||||
expected_error = json.loads(error_body_json)
|
||||
with self.assertRaises(
|
||||
ApiException.exception_class_for_http_status(500)
|
||||
) as context:
|
||||
self.api.get_alert(
|
||||
|
||||
alert_id=alert_id,
|
||||
|
||||
aid=aid,
|
||||
|
||||
_headers=self.te_headers("get_alert", error_status="500"),
|
||||
)
|
||||
assert_constructed_model_matches_example_json(context.exception.data, expected_error)
|
||||
|
||||
|
||||
|
||||
|
||||
def test_get_alerts_happy_path(self) -> None:
|
||||
"""Integration test for get_alerts success path"""
|
||||
aid = '1234'
|
||||
window = '12h'
|
||||
start_date = '2022-07-17T22:00:54Z'
|
||||
end_date = '2022-07-18T22:00:54Z'
|
||||
max = 5
|
||||
cursor = 'cursor_example'
|
||||
response_body_json = """
|
||||
{
|
||||
"alerts" : [ {
|
||||
"severity" : "MAJOR",
|
||||
"alertType" : "http-server",
|
||||
"endDate" : "2022-07-18T22:00:54Z",
|
||||
"_links" : {
|
||||
"appLink" : {
|
||||
"hreflang" : "hreflang",
|
||||
"templated" : true,
|
||||
"profile" : "profile",
|
||||
"name" : "name",
|
||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||||
"type" : "type",
|
||||
"deprecation" : "deprecation",
|
||||
"title" : "title"
|
||||
},
|
||||
"test" : {
|
||||
"hreflang" : "hreflang",
|
||||
"templated" : true,
|
||||
"profile" : "profile",
|
||||
"name" : "name",
|
||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||||
"type" : "type",
|
||||
"deprecation" : "deprecation",
|
||||
"title" : "title"
|
||||
},
|
||||
"rule" : {
|
||||
"hreflang" : "hreflang",
|
||||
"templated" : true,
|
||||
"profile" : "profile",
|
||||
"name" : "name",
|
||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||||
"type" : "type",
|
||||
"deprecation" : "deprecation",
|
||||
"title" : "title"
|
||||
},
|
||||
"self" : {
|
||||
"hreflang" : "hreflang",
|
||||
"templated" : true,
|
||||
"profile" : "profile",
|
||||
"name" : "name",
|
||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||||
"type" : "type",
|
||||
"deprecation" : "deprecation",
|
||||
"title" : "title"
|
||||
}
|
||||
},
|
||||
"apiLinks" : [ {
|
||||
"key" : ""
|
||||
}, {
|
||||
"key" : ""
|
||||
} ],
|
||||
"alertSeverity" : "major",
|
||||
"dateEnd" : "2020-04-23 13:43:16",
|
||||
"duration" : 60,
|
||||
"violationCount" : 2,
|
||||
"dateStart" : "2020-04-23 13:43:16",
|
||||
"meta" : {
|
||||
"version" : 1
|
||||
},
|
||||
"id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569",
|
||||
"suppressed" : false,
|
||||
"alertId" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569",
|
||||
"state" : "ACTIVE",
|
||||
"ruleId" : 127094,
|
||||
"permalink" : "https://app.thousandeyes.com/alerts/list?__a=75&alertId=2783&agentId=12",
|
||||
"alertState" : "trigger",
|
||||
"startDate" : "2022-07-17T22:00:54Z",
|
||||
"alertRuleId" : "127094"
|
||||
}, {
|
||||
"severity" : "MAJOR",
|
||||
"alertType" : "http-server",
|
||||
"endDate" : "2022-07-18T22:00:54Z",
|
||||
"_links" : {
|
||||
"appLink" : {
|
||||
"hreflang" : "hreflang",
|
||||
"templated" : true,
|
||||
"profile" : "profile",
|
||||
"name" : "name",
|
||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||||
"type" : "type",
|
||||
"deprecation" : "deprecation",
|
||||
"title" : "title"
|
||||
},
|
||||
"test" : {
|
||||
"hreflang" : "hreflang",
|
||||
"templated" : true,
|
||||
"profile" : "profile",
|
||||
"name" : "name",
|
||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||||
"type" : "type",
|
||||
"deprecation" : "deprecation",
|
||||
"title" : "title"
|
||||
},
|
||||
"rule" : {
|
||||
"hreflang" : "hreflang",
|
||||
"templated" : true,
|
||||
"profile" : "profile",
|
||||
"name" : "name",
|
||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||||
"type" : "type",
|
||||
"deprecation" : "deprecation",
|
||||
"title" : "title"
|
||||
},
|
||||
"self" : {
|
||||
"hreflang" : "hreflang",
|
||||
"templated" : true,
|
||||
"profile" : "profile",
|
||||
"name" : "name",
|
||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||||
"type" : "type",
|
||||
"deprecation" : "deprecation",
|
||||
"title" : "title"
|
||||
}
|
||||
},
|
||||
"apiLinks" : [ {
|
||||
"key" : ""
|
||||
}, {
|
||||
"key" : ""
|
||||
} ],
|
||||
"alertSeverity" : "major",
|
||||
"dateEnd" : "2020-04-23 13:43:16",
|
||||
"duration" : 60,
|
||||
"violationCount" : 2,
|
||||
"dateStart" : "2020-04-23 13:43:16",
|
||||
"meta" : {
|
||||
"version" : 1
|
||||
},
|
||||
"id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569",
|
||||
"suppressed" : false,
|
||||
"alertId" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569",
|
||||
"state" : "ACTIVE",
|
||||
"ruleId" : 127094,
|
||||
"permalink" : "https://app.thousandeyes.com/alerts/list?__a=75&alertId=2783&agentId=12",
|
||||
"alertState" : "trigger",
|
||||
"startDate" : "2022-07-17T22:00:54Z",
|
||||
"alertRuleId" : "127094"
|
||||
} ],
|
||||
"_links" : {
|
||||
"next" : {
|
||||
"hreflang" : "hreflang",
|
||||
"templated" : true,
|
||||
"profile" : "profile",
|
||||
"name" : "name",
|
||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||||
"type" : "type",
|
||||
"deprecation" : "deprecation",
|
||||
"title" : "title"
|
||||
},
|
||||
"previous" : {
|
||||
"hreflang" : "hreflang",
|
||||
"templated" : true,
|
||||
"profile" : "profile",
|
||||
"name" : "name",
|
||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||||
"type" : "type",
|
||||
"deprecation" : "deprecation",
|
||||
"title" : "title"
|
||||
},
|
||||
"self" : {
|
||||
"hreflang" : "hreflang",
|
||||
"templated" : true,
|
||||
"profile" : "profile",
|
||||
"name" : "name",
|
||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||||
"type" : "type",
|
||||
"deprecation" : "deprecation",
|
||||
"title" : "title"
|
||||
}
|
||||
}
|
||||
}
|
||||
"""
|
||||
expected_response = json.loads(response_body_json)
|
||||
response = self.api.get_alerts(
|
||||
|
||||
aid=aid,
|
||||
|
||||
window=window,
|
||||
|
||||
start_date=start_date,
|
||||
|
||||
end_date=end_date,
|
||||
|
||||
max=max,
|
||||
|
||||
cursor=cursor,
|
||||
|
||||
_headers=self.te_headers("get_alerts"),
|
||||
)
|
||||
assert_constructed_model_matches_example_json(response, expected_response)
|
||||
|
||||
|
||||
def test_get_alerts_error_401(self) -> None:
|
||||
"""Integration test for get_alerts error path (HTTP 401)"""
|
||||
aid = '1234'
|
||||
window = '12h'
|
||||
start_date = '2022-07-17T22:00:54Z'
|
||||
end_date = '2022-07-18T22:00:54Z'
|
||||
max = 5
|
||||
cursor = 'cursor_example'
|
||||
error_body_json = """
|
||||
{
|
||||
"error_description" : "Invalid access token",
|
||||
"error" : "invalid_token"
|
||||
}
|
||||
"""
|
||||
expected_error = json.loads(error_body_json)
|
||||
with self.assertRaises(
|
||||
ApiException.exception_class_for_http_status(401)
|
||||
) as context:
|
||||
self.api.get_alerts(
|
||||
|
||||
aid=aid,
|
||||
|
||||
window=window,
|
||||
|
||||
start_date=start_date,
|
||||
|
||||
end_date=end_date,
|
||||
|
||||
max=max,
|
||||
|
||||
cursor=cursor,
|
||||
|
||||
_headers=self.te_headers("get_alerts", error_status="401"),
|
||||
)
|
||||
assert_constructed_model_matches_example_json(context.exception.data, expected_error)
|
||||
|
||||
|
||||
def test_get_alerts_error_403(self) -> None:
|
||||
"""Integration test for get_alerts error path (HTTP 403)"""
|
||||
aid = '1234'
|
||||
window = '12h'
|
||||
start_date = '2022-07-17T22:00:54Z'
|
||||
end_date = '2022-07-18T22:00:54Z'
|
||||
max = 5
|
||||
cursor = 'cursor_example'
|
||||
error_body_json = """
|
||||
{
|
||||
"instance" : "instance",
|
||||
"detail" : "detail",
|
||||
"type" : "type",
|
||||
"title" : "title",
|
||||
"status" : 0
|
||||
}
|
||||
"""
|
||||
expected_error = json.loads(error_body_json)
|
||||
with self.assertRaises(
|
||||
ApiException.exception_class_for_http_status(403)
|
||||
) as context:
|
||||
self.api.get_alerts(
|
||||
|
||||
aid=aid,
|
||||
|
||||
window=window,
|
||||
|
||||
start_date=start_date,
|
||||
|
||||
end_date=end_date,
|
||||
|
||||
max=max,
|
||||
|
||||
cursor=cursor,
|
||||
|
||||
_headers=self.te_headers("get_alerts", error_status="403"),
|
||||
)
|
||||
assert_constructed_model_matches_example_json(context.exception.data, expected_error)
|
||||
|
||||
|
||||
def test_get_alerts_error_404(self) -> None:
|
||||
"""Integration test for get_alerts error path (HTTP 404)"""
|
||||
aid = '1234'
|
||||
window = '12h'
|
||||
start_date = '2022-07-17T22:00:54Z'
|
||||
end_date = '2022-07-18T22:00:54Z'
|
||||
max = 5
|
||||
cursor = 'cursor_example'
|
||||
error_body_json = """
|
||||
{
|
||||
"instance" : "instance",
|
||||
"detail" : "detail",
|
||||
"type" : "type",
|
||||
"title" : "title",
|
||||
"status" : 0
|
||||
}
|
||||
"""
|
||||
expected_error = json.loads(error_body_json)
|
||||
with self.assertRaises(
|
||||
ApiException.exception_class_for_http_status(404)
|
||||
) as context:
|
||||
self.api.get_alerts(
|
||||
|
||||
aid=aid,
|
||||
|
||||
window=window,
|
||||
|
||||
start_date=start_date,
|
||||
|
||||
end_date=end_date,
|
||||
|
||||
max=max,
|
||||
|
||||
cursor=cursor,
|
||||
|
||||
_headers=self.te_headers("get_alerts", error_status="404"),
|
||||
)
|
||||
assert_constructed_model_matches_example_json(context.exception.data, expected_error)
|
||||
|
||||
|
||||
def test_get_alerts_error_429(self) -> None:
|
||||
"""Integration test for get_alerts error path (HTTP 429)"""
|
||||
aid = '1234'
|
||||
window = '12h'
|
||||
start_date = '2022-07-17T22:00:54Z'
|
||||
end_date = '2022-07-18T22:00:54Z'
|
||||
max = 5
|
||||
cursor = 'cursor_example'
|
||||
error_body_json = """
|
||||
{
|
||||
"instance" : "instance",
|
||||
"detail" : "detail",
|
||||
"type" : "type",
|
||||
"title" : "title",
|
||||
"status" : 0
|
||||
}
|
||||
"""
|
||||
expected_error = json.loads(error_body_json)
|
||||
with self.assertRaises(
|
||||
ApiException.exception_class_for_http_status(429)
|
||||
) as context:
|
||||
self.api.get_alerts(
|
||||
|
||||
aid=aid,
|
||||
|
||||
window=window,
|
||||
|
||||
start_date=start_date,
|
||||
|
||||
end_date=end_date,
|
||||
|
||||
max=max,
|
||||
|
||||
cursor=cursor,
|
||||
|
||||
_headers=self.te_headers("get_alerts", error_status="429"),
|
||||
)
|
||||
assert_constructed_model_matches_example_json(context.exception.data, expected_error)
|
||||
|
||||
|
||||
def test_get_alerts_error_500(self) -> None:
|
||||
"""Integration test for get_alerts error path (HTTP 500)"""
|
||||
aid = '1234'
|
||||
window = '12h'
|
||||
start_date = '2022-07-17T22:00:54Z'
|
||||
end_date = '2022-07-18T22:00:54Z'
|
||||
max = 5
|
||||
cursor = 'cursor_example'
|
||||
error_body_json = """
|
||||
{
|
||||
"instance" : "instance",
|
||||
"detail" : "detail",
|
||||
"type" : "type",
|
||||
"title" : "title",
|
||||
"status" : 0
|
||||
}
|
||||
"""
|
||||
expected_error = json.loads(error_body_json)
|
||||
with self.assertRaises(
|
||||
ApiException.exception_class_for_http_status(500)
|
||||
) as context:
|
||||
self.api.get_alerts(
|
||||
|
||||
aid=aid,
|
||||
|
||||
window=window,
|
||||
|
||||
start_date=start_date,
|
||||
|
||||
end_date=end_date,
|
||||
|
||||
max=max,
|
||||
|
||||
cursor=cursor,
|
||||
|
||||
_headers=self.te_headers("get_alerts", error_status="500"),
|
||||
)
|
||||
assert_constructed_model_matches_example_json(context.exception.data, expected_error)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
@ -2,15 +2,36 @@
|
||||
|
||||
import json
|
||||
import unittest
|
||||
from typing import Any
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
def _project_onto_constructed(expected: Any, constructed: Any) -> Any:
|
||||
"""Keep only example fields that appear in the constructed model output."""
|
||||
if isinstance(constructed, dict):
|
||||
if not isinstance(expected, dict):
|
||||
return expected
|
||||
return {
|
||||
key: _project_onto_constructed(expected.get(key), value)
|
||||
for key, value in constructed.items()
|
||||
}
|
||||
if isinstance(constructed, list):
|
||||
if not isinstance(expected, list):
|
||||
return expected
|
||||
return [
|
||||
_project_onto_constructed(expected[index], value)
|
||||
for index, value in enumerate(constructed)
|
||||
]
|
||||
return expected
|
||||
|
||||
|
||||
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)
|
||||
projected_loaded_json = _project_onto_constructed(loaded_json, constructed_json)
|
||||
sorted_loaded_json = json.dumps(projected_loaded_json, sort_keys=True)
|
||||
sorted_constructed_json = json.dumps(constructed_json, sort_keys=True)
|
||||
test_case.assertEqual(sorted_loaded_json, sorted_constructed_json)
|
||||
|
||||
@ -10,7 +10,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.96
|
||||
- API version: 7.0.97
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
@ -2,15 +2,36 @@
|
||||
|
||||
import json
|
||||
import unittest
|
||||
from typing import Any
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
def _project_onto_constructed(expected: Any, constructed: Any) -> Any:
|
||||
"""Keep only example fields that appear in the constructed model output."""
|
||||
if isinstance(constructed, dict):
|
||||
if not isinstance(expected, dict):
|
||||
return expected
|
||||
return {
|
||||
key: _project_onto_constructed(expected.get(key), value)
|
||||
for key, value in constructed.items()
|
||||
}
|
||||
if isinstance(constructed, list):
|
||||
if not isinstance(expected, list):
|
||||
return expected
|
||||
return [
|
||||
_project_onto_constructed(expected[index], value)
|
||||
for index, value in enumerate(constructed)
|
||||
]
|
||||
return expected
|
||||
|
||||
|
||||
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)
|
||||
projected_loaded_json = _project_onto_constructed(loaded_json, constructed_json)
|
||||
sorted_loaded_json = json.dumps(projected_loaded_json, sort_keys=True)
|
||||
sorted_constructed_json = json.dumps(constructed_json, sort_keys=True)
|
||||
test_case.assertEqual(sorted_loaded_json, sorted_constructed_json)
|
||||
|
||||
@ -6,7 +6,7 @@ Manage connectors and operations.
|
||||
|
||||
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||
|
||||
- API version: 7.0.96
|
||||
- API version: 7.0.97
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
@ -2,15 +2,36 @@
|
||||
|
||||
import json
|
||||
import unittest
|
||||
from typing import Any
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
def _project_onto_constructed(expected: Any, constructed: Any) -> Any:
|
||||
"""Keep only example fields that appear in the constructed model output."""
|
||||
if isinstance(constructed, dict):
|
||||
if not isinstance(expected, dict):
|
||||
return expected
|
||||
return {
|
||||
key: _project_onto_constructed(expected.get(key), value)
|
||||
for key, value in constructed.items()
|
||||
}
|
||||
if isinstance(constructed, list):
|
||||
if not isinstance(expected, list):
|
||||
return expected
|
||||
return [
|
||||
_project_onto_constructed(expected[index], value)
|
||||
for index, value in enumerate(constructed)
|
||||
]
|
||||
return expected
|
||||
|
||||
|
||||
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)
|
||||
projected_loaded_json = _project_onto_constructed(loaded_json, constructed_json)
|
||||
sorted_loaded_json = json.dumps(projected_loaded_json, sort_keys=True)
|
||||
sorted_constructed_json = json.dumps(constructed_json, sort_keys=True)
|
||||
test_case.assertEqual(sorted_loaded_json, sorted_constructed_json)
|
||||
|
||||
@ -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.96
|
||||
- API version: 7.0.97
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
@ -2,15 +2,36 @@
|
||||
|
||||
import json
|
||||
import unittest
|
||||
from typing import Any
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
def _project_onto_constructed(expected: Any, constructed: Any) -> Any:
|
||||
"""Keep only example fields that appear in the constructed model output."""
|
||||
if isinstance(constructed, dict):
|
||||
if not isinstance(expected, dict):
|
||||
return expected
|
||||
return {
|
||||
key: _project_onto_constructed(expected.get(key), value)
|
||||
for key, value in constructed.items()
|
||||
}
|
||||
if isinstance(constructed, list):
|
||||
if not isinstance(expected, list):
|
||||
return expected
|
||||
return [
|
||||
_project_onto_constructed(expected[index], value)
|
||||
for index, value in enumerate(constructed)
|
||||
]
|
||||
return expected
|
||||
|
||||
|
||||
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)
|
||||
projected_loaded_json = _project_onto_constructed(loaded_json, constructed_json)
|
||||
sorted_loaded_json = json.dumps(projected_loaded_json, sort_keys=True)
|
||||
sorted_constructed_json = json.dumps(constructed_json, sort_keys=True)
|
||||
test_case.assertEqual(sorted_loaded_json, sorted_constructed_json)
|
||||
|
||||
@ -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.96
|
||||
- API version: 7.0.97
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
@ -2,15 +2,36 @@
|
||||
|
||||
import json
|
||||
import unittest
|
||||
from typing import Any
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
def _project_onto_constructed(expected: Any, constructed: Any) -> Any:
|
||||
"""Keep only example fields that appear in the constructed model output."""
|
||||
if isinstance(constructed, dict):
|
||||
if not isinstance(expected, dict):
|
||||
return expected
|
||||
return {
|
||||
key: _project_onto_constructed(expected.get(key), value)
|
||||
for key, value in constructed.items()
|
||||
}
|
||||
if isinstance(constructed, list):
|
||||
if not isinstance(expected, list):
|
||||
return expected
|
||||
return [
|
||||
_project_onto_constructed(expected[index], value)
|
||||
for index, value in enumerate(constructed)
|
||||
]
|
||||
return expected
|
||||
|
||||
|
||||
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)
|
||||
projected_loaded_json = _project_onto_constructed(loaded_json, constructed_json)
|
||||
sorted_loaded_json = json.dumps(projected_loaded_json, sort_keys=True)
|
||||
sorted_constructed_json = json.dumps(constructed_json, sort_keys=True)
|
||||
test_case.assertEqual(sorted_loaded_json, sorted_constructed_json)
|
||||
|
||||
@ -11,7 +11,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.96
|
||||
- API version: 7.0.97
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
@ -2,15 +2,36 @@
|
||||
|
||||
import json
|
||||
import unittest
|
||||
from typing import Any
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
def _project_onto_constructed(expected: Any, constructed: Any) -> Any:
|
||||
"""Keep only example fields that appear in the constructed model output."""
|
||||
if isinstance(constructed, dict):
|
||||
if not isinstance(expected, dict):
|
||||
return expected
|
||||
return {
|
||||
key: _project_onto_constructed(expected.get(key), value)
|
||||
for key, value in constructed.items()
|
||||
}
|
||||
if isinstance(constructed, list):
|
||||
if not isinstance(expected, list):
|
||||
return expected
|
||||
return [
|
||||
_project_onto_constructed(expected[index], value)
|
||||
for index, value in enumerate(constructed)
|
||||
]
|
||||
return expected
|
||||
|
||||
|
||||
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)
|
||||
projected_loaded_json = _project_onto_constructed(loaded_json, constructed_json)
|
||||
sorted_loaded_json = json.dumps(projected_loaded_json, sort_keys=True)
|
||||
sorted_constructed_json = json.dumps(constructed_json, sort_keys=True)
|
||||
test_case.assertEqual(sorted_loaded_json, sorted_constructed_json)
|
||||
|
||||
@ -7,7 +7,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.96
|
||||
- API version: 7.0.97
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
@ -2,15 +2,36 @@
|
||||
|
||||
import json
|
||||
import unittest
|
||||
from typing import Any
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
def _project_onto_constructed(expected: Any, constructed: Any) -> Any:
|
||||
"""Keep only example fields that appear in the constructed model output."""
|
||||
if isinstance(constructed, dict):
|
||||
if not isinstance(expected, dict):
|
||||
return expected
|
||||
return {
|
||||
key: _project_onto_constructed(expected.get(key), value)
|
||||
for key, value in constructed.items()
|
||||
}
|
||||
if isinstance(constructed, list):
|
||||
if not isinstance(expected, list):
|
||||
return expected
|
||||
return [
|
||||
_project_onto_constructed(expected[index], value)
|
||||
for index, value in enumerate(constructed)
|
||||
]
|
||||
return expected
|
||||
|
||||
|
||||
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)
|
||||
projected_loaded_json = _project_onto_constructed(loaded_json, constructed_json)
|
||||
sorted_loaded_json = json.dumps(projected_loaded_json, sort_keys=True)
|
||||
sorted_constructed_json = json.dumps(constructed_json, sort_keys=True)
|
||||
test_case.assertEqual(sorted_loaded_json, sorted_constructed_json)
|
||||
|
||||
@ -12,7 +12,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.96
|
||||
- API version: 7.0.97
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
@ -2,15 +2,36 @@
|
||||
|
||||
import json
|
||||
import unittest
|
||||
from typing import Any
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
def _project_onto_constructed(expected: Any, constructed: Any) -> Any:
|
||||
"""Keep only example fields that appear in the constructed model output."""
|
||||
if isinstance(constructed, dict):
|
||||
if not isinstance(expected, dict):
|
||||
return expected
|
||||
return {
|
||||
key: _project_onto_constructed(expected.get(key), value)
|
||||
for key, value in constructed.items()
|
||||
}
|
||||
if isinstance(constructed, list):
|
||||
if not isinstance(expected, list):
|
||||
return expected
|
||||
return [
|
||||
_project_onto_constructed(expected[index], value)
|
||||
for index, value in enumerate(constructed)
|
||||
]
|
||||
return expected
|
||||
|
||||
|
||||
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)
|
||||
projected_loaded_json = _project_onto_constructed(loaded_json, constructed_json)
|
||||
sorted_loaded_json = json.dumps(projected_loaded_json, sort_keys=True)
|
||||
sorted_constructed_json = json.dumps(constructed_json, sort_keys=True)
|
||||
test_case.assertEqual(sorted_loaded_json, sorted_constructed_json)
|
||||
|
||||
@ -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.96
|
||||
- API version: 7.0.97
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
@ -2,15 +2,36 @@
|
||||
|
||||
import json
|
||||
import unittest
|
||||
from typing import Any
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
def _project_onto_constructed(expected: Any, constructed: Any) -> Any:
|
||||
"""Keep only example fields that appear in the constructed model output."""
|
||||
if isinstance(constructed, dict):
|
||||
if not isinstance(expected, dict):
|
||||
return expected
|
||||
return {
|
||||
key: _project_onto_constructed(expected.get(key), value)
|
||||
for key, value in constructed.items()
|
||||
}
|
||||
if isinstance(constructed, list):
|
||||
if not isinstance(expected, list):
|
||||
return expected
|
||||
return [
|
||||
_project_onto_constructed(expected[index], value)
|
||||
for index, value in enumerate(constructed)
|
||||
]
|
||||
return expected
|
||||
|
||||
|
||||
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)
|
||||
projected_loaded_json = _project_onto_constructed(loaded_json, constructed_json)
|
||||
sorted_loaded_json = json.dumps(projected_loaded_json, sort_keys=True)
|
||||
sorted_constructed_json = json.dumps(constructed_json, sort_keys=True)
|
||||
test_case.assertEqual(sorted_loaded_json, sorted_constructed_json)
|
||||
|
||||
@ -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.96
|
||||
- API version: 7.0.97
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
@ -2,15 +2,36 @@
|
||||
|
||||
import json
|
||||
import unittest
|
||||
from typing import Any
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
def _project_onto_constructed(expected: Any, constructed: Any) -> Any:
|
||||
"""Keep only example fields that appear in the constructed model output."""
|
||||
if isinstance(constructed, dict):
|
||||
if not isinstance(expected, dict):
|
||||
return expected
|
||||
return {
|
||||
key: _project_onto_constructed(expected.get(key), value)
|
||||
for key, value in constructed.items()
|
||||
}
|
||||
if isinstance(constructed, list):
|
||||
if not isinstance(expected, list):
|
||||
return expected
|
||||
return [
|
||||
_project_onto_constructed(expected[index], value)
|
||||
for index, value in enumerate(constructed)
|
||||
]
|
||||
return expected
|
||||
|
||||
|
||||
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)
|
||||
projected_loaded_json = _project_onto_constructed(loaded_json, constructed_json)
|
||||
sorted_loaded_json = json.dumps(projected_loaded_json, sort_keys=True)
|
||||
sorted_constructed_json = json.dumps(constructed_json, sort_keys=True)
|
||||
test_case.assertEqual(sorted_loaded_json, sorted_constructed_json)
|
||||
|
||||
@ -4,7 +4,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.96
|
||||
- API version: 7.0.97
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
@ -2,15 +2,36 @@
|
||||
|
||||
import json
|
||||
import unittest
|
||||
from typing import Any
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
def _project_onto_constructed(expected: Any, constructed: Any) -> Any:
|
||||
"""Keep only example fields that appear in the constructed model output."""
|
||||
if isinstance(constructed, dict):
|
||||
if not isinstance(expected, dict):
|
||||
return expected
|
||||
return {
|
||||
key: _project_onto_constructed(expected.get(key), value)
|
||||
for key, value in constructed.items()
|
||||
}
|
||||
if isinstance(constructed, list):
|
||||
if not isinstance(expected, list):
|
||||
return expected
|
||||
return [
|
||||
_project_onto_constructed(expected[index], value)
|
||||
for index, value in enumerate(constructed)
|
||||
]
|
||||
return expected
|
||||
|
||||
|
||||
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)
|
||||
projected_loaded_json = _project_onto_constructed(loaded_json, constructed_json)
|
||||
sorted_loaded_json = json.dumps(projected_loaded_json, sort_keys=True)
|
||||
sorted_constructed_json = json.dumps(constructed_json, sort_keys=True)
|
||||
test_case.assertEqual(sorted_loaded_json, sorted_constructed_json)
|
||||
|
||||
@ -5,15 +5,28 @@ docs/AffectedAgents.md
|
||||
docs/AffectedCount.md
|
||||
docs/AffectedTargets.md
|
||||
docs/AffectedTests.md
|
||||
docs/AgentBranchEventDetail.md
|
||||
docs/AgentBranchEventGrouping.md
|
||||
docs/AgentEventDetail.md
|
||||
docs/AgentEventGrouping.md
|
||||
docs/AgentLinks.md
|
||||
docs/AgentLocalEventDetail.md
|
||||
docs/AgentLocalEventGrouping.md
|
||||
docs/ApiAffectedTarget.md
|
||||
docs/CloudEnterpriseAgentType.md
|
||||
docs/ApplicationEventDetail.md
|
||||
docs/ApplicationEventGrouping.md
|
||||
docs/DnsEventDetail.md
|
||||
docs/DnsEventGrouping.md
|
||||
docs/DnsNameEventDetail.md
|
||||
docs/DnsNameEventGrouping.md
|
||||
docs/DnsServerEventDetail.md
|
||||
docs/DnsServerEventGrouping.md
|
||||
docs/DomainEventDetail.md
|
||||
docs/DomainEventGrouping.md
|
||||
docs/Error.md
|
||||
docs/Event.md
|
||||
docs/EventAffectedAgentType.md
|
||||
docs/EventAgentType.md
|
||||
docs/EventAlertSeverity.md
|
||||
docs/EventApiAffectedAgent.md
|
||||
docs/EventApiAffectedTest.md
|
||||
@ -24,7 +37,11 @@ docs/EventTestLinks.md
|
||||
docs/EventType.md
|
||||
docs/Events.md
|
||||
docs/EventsApi.md
|
||||
docs/GatewayEventDetail.md
|
||||
docs/GatewayEventGrouping.md
|
||||
docs/Link.md
|
||||
docs/NameServerEventDetail.md
|
||||
docs/NameServerEventGrouping.md
|
||||
docs/NetworkEventDetail.md
|
||||
docs/NetworkEventGrouping.md
|
||||
docs/NetworkPopEventDetail.md
|
||||
@ -41,6 +58,10 @@ docs/TestType.md
|
||||
docs/UnauthorizedError.md
|
||||
docs/ValidationError.md
|
||||
docs/ValidationErrorItem.md
|
||||
docs/VpnEventDetail.md
|
||||
docs/VpnEventGrouping.md
|
||||
docs/WirelessEventDetail.md
|
||||
docs/WirelessEventGrouping.md
|
||||
pyproject.toml
|
||||
setup.cfg
|
||||
src/thousandeyes_sdk/event_detection/__init__.py
|
||||
@ -51,15 +72,28 @@ src/thousandeyes_sdk/event_detection/models/affected_agents.py
|
||||
src/thousandeyes_sdk/event_detection/models/affected_count.py
|
||||
src/thousandeyes_sdk/event_detection/models/affected_targets.py
|
||||
src/thousandeyes_sdk/event_detection/models/affected_tests.py
|
||||
src/thousandeyes_sdk/event_detection/models/agent_branch_event_detail.py
|
||||
src/thousandeyes_sdk/event_detection/models/agent_branch_event_grouping.py
|
||||
src/thousandeyes_sdk/event_detection/models/agent_event_detail.py
|
||||
src/thousandeyes_sdk/event_detection/models/agent_event_grouping.py
|
||||
src/thousandeyes_sdk/event_detection/models/agent_links.py
|
||||
src/thousandeyes_sdk/event_detection/models/agent_local_event_detail.py
|
||||
src/thousandeyes_sdk/event_detection/models/agent_local_event_grouping.py
|
||||
src/thousandeyes_sdk/event_detection/models/api_affected_target.py
|
||||
src/thousandeyes_sdk/event_detection/models/cloud_enterprise_agent_type.py
|
||||
src/thousandeyes_sdk/event_detection/models/application_event_detail.py
|
||||
src/thousandeyes_sdk/event_detection/models/application_event_grouping.py
|
||||
src/thousandeyes_sdk/event_detection/models/dns_event_detail.py
|
||||
src/thousandeyes_sdk/event_detection/models/dns_event_grouping.py
|
||||
src/thousandeyes_sdk/event_detection/models/dns_name_event_detail.py
|
||||
src/thousandeyes_sdk/event_detection/models/dns_name_event_grouping.py
|
||||
src/thousandeyes_sdk/event_detection/models/dns_server_event_detail.py
|
||||
src/thousandeyes_sdk/event_detection/models/dns_server_event_grouping.py
|
||||
src/thousandeyes_sdk/event_detection/models/domain_event_detail.py
|
||||
src/thousandeyes_sdk/event_detection/models/domain_event_grouping.py
|
||||
src/thousandeyes_sdk/event_detection/models/error.py
|
||||
src/thousandeyes_sdk/event_detection/models/event.py
|
||||
src/thousandeyes_sdk/event_detection/models/event_affected_agent_type.py
|
||||
src/thousandeyes_sdk/event_detection/models/event_agent_type.py
|
||||
src/thousandeyes_sdk/event_detection/models/event_alert_severity.py
|
||||
src/thousandeyes_sdk/event_detection/models/event_api_affected_agent.py
|
||||
src/thousandeyes_sdk/event_detection/models/event_api_affected_test.py
|
||||
@ -69,7 +103,11 @@ src/thousandeyes_sdk/event_detection/models/event_state.py
|
||||
src/thousandeyes_sdk/event_detection/models/event_test_links.py
|
||||
src/thousandeyes_sdk/event_detection/models/event_type.py
|
||||
src/thousandeyes_sdk/event_detection/models/events.py
|
||||
src/thousandeyes_sdk/event_detection/models/gateway_event_detail.py
|
||||
src/thousandeyes_sdk/event_detection/models/gateway_event_grouping.py
|
||||
src/thousandeyes_sdk/event_detection/models/link.py
|
||||
src/thousandeyes_sdk/event_detection/models/name_server_event_detail.py
|
||||
src/thousandeyes_sdk/event_detection/models/name_server_event_grouping.py
|
||||
src/thousandeyes_sdk/event_detection/models/network_event_detail.py
|
||||
src/thousandeyes_sdk/event_detection/models/network_event_grouping.py
|
||||
src/thousandeyes_sdk/event_detection/models/network_pop_event_detail.py
|
||||
@ -86,7 +124,15 @@ src/thousandeyes_sdk/event_detection/models/test_type.py
|
||||
src/thousandeyes_sdk/event_detection/models/unauthorized_error.py
|
||||
src/thousandeyes_sdk/event_detection/models/validation_error.py
|
||||
src/thousandeyes_sdk/event_detection/models/validation_error_item.py
|
||||
src/thousandeyes_sdk/event_detection/models/vpn_event_detail.py
|
||||
src/thousandeyes_sdk/event_detection/models/vpn_event_grouping.py
|
||||
src/thousandeyes_sdk/event_detection/models/wireless_event_detail.py
|
||||
src/thousandeyes_sdk/event_detection/models/wireless_event_grouping.py
|
||||
src/thousandeyes_sdk/event_detection/py.typed
|
||||
test/__init__.py
|
||||
test/conftest.py
|
||||
test/integration_test_utils.py
|
||||
test/mock_manifest.py
|
||||
test/test_events_api.py
|
||||
test/test_events_api_integration.py
|
||||
test/test_utils.py
|
||||
|
||||
@ -11,7 +11,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.96
|
||||
- API version: 7.0.97
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
@ -113,15 +113,28 @@ Class | Method | HTTP request | Description
|
||||
- [AffectedCount](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-event-detection/docs/AffectedCount.md)
|
||||
- [AffectedTargets](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-event-detection/docs/AffectedTargets.md)
|
||||
- [AffectedTests](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-event-detection/docs/AffectedTests.md)
|
||||
- [AgentBranchEventDetail](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-event-detection/docs/AgentBranchEventDetail.md)
|
||||
- [AgentBranchEventGrouping](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-event-detection/docs/AgentBranchEventGrouping.md)
|
||||
- [AgentEventDetail](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-event-detection/docs/AgentEventDetail.md)
|
||||
- [AgentEventGrouping](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-event-detection/docs/AgentEventGrouping.md)
|
||||
- [AgentLinks](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-event-detection/docs/AgentLinks.md)
|
||||
- [AgentLocalEventDetail](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-event-detection/docs/AgentLocalEventDetail.md)
|
||||
- [AgentLocalEventGrouping](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-event-detection/docs/AgentLocalEventGrouping.md)
|
||||
- [ApiAffectedTarget](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-event-detection/docs/ApiAffectedTarget.md)
|
||||
- [CloudEnterpriseAgentType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-event-detection/docs/CloudEnterpriseAgentType.md)
|
||||
- [ApplicationEventDetail](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-event-detection/docs/ApplicationEventDetail.md)
|
||||
- [ApplicationEventGrouping](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-event-detection/docs/ApplicationEventGrouping.md)
|
||||
- [DnsEventDetail](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-event-detection/docs/DnsEventDetail.md)
|
||||
- [DnsEventGrouping](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-event-detection/docs/DnsEventGrouping.md)
|
||||
- [DnsNameEventDetail](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-event-detection/docs/DnsNameEventDetail.md)
|
||||
- [DnsNameEventGrouping](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-event-detection/docs/DnsNameEventGrouping.md)
|
||||
- [DnsServerEventDetail](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-event-detection/docs/DnsServerEventDetail.md)
|
||||
- [DnsServerEventGrouping](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-event-detection/docs/DnsServerEventGrouping.md)
|
||||
- [DomainEventDetail](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-event-detection/docs/DomainEventDetail.md)
|
||||
- [DomainEventGrouping](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-event-detection/docs/DomainEventGrouping.md)
|
||||
- [Error](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-event-detection/docs/Error.md)
|
||||
- [Event](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-event-detection/docs/Event.md)
|
||||
- [EventAffectedAgentType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-event-detection/docs/EventAffectedAgentType.md)
|
||||
- [EventAgentType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-event-detection/docs/EventAgentType.md)
|
||||
- [EventAlertSeverity](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-event-detection/docs/EventAlertSeverity.md)
|
||||
- [EventApiAffectedAgent](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-event-detection/docs/EventApiAffectedAgent.md)
|
||||
- [EventApiAffectedTest](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-event-detection/docs/EventApiAffectedTest.md)
|
||||
@ -131,7 +144,11 @@ Class | Method | HTTP request | Description
|
||||
- [EventTestLinks](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-event-detection/docs/EventTestLinks.md)
|
||||
- [EventType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-event-detection/docs/EventType.md)
|
||||
- [Events](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-event-detection/docs/Events.md)
|
||||
- [GatewayEventDetail](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-event-detection/docs/GatewayEventDetail.md)
|
||||
- [GatewayEventGrouping](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-event-detection/docs/GatewayEventGrouping.md)
|
||||
- [Link](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-event-detection/docs/Link.md)
|
||||
- [NameServerEventDetail](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-event-detection/docs/NameServerEventDetail.md)
|
||||
- [NameServerEventGrouping](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-event-detection/docs/NameServerEventGrouping.md)
|
||||
- [NetworkEventDetail](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-event-detection/docs/NetworkEventDetail.md)
|
||||
- [NetworkEventGrouping](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-event-detection/docs/NetworkEventGrouping.md)
|
||||
- [NetworkPopEventDetail](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-event-detection/docs/NetworkPopEventDetail.md)
|
||||
@ -148,6 +165,10 @@ Class | Method | HTTP request | Description
|
||||
- [UnauthorizedError](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-event-detection/docs/UnauthorizedError.md)
|
||||
- [ValidationError](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-event-detection/docs/ValidationError.md)
|
||||
- [ValidationErrorItem](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-event-detection/docs/ValidationErrorItem.md)
|
||||
- [VpnEventDetail](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-event-detection/docs/VpnEventDetail.md)
|
||||
- [VpnEventGrouping](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-event-detection/docs/VpnEventGrouping.md)
|
||||
- [WirelessEventDetail](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-event-detection/docs/WirelessEventDetail.md)
|
||||
- [WirelessEventGrouping](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-event-detection/docs/WirelessEventGrouping.md)
|
||||
|
||||
|
||||
<a id="documentation-for-authorization"></a>
|
||||
|
||||
@ -0,0 +1,44 @@
|
||||
# AgentBranchEventDetail
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **str** | A unique ID for each event. | [optional] [readonly]
|
||||
**type_name** | **str** | Event type name. Examples include, Local Agent Issue, Network Path Issue, Network Outage, DNS Issue, Server Issue, and Proxy Issue. | [optional] [readonly]
|
||||
**state** | [**EventState**](EventState.md) | | [optional]
|
||||
**start_date** | **datetime** | The start date and time (in UTC, ISO 8601 format) when the event was first detected. | [optional] [readonly]
|
||||
**end_date** | **datetime** | The end date and time (in UTC, ISO 8601 format) when the event was resolved (due to timeout). This value is null for \"ongoing\" (active) events and is populated once the event is resolved. | [optional] [readonly]
|
||||
**severity** | [**EventAlertSeverity**](EventAlertSeverity.md) | | [optional]
|
||||
**aid** | **str** | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. | [optional]
|
||||
**summary** | **str** | A brief summary describing the cause of the event. | [optional] [readonly]
|
||||
**agent_type** | [**EventAgentType**](EventAgentType.md) | | [optional]
|
||||
**affected_tests** | [**AffectedTests**](AffectedTests.md) | | [optional]
|
||||
**affected_targets** | [**AffectedTargets**](AffectedTargets.md) | | [optional]
|
||||
**affected_agents** | [**AffectedAgents**](AffectedAgents.md) | | [optional]
|
||||
**cause** | **List[str]** | The cause of the error. | [optional]
|
||||
**links** | [**SelfLinks**](SelfLinks.md) | | [optional]
|
||||
**type** | **str** | Agent branch event type. |
|
||||
**grouping** | [**AgentBranchEventGrouping**](AgentBranchEventGrouping.md) | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from thousandeyes_sdk.event_detection.models.agent_branch_event_detail import AgentBranchEventDetail
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of AgentBranchEventDetail from a JSON string
|
||||
agent_branch_event_detail_instance = AgentBranchEventDetail.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(AgentBranchEventDetail.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
agent_branch_event_detail_dict = agent_branch_event_detail_instance.to_dict()
|
||||
# create an instance of AgentBranchEventDetail from a dict
|
||||
agent_branch_event_detail_from_dict = AgentBranchEventDetail.from_dict(agent_branch_event_detail_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 @@
|
||||
# AgentBranchEventGrouping
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**asn** | **int** | AS number of the agent's network (for agent-branch events). | [optional] [readonly]
|
||||
**asn_city** | **str** | City associated with the agent's AS (for agent-branch events). | [optional] [readonly]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from thousandeyes_sdk.event_detection.models.agent_branch_event_grouping import AgentBranchEventGrouping
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of AgentBranchEventGrouping from a JSON string
|
||||
agent_branch_event_grouping_instance = AgentBranchEventGrouping.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(AgentBranchEventGrouping.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
agent_branch_event_grouping_dict = agent_branch_event_grouping_instance.to_dict()
|
||||
# create an instance of AgentBranchEventGrouping from a dict
|
||||
agent_branch_event_grouping_from_dict = AgentBranchEventGrouping.from_dict(agent_branch_event_grouping_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)
|
||||
|
||||
|
||||
44
thousandeyes-sdk-event-detection/docs/AgentEventDetail.md
Normal file
44
thousandeyes-sdk-event-detection/docs/AgentEventDetail.md
Normal file
@ -0,0 +1,44 @@
|
||||
# AgentEventDetail
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **str** | A unique ID for each event. | [optional] [readonly]
|
||||
**type_name** | **str** | Event type name. Examples include, Local Agent Issue, Network Path Issue, Network Outage, DNS Issue, Server Issue, and Proxy Issue. | [optional] [readonly]
|
||||
**state** | [**EventState**](EventState.md) | | [optional]
|
||||
**start_date** | **datetime** | The start date and time (in UTC, ISO 8601 format) when the event was first detected. | [optional] [readonly]
|
||||
**end_date** | **datetime** | The end date and time (in UTC, ISO 8601 format) when the event was resolved (due to timeout). This value is null for \"ongoing\" (active) events and is populated once the event is resolved. | [optional] [readonly]
|
||||
**severity** | [**EventAlertSeverity**](EventAlertSeverity.md) | | [optional]
|
||||
**aid** | **str** | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. | [optional]
|
||||
**summary** | **str** | A brief summary describing the cause of the event. | [optional] [readonly]
|
||||
**agent_type** | [**EventAgentType**](EventAgentType.md) | | [optional]
|
||||
**affected_tests** | [**AffectedTests**](AffectedTests.md) | | [optional]
|
||||
**affected_targets** | [**AffectedTargets**](AffectedTargets.md) | | [optional]
|
||||
**affected_agents** | [**AffectedAgents**](AffectedAgents.md) | | [optional]
|
||||
**cause** | **List[str]** | The cause of the error. | [optional]
|
||||
**links** | [**SelfLinks**](SelfLinks.md) | | [optional]
|
||||
**type** | **str** | Agent event type. |
|
||||
**grouping** | [**AgentEventGrouping**](AgentEventGrouping.md) | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from thousandeyes_sdk.event_detection.models.agent_event_detail import AgentEventDetail
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of AgentEventDetail from a JSON string
|
||||
agent_event_detail_instance = AgentEventDetail.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(AgentEventDetail.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
agent_event_detail_dict = agent_event_detail_instance.to_dict()
|
||||
# create an instance of AgentEventDetail from a dict
|
||||
agent_event_detail_from_dict = AgentEventDetail.from_dict(agent_event_detail_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)
|
||||
|
||||
|
||||
29
thousandeyes-sdk-event-detection/docs/AgentEventGrouping.md
Normal file
29
thousandeyes-sdk-event-detection/docs/AgentEventGrouping.md
Normal file
@ -0,0 +1,29 @@
|
||||
# AgentEventGrouping
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**agent_id** | **str** | Agent identifier (for agent events). Represents the machine ID for Endpoint Agents or the virtual agent ID for Cloud and Enterprise Agents'. | [optional] [readonly]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from thousandeyes_sdk.event_detection.models.agent_event_grouping import AgentEventGrouping
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of AgentEventGrouping from a JSON string
|
||||
agent_event_grouping_instance = AgentEventGrouping.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(AgentEventGrouping.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
agent_event_grouping_dict = agent_event_grouping_instance.to_dict()
|
||||
# create an instance of AgentEventGrouping from a dict
|
||||
agent_event_grouping_from_dict = AgentEventGrouping.from_dict(agent_event_grouping_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)
|
||||
|
||||
|
||||
@ -9,10 +9,11 @@ Name | Type | Description | Notes
|
||||
**type_name** | **str** | Event type name. Examples include, Local Agent Issue, Network Path Issue, Network Outage, DNS Issue, Server Issue, and Proxy Issue. | [optional] [readonly]
|
||||
**state** | [**EventState**](EventState.md) | | [optional]
|
||||
**start_date** | **datetime** | The start date and time (in UTC, ISO 8601 format) when the event was first detected. | [optional] [readonly]
|
||||
**end_date** | **datetime** | The end date and time (in UTC, ISO 8601 format) when the event was resolved (due to timeout). This value is populated for \"ongoing\" events. | [optional] [readonly]
|
||||
**end_date** | **datetime** | The end date and time (in UTC, ISO 8601 format) when the event was resolved (due to timeout). This value is null for \"ongoing\" (active) events and is populated once the event is resolved. | [optional] [readonly]
|
||||
**severity** | [**EventAlertSeverity**](EventAlertSeverity.md) | | [optional]
|
||||
**aid** | **str** | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. | [optional]
|
||||
**summary** | **str** | A brief summary describing the cause of the event. | [optional] [readonly]
|
||||
**agent_type** | [**EventAgentType**](EventAgentType.md) | | [optional]
|
||||
**affected_tests** | [**AffectedTests**](AffectedTests.md) | | [optional]
|
||||
**affected_targets** | [**AffectedTargets**](AffectedTargets.md) | | [optional]
|
||||
**affected_agents** | [**AffectedAgents**](AffectedAgents.md) | | [optional]
|
||||
|
||||
@ -0,0 +1,44 @@
|
||||
# ApplicationEventDetail
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **str** | A unique ID for each event. | [optional] [readonly]
|
||||
**type_name** | **str** | Event type name. Examples include, Local Agent Issue, Network Path Issue, Network Outage, DNS Issue, Server Issue, and Proxy Issue. | [optional] [readonly]
|
||||
**state** | [**EventState**](EventState.md) | | [optional]
|
||||
**start_date** | **datetime** | The start date and time (in UTC, ISO 8601 format) when the event was first detected. | [optional] [readonly]
|
||||
**end_date** | **datetime** | The end date and time (in UTC, ISO 8601 format) when the event was resolved (due to timeout). This value is null for \"ongoing\" (active) events and is populated once the event is resolved. | [optional] [readonly]
|
||||
**severity** | [**EventAlertSeverity**](EventAlertSeverity.md) | | [optional]
|
||||
**aid** | **str** | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. | [optional]
|
||||
**summary** | **str** | A brief summary describing the cause of the event. | [optional] [readonly]
|
||||
**agent_type** | [**EventAgentType**](EventAgentType.md) | | [optional]
|
||||
**affected_tests** | [**AffectedTests**](AffectedTests.md) | | [optional]
|
||||
**affected_targets** | [**AffectedTargets**](AffectedTargets.md) | | [optional]
|
||||
**affected_agents** | [**AffectedAgents**](AffectedAgents.md) | | [optional]
|
||||
**cause** | **List[str]** | The cause of the error. | [optional]
|
||||
**links** | [**SelfLinks**](SelfLinks.md) | | [optional]
|
||||
**type** | **str** | Application event type. |
|
||||
**grouping** | [**ApplicationEventGrouping**](ApplicationEventGrouping.md) | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from thousandeyes_sdk.event_detection.models.application_event_detail import ApplicationEventDetail
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of ApplicationEventDetail from a JSON string
|
||||
application_event_detail_instance = ApplicationEventDetail.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(ApplicationEventDetail.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
application_event_detail_dict = application_event_detail_instance.to_dict()
|
||||
# create an instance of ApplicationEventDetail from a dict
|
||||
application_event_detail_from_dict = ApplicationEventDetail.from_dict(application_event_detail_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,29 @@
|
||||
# ApplicationEventGrouping
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**fqdn** | **str** | Fully qualified domain name of the application (for application events). | [optional] [readonly]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from thousandeyes_sdk.event_detection.models.application_event_grouping import ApplicationEventGrouping
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of ApplicationEventGrouping from a JSON string
|
||||
application_event_grouping_instance = ApplicationEventGrouping.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(ApplicationEventGrouping.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
application_event_grouping_dict = application_event_grouping_instance.to_dict()
|
||||
# create an instance of ApplicationEventGrouping from a dict
|
||||
application_event_grouping_from_dict = ApplicationEventGrouping.from_dict(application_event_grouping_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)
|
||||
|
||||
|
||||
@ -9,10 +9,11 @@ Name | Type | Description | Notes
|
||||
**type_name** | **str** | Event type name. Examples include, Local Agent Issue, Network Path Issue, Network Outage, DNS Issue, Server Issue, and Proxy Issue. | [optional] [readonly]
|
||||
**state** | [**EventState**](EventState.md) | | [optional]
|
||||
**start_date** | **datetime** | The start date and time (in UTC, ISO 8601 format) when the event was first detected. | [optional] [readonly]
|
||||
**end_date** | **datetime** | The end date and time (in UTC, ISO 8601 format) when the event was resolved (due to timeout). This value is populated for \"ongoing\" events. | [optional] [readonly]
|
||||
**end_date** | **datetime** | The end date and time (in UTC, ISO 8601 format) when the event was resolved (due to timeout). This value is null for \"ongoing\" (active) events and is populated once the event is resolved. | [optional] [readonly]
|
||||
**severity** | [**EventAlertSeverity**](EventAlertSeverity.md) | | [optional]
|
||||
**aid** | **str** | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. | [optional]
|
||||
**summary** | **str** | A brief summary describing the cause of the event. | [optional] [readonly]
|
||||
**agent_type** | [**EventAgentType**](EventAgentType.md) | | [optional]
|
||||
**affected_tests** | [**AffectedTests**](AffectedTests.md) | | [optional]
|
||||
**affected_targets** | [**AffectedTargets**](AffectedTargets.md) | | [optional]
|
||||
**affected_agents** | [**AffectedAgents**](AffectedAgents.md) | | [optional]
|
||||
|
||||
44
thousandeyes-sdk-event-detection/docs/DnsNameEventDetail.md
Normal file
44
thousandeyes-sdk-event-detection/docs/DnsNameEventDetail.md
Normal file
@ -0,0 +1,44 @@
|
||||
# DnsNameEventDetail
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **str** | A unique ID for each event. | [optional] [readonly]
|
||||
**type_name** | **str** | Event type name. Examples include, Local Agent Issue, Network Path Issue, Network Outage, DNS Issue, Server Issue, and Proxy Issue. | [optional] [readonly]
|
||||
**state** | [**EventState**](EventState.md) | | [optional]
|
||||
**start_date** | **datetime** | The start date and time (in UTC, ISO 8601 format) when the event was first detected. | [optional] [readonly]
|
||||
**end_date** | **datetime** | The end date and time (in UTC, ISO 8601 format) when the event was resolved (due to timeout). This value is null for \"ongoing\" (active) events and is populated once the event is resolved. | [optional] [readonly]
|
||||
**severity** | [**EventAlertSeverity**](EventAlertSeverity.md) | | [optional]
|
||||
**aid** | **str** | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. | [optional]
|
||||
**summary** | **str** | A brief summary describing the cause of the event. | [optional] [readonly]
|
||||
**agent_type** | [**EventAgentType**](EventAgentType.md) | | [optional]
|
||||
**affected_tests** | [**AffectedTests**](AffectedTests.md) | | [optional]
|
||||
**affected_targets** | [**AffectedTargets**](AffectedTargets.md) | | [optional]
|
||||
**affected_agents** | [**AffectedAgents**](AffectedAgents.md) | | [optional]
|
||||
**cause** | **List[str]** | The cause of the error. | [optional]
|
||||
**links** | [**SelfLinks**](SelfLinks.md) | | [optional]
|
||||
**type** | **str** | DNS name event type. |
|
||||
**grouping** | [**DnsNameEventGrouping**](DnsNameEventGrouping.md) | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from thousandeyes_sdk.event_detection.models.dns_name_event_detail import DnsNameEventDetail
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of DnsNameEventDetail from a JSON string
|
||||
dns_name_event_detail_instance = DnsNameEventDetail.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(DnsNameEventDetail.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
dns_name_event_detail_dict = dns_name_event_detail_instance.to_dict()
|
||||
# create an instance of DnsNameEventDetail from a dict
|
||||
dns_name_event_detail_from_dict = DnsNameEventDetail.from_dict(dns_name_event_detail_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,29 @@
|
||||
# DnsNameEventGrouping
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**domain_name_suffix** | **str** | Domain name suffix (for dns-name events). | [optional] [readonly]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from thousandeyes_sdk.event_detection.models.dns_name_event_grouping import DnsNameEventGrouping
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of DnsNameEventGrouping from a JSON string
|
||||
dns_name_event_grouping_instance = DnsNameEventGrouping.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(DnsNameEventGrouping.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
dns_name_event_grouping_dict = dns_name_event_grouping_instance.to_dict()
|
||||
# create an instance of DnsNameEventGrouping from a dict
|
||||
dns_name_event_grouping_from_dict = DnsNameEventGrouping.from_dict(dns_name_event_grouping_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,44 @@
|
||||
# DnsServerEventDetail
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **str** | A unique ID for each event. | [optional] [readonly]
|
||||
**type_name** | **str** | Event type name. Examples include, Local Agent Issue, Network Path Issue, Network Outage, DNS Issue, Server Issue, and Proxy Issue. | [optional] [readonly]
|
||||
**state** | [**EventState**](EventState.md) | | [optional]
|
||||
**start_date** | **datetime** | The start date and time (in UTC, ISO 8601 format) when the event was first detected. | [optional] [readonly]
|
||||
**end_date** | **datetime** | The end date and time (in UTC, ISO 8601 format) when the event was resolved (due to timeout). This value is null for \"ongoing\" (active) events and is populated once the event is resolved. | [optional] [readonly]
|
||||
**severity** | [**EventAlertSeverity**](EventAlertSeverity.md) | | [optional]
|
||||
**aid** | **str** | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. | [optional]
|
||||
**summary** | **str** | A brief summary describing the cause of the event. | [optional] [readonly]
|
||||
**agent_type** | [**EventAgentType**](EventAgentType.md) | | [optional]
|
||||
**affected_tests** | [**AffectedTests**](AffectedTests.md) | | [optional]
|
||||
**affected_targets** | [**AffectedTargets**](AffectedTargets.md) | | [optional]
|
||||
**affected_agents** | [**AffectedAgents**](AffectedAgents.md) | | [optional]
|
||||
**cause** | **List[str]** | The cause of the error. | [optional]
|
||||
**links** | [**SelfLinks**](SelfLinks.md) | | [optional]
|
||||
**type** | **str** | DNS server event type. |
|
||||
**grouping** | [**DnsServerEventGrouping**](DnsServerEventGrouping.md) | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from thousandeyes_sdk.event_detection.models.dns_server_event_detail import DnsServerEventDetail
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of DnsServerEventDetail from a JSON string
|
||||
dns_server_event_detail_instance = DnsServerEventDetail.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(DnsServerEventDetail.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
dns_server_event_detail_dict = dns_server_event_detail_instance.to_dict()
|
||||
# create an instance of DnsServerEventDetail from a dict
|
||||
dns_server_event_detail_from_dict = DnsServerEventDetail.from_dict(dns_server_event_detail_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,29 @@
|
||||
# DnsServerEventGrouping
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**ip_address** | **str** | DNS server IP address (for dns-server events). | [optional] [readonly]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from thousandeyes_sdk.event_detection.models.dns_server_event_grouping import DnsServerEventGrouping
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of DnsServerEventGrouping from a JSON string
|
||||
dns_server_event_grouping_instance = DnsServerEventGrouping.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(DnsServerEventGrouping.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
dns_server_event_grouping_dict = dns_server_event_grouping_instance.to_dict()
|
||||
# create an instance of DnsServerEventGrouping from a dict
|
||||
dns_server_event_grouping_from_dict = DnsServerEventGrouping.from_dict(dns_server_event_grouping_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)
|
||||
|
||||
|
||||
44
thousandeyes-sdk-event-detection/docs/DomainEventDetail.md
Normal file
44
thousandeyes-sdk-event-detection/docs/DomainEventDetail.md
Normal file
@ -0,0 +1,44 @@
|
||||
# DomainEventDetail
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **str** | A unique ID for each event. | [optional] [readonly]
|
||||
**type_name** | **str** | Event type name. Examples include, Local Agent Issue, Network Path Issue, Network Outage, DNS Issue, Server Issue, and Proxy Issue. | [optional] [readonly]
|
||||
**state** | [**EventState**](EventState.md) | | [optional]
|
||||
**start_date** | **datetime** | The start date and time (in UTC, ISO 8601 format) when the event was first detected. | [optional] [readonly]
|
||||
**end_date** | **datetime** | The end date and time (in UTC, ISO 8601 format) when the event was resolved (due to timeout). This value is null for \"ongoing\" (active) events and is populated once the event is resolved. | [optional] [readonly]
|
||||
**severity** | [**EventAlertSeverity**](EventAlertSeverity.md) | | [optional]
|
||||
**aid** | **str** | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. | [optional]
|
||||
**summary** | **str** | A brief summary describing the cause of the event. | [optional] [readonly]
|
||||
**agent_type** | [**EventAgentType**](EventAgentType.md) | | [optional]
|
||||
**affected_tests** | [**AffectedTests**](AffectedTests.md) | | [optional]
|
||||
**affected_targets** | [**AffectedTargets**](AffectedTargets.md) | | [optional]
|
||||
**affected_agents** | [**AffectedAgents**](AffectedAgents.md) | | [optional]
|
||||
**cause** | **List[str]** | The cause of the error. | [optional]
|
||||
**links** | [**SelfLinks**](SelfLinks.md) | | [optional]
|
||||
**type** | **str** | Domain event type. |
|
||||
**grouping** | [**DomainEventGrouping**](DomainEventGrouping.md) | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from thousandeyes_sdk.event_detection.models.domain_event_detail import DomainEventDetail
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of DomainEventDetail from a JSON string
|
||||
domain_event_detail_instance = DomainEventDetail.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(DomainEventDetail.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
domain_event_detail_dict = domain_event_detail_instance.to_dict()
|
||||
# create an instance of DomainEventDetail from a dict
|
||||
domain_event_detail_from_dict = DomainEventDetail.from_dict(domain_event_detail_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)
|
||||
|
||||
|
||||
29
thousandeyes-sdk-event-detection/docs/DomainEventGrouping.md
Normal file
29
thousandeyes-sdk-event-detection/docs/DomainEventGrouping.md
Normal file
@ -0,0 +1,29 @@
|
||||
# DomainEventGrouping
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**fqdn** | **str** | Fully qualified domain name (for domain events). | [optional] [readonly]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from thousandeyes_sdk.event_detection.models.domain_event_grouping import DomainEventGrouping
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of DomainEventGrouping from a JSON string
|
||||
domain_event_grouping_instance = DomainEventGrouping.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(DomainEventGrouping.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
domain_event_grouping_dict = domain_event_grouping_instance.to_dict()
|
||||
# create an instance of DomainEventGrouping from a dict
|
||||
domain_event_grouping_from_dict = DomainEventGrouping.from_dict(domain_event_grouping_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)
|
||||
|
||||
|
||||
@ -9,10 +9,11 @@ Name | Type | Description | Notes
|
||||
**type_name** | **str** | Event type name. Examples include, Local Agent Issue, Network Path Issue, Network Outage, DNS Issue, Server Issue, and Proxy Issue. | [optional] [readonly]
|
||||
**state** | [**EventState**](EventState.md) | | [optional]
|
||||
**start_date** | **datetime** | The start date and time (in UTC, ISO 8601 format) when the event was first detected. | [optional] [readonly]
|
||||
**end_date** | **datetime** | The end date and time (in UTC, ISO 8601 format) when the event was resolved (due to timeout). This value is populated for \"ongoing\" events. | [optional] [readonly]
|
||||
**end_date** | **datetime** | The end date and time (in UTC, ISO 8601 format) when the event was resolved (due to timeout). This value is null for \"ongoing\" (active) events and is populated once the event is resolved. | [optional] [readonly]
|
||||
**severity** | [**EventAlertSeverity**](EventAlertSeverity.md) | | [optional]
|
||||
**title** | **str** | Event title | [optional] [readonly]
|
||||
**type** | [**EventType**](EventType.md) | | [optional]
|
||||
**agent_type** | [**EventAgentType**](EventAgentType.md) | | [optional]
|
||||
**affected_tests** | [**AffectedCount**](AffectedCount.md) | | [optional]
|
||||
**affected_targets** | [**AffectedCount**](AffectedCount.md) | | [optional]
|
||||
**affected_agents** | [**AffectedCount**](AffectedCount.md) | | [optional]
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# CloudEnterpriseAgentType
|
||||
# EventAffectedAgentType
|
||||
|
||||
Type of the agent.
|
||||
Type of the affected agent.
|
||||
|
||||
## Properties
|
||||
|
||||
12
thousandeyes-sdk-event-detection/docs/EventAgentType.md
Normal file
12
thousandeyes-sdk-event-detection/docs/EventAgentType.md
Normal file
@ -0,0 +1,12 @@
|
||||
# EventAgentType
|
||||
|
||||
Specifies the agent type associated with the event. Allowed values are `cloud-enterprise-agent` and `endpoint-agent`.
|
||||
|
||||
## 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)
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**agent_id** | **str** | The ID of the virtual agent. | [optional] [readonly]
|
||||
**type** | [**CloudEnterpriseAgentType**](CloudEnterpriseAgentType.md) | | [optional]
|
||||
**type** | [**EventAffectedAgentType**](EventAffectedAgentType.md) | | [optional]
|
||||
**name** | **str** | The name of the agent as defined in settings. | [optional] [readonly]
|
||||
**location** | **str** | The name of the agent's location. | [optional] [readonly]
|
||||
**country_code** | **str** | The country code of the agent's location . | [optional] [readonly]
|
||||
|
||||
@ -9,17 +9,18 @@ Name | Type | Description | Notes
|
||||
**type_name** | **str** | Event type name. Examples include, Local Agent Issue, Network Path Issue, Network Outage, DNS Issue, Server Issue, and Proxy Issue. | [optional] [readonly]
|
||||
**state** | [**EventState**](EventState.md) | | [optional]
|
||||
**start_date** | **datetime** | The start date and time (in UTC, ISO 8601 format) when the event was first detected. | [optional] [readonly]
|
||||
**end_date** | **datetime** | The end date and time (in UTC, ISO 8601 format) when the event was resolved (due to timeout). This value is populated for \"ongoing\" events. | [optional] [readonly]
|
||||
**end_date** | **datetime** | The end date and time (in UTC, ISO 8601 format) when the event was resolved (due to timeout). This value is null for \"ongoing\" (active) events and is populated once the event is resolved. | [optional] [readonly]
|
||||
**severity** | [**EventAlertSeverity**](EventAlertSeverity.md) | | [optional]
|
||||
**aid** | **str** | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. | [optional]
|
||||
**summary** | **str** | A brief summary describing the cause of the event. | [optional] [readonly]
|
||||
**agent_type** | [**EventAgentType**](EventAgentType.md) | | [optional]
|
||||
**affected_tests** | [**AffectedTests**](AffectedTests.md) | | [optional]
|
||||
**affected_targets** | [**AffectedTargets**](AffectedTargets.md) | | [optional]
|
||||
**affected_agents** | [**AffectedAgents**](AffectedAgents.md) | | [optional]
|
||||
**cause** | **List[str]** | The cause of the error. | [optional]
|
||||
**links** | [**SelfLinks**](SelfLinks.md) | | [optional]
|
||||
**type** | **str** | Network pop event type. |
|
||||
**grouping** | [**NetworkEventGrouping**](NetworkEventGrouping.md) | | [optional]
|
||||
**type** | **str** | Name server event type. |
|
||||
**grouping** | [**NameServerEventGrouping**](NameServerEventGrouping.md) | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
|
||||
@ -9,10 +9,11 @@ Name | Type | Description | Notes
|
||||
**type_name** | **str** | Event type name. Examples include, Local Agent Issue, Network Path Issue, Network Outage, DNS Issue, Server Issue, and Proxy Issue. | [optional] [readonly]
|
||||
**state** | [**EventState**](EventState.md) | | [optional]
|
||||
**start_date** | **datetime** | The start date and time (in UTC, ISO 8601 format) when the event was first detected. | [optional] [readonly]
|
||||
**end_date** | **datetime** | The end date and time (in UTC, ISO 8601 format) when the event was resolved (due to timeout). This value is populated for \"ongoing\" events. | [optional] [readonly]
|
||||
**end_date** | **datetime** | The end date and time (in UTC, ISO 8601 format) when the event was resolved (due to timeout). This value is null for \"ongoing\" (active) events and is populated once the event is resolved. | [optional] [readonly]
|
||||
**severity** | [**EventAlertSeverity**](EventAlertSeverity.md) | | [optional]
|
||||
**aid** | **str** | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. | [optional]
|
||||
**summary** | **str** | A brief summary describing the cause of the event. | [optional] [readonly]
|
||||
**agent_type** | [**EventAgentType**](EventAgentType.md) | | [optional]
|
||||
**affected_tests** | [**AffectedTests**](AffectedTests.md) | | [optional]
|
||||
**affected_targets** | [**AffectedTargets**](AffectedTargets.md) | | [optional]
|
||||
**affected_agents** | [**AffectedAgents**](AffectedAgents.md) | | [optional]
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# EventType
|
||||
|
||||
Specifies the event type in a machine-readable and backwards-compatible format. Allowed values are: `agent-local`, `network-pop`, `network`, `dns`, `target`, and `proxy`.
|
||||
Specifies the event type in a machine-readable and backwards-compatible format, such as `agent` or `target`.
|
||||
|
||||
## Properties
|
||||
|
||||
|
||||
@ -96,7 +96,7 @@ Name | Type | Description | Notes
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **get_events**
|
||||
> Events get_events(aid=aid, window=window, start_date=start_date, end_date=end_date, max=max, cursor=cursor)
|
||||
> Events get_events(aid=aid, window=window, start_date=start_date, end_date=end_date, max=max, cursor=cursor, ongoing=ongoing)
|
||||
|
||||
List events
|
||||
|
||||
@ -138,10 +138,11 @@ with thousandeyes_sdk.core.ApiClient(configuration) as api_client:
|
||||
end_date = '2022-07-18T22:00:54Z' # datetime | Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. (optional)
|
||||
max = 5 # int | (Optional) Maximum number of objects to return. (optional)
|
||||
cursor = 'cursor_example' # str | (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. (optional)
|
||||
ongoing = True # bool | When set to `true`, only ongoing (active) events whose start date is within the specified time window are included in the response. When set to `false`, ongoing events are excluded from the response. If not set, both ongoing and concluded events appear in the response. (optional)
|
||||
|
||||
try:
|
||||
# List events
|
||||
api_response = api_instance.get_events(aid=aid, window=window, start_date=start_date, end_date=end_date, max=max, cursor=cursor)
|
||||
api_response = api_instance.get_events(aid=aid, window=window, start_date=start_date, end_date=end_date, max=max, cursor=cursor, ongoing=ongoing)
|
||||
print("The response of EventsApi->get_events:\n")
|
||||
pprint(api_response)
|
||||
except Exception as e:
|
||||
@ -161,6 +162,7 @@ Name | Type | Description | Notes
|
||||
**end_date** | **datetime**| Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. | [optional]
|
||||
**max** | **int**| (Optional) Maximum number of objects to return. | [optional]
|
||||
**cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. | [optional]
|
||||
**ongoing** | **bool**| When set to `true`, only ongoing (active) events whose start date is within the specified time window are included in the response. When set to `false`, ongoing events are excluded from the response. If not set, both ongoing and concluded events appear in the response. | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
44
thousandeyes-sdk-event-detection/docs/GatewayEventDetail.md
Normal file
44
thousandeyes-sdk-event-detection/docs/GatewayEventDetail.md
Normal file
@ -0,0 +1,44 @@
|
||||
# GatewayEventDetail
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **str** | A unique ID for each event. | [optional] [readonly]
|
||||
**type_name** | **str** | Event type name. Examples include, Local Agent Issue, Network Path Issue, Network Outage, DNS Issue, Server Issue, and Proxy Issue. | [optional] [readonly]
|
||||
**state** | [**EventState**](EventState.md) | | [optional]
|
||||
**start_date** | **datetime** | The start date and time (in UTC, ISO 8601 format) when the event was first detected. | [optional] [readonly]
|
||||
**end_date** | **datetime** | The end date and time (in UTC, ISO 8601 format) when the event was resolved (due to timeout). This value is null for \"ongoing\" (active) events and is populated once the event is resolved. | [optional] [readonly]
|
||||
**severity** | [**EventAlertSeverity**](EventAlertSeverity.md) | | [optional]
|
||||
**aid** | **str** | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. | [optional]
|
||||
**summary** | **str** | A brief summary describing the cause of the event. | [optional] [readonly]
|
||||
**agent_type** | [**EventAgentType**](EventAgentType.md) | | [optional]
|
||||
**affected_tests** | [**AffectedTests**](AffectedTests.md) | | [optional]
|
||||
**affected_targets** | [**AffectedTargets**](AffectedTargets.md) | | [optional]
|
||||
**affected_agents** | [**AffectedAgents**](AffectedAgents.md) | | [optional]
|
||||
**cause** | **List[str]** | The cause of the error. | [optional]
|
||||
**links** | [**SelfLinks**](SelfLinks.md) | | [optional]
|
||||
**type** | **str** | Gateway event type. |
|
||||
**grouping** | [**GatewayEventGrouping**](GatewayEventGrouping.md) | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from thousandeyes_sdk.event_detection.models.gateway_event_detail import GatewayEventDetail
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of GatewayEventDetail from a JSON string
|
||||
gateway_event_detail_instance = GatewayEventDetail.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(GatewayEventDetail.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
gateway_event_detail_dict = gateway_event_detail_instance.to_dict()
|
||||
# create an instance of GatewayEventDetail from a dict
|
||||
gateway_event_detail_from_dict = GatewayEventDetail.from_dict(gateway_event_detail_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 @@
|
||||
# GatewayEventGrouping
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**ip_address** | **str** | Gateway IP address (for gateway events). | [optional] [readonly]
|
||||
**mac_address** | **str** | Gateway MAC address (for gateway events). | [optional] [readonly]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from thousandeyes_sdk.event_detection.models.gateway_event_grouping import GatewayEventGrouping
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of GatewayEventGrouping from a JSON string
|
||||
gateway_event_grouping_instance = GatewayEventGrouping.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(GatewayEventGrouping.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
gateway_event_grouping_dict = gateway_event_grouping_instance.to_dict()
|
||||
# create an instance of GatewayEventGrouping from a dict
|
||||
gateway_event_grouping_from_dict = GatewayEventGrouping.from_dict(gateway_event_grouping_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,44 @@
|
||||
# NameServerEventDetail
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **str** | A unique ID for each event. | [optional] [readonly]
|
||||
**type_name** | **str** | Event type name. Examples include, Local Agent Issue, Network Path Issue, Network Outage, DNS Issue, Server Issue, and Proxy Issue. | [optional] [readonly]
|
||||
**state** | [**EventState**](EventState.md) | | [optional]
|
||||
**start_date** | **datetime** | The start date and time (in UTC, ISO 8601 format) when the event was first detected. | [optional] [readonly]
|
||||
**end_date** | **datetime** | The end date and time (in UTC, ISO 8601 format) when the event was resolved (due to timeout). This value is null for \"ongoing\" (active) events and is populated once the event is resolved. | [optional] [readonly]
|
||||
**severity** | [**EventAlertSeverity**](EventAlertSeverity.md) | | [optional]
|
||||
**aid** | **str** | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. | [optional]
|
||||
**summary** | **str** | A brief summary describing the cause of the event. | [optional] [readonly]
|
||||
**agent_type** | [**EventAgentType**](EventAgentType.md) | | [optional]
|
||||
**affected_tests** | [**AffectedTests**](AffectedTests.md) | | [optional]
|
||||
**affected_targets** | [**AffectedTargets**](AffectedTargets.md) | | [optional]
|
||||
**affected_agents** | [**AffectedAgents**](AffectedAgents.md) | | [optional]
|
||||
**cause** | **List[str]** | The cause of the error. | [optional]
|
||||
**links** | [**SelfLinks**](SelfLinks.md) | | [optional]
|
||||
**type** | **str** | Name server event type. |
|
||||
**grouping** | [**NameServerEventGrouping**](NameServerEventGrouping.md) | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from thousandeyes_sdk.event_detection.models.name_server_event_detail import NameServerEventDetail
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of NameServerEventDetail from a JSON string
|
||||
name_server_event_detail_instance = NameServerEventDetail.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(NameServerEventDetail.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
name_server_event_detail_dict = name_server_event_detail_instance.to_dict()
|
||||
# create an instance of NameServerEventDetail from a dict
|
||||
name_server_event_detail_from_dict = NameServerEventDetail.from_dict(name_server_event_detail_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,29 @@
|
||||
# NameServerEventGrouping
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**server_name** | **str** | Name server hostname (for name-server events). | [optional] [readonly]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from thousandeyes_sdk.event_detection.models.name_server_event_grouping import NameServerEventGrouping
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of NameServerEventGrouping from a JSON string
|
||||
name_server_event_grouping_instance = NameServerEventGrouping.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(NameServerEventGrouping.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
name_server_event_grouping_dict = name_server_event_grouping_instance.to_dict()
|
||||
# create an instance of NameServerEventGrouping from a dict
|
||||
name_server_event_grouping_from_dict = NameServerEventGrouping.from_dict(name_server_event_grouping_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)
|
||||
|
||||
|
||||
@ -9,10 +9,11 @@ Name | Type | Description | Notes
|
||||
**type_name** | **str** | Event type name. Examples include, Local Agent Issue, Network Path Issue, Network Outage, DNS Issue, Server Issue, and Proxy Issue. | [optional] [readonly]
|
||||
**state** | [**EventState**](EventState.md) | | [optional]
|
||||
**start_date** | **datetime** | The start date and time (in UTC, ISO 8601 format) when the event was first detected. | [optional] [readonly]
|
||||
**end_date** | **datetime** | The end date and time (in UTC, ISO 8601 format) when the event was resolved (due to timeout). This value is populated for \"ongoing\" events. | [optional] [readonly]
|
||||
**end_date** | **datetime** | The end date and time (in UTC, ISO 8601 format) when the event was resolved (due to timeout). This value is null for \"ongoing\" (active) events and is populated once the event is resolved. | [optional] [readonly]
|
||||
**severity** | [**EventAlertSeverity**](EventAlertSeverity.md) | | [optional]
|
||||
**aid** | **str** | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. | [optional]
|
||||
**summary** | **str** | A brief summary describing the cause of the event. | [optional] [readonly]
|
||||
**agent_type** | [**EventAgentType**](EventAgentType.md) | | [optional]
|
||||
**affected_tests** | [**AffectedTests**](AffectedTests.md) | | [optional]
|
||||
**affected_targets** | [**AffectedTargets**](AffectedTargets.md) | | [optional]
|
||||
**affected_agents** | [**AffectedAgents**](AffectedAgents.md) | | [optional]
|
||||
|
||||
@ -9,10 +9,11 @@ Name | Type | Description | Notes
|
||||
**type_name** | **str** | Event type name. Examples include, Local Agent Issue, Network Path Issue, Network Outage, DNS Issue, Server Issue, and Proxy Issue. | [optional] [readonly]
|
||||
**state** | [**EventState**](EventState.md) | | [optional]
|
||||
**start_date** | **datetime** | The start date and time (in UTC, ISO 8601 format) when the event was first detected. | [optional] [readonly]
|
||||
**end_date** | **datetime** | The end date and time (in UTC, ISO 8601 format) when the event was resolved (due to timeout). This value is populated for \"ongoing\" events. | [optional] [readonly]
|
||||
**end_date** | **datetime** | The end date and time (in UTC, ISO 8601 format) when the event was resolved (due to timeout). This value is null for \"ongoing\" (active) events and is populated once the event is resolved. | [optional] [readonly]
|
||||
**severity** | [**EventAlertSeverity**](EventAlertSeverity.md) | | [optional]
|
||||
**aid** | **str** | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. | [optional]
|
||||
**summary** | **str** | A brief summary describing the cause of the event. | [optional] [readonly]
|
||||
**agent_type** | [**EventAgentType**](EventAgentType.md) | | [optional]
|
||||
**affected_tests** | [**AffectedTests**](AffectedTests.md) | | [optional]
|
||||
**affected_targets** | [**AffectedTargets**](AffectedTargets.md) | | [optional]
|
||||
**affected_agents** | [**AffectedAgents**](AffectedAgents.md) | | [optional]
|
||||
|
||||
@ -9,10 +9,11 @@ Name | Type | Description | Notes
|
||||
**type_name** | **str** | Event type name. Examples include, Local Agent Issue, Network Path Issue, Network Outage, DNS Issue, Server Issue, and Proxy Issue. | [optional] [readonly]
|
||||
**state** | [**EventState**](EventState.md) | | [optional]
|
||||
**start_date** | **datetime** | The start date and time (in UTC, ISO 8601 format) when the event was first detected. | [optional] [readonly]
|
||||
**end_date** | **datetime** | The end date and time (in UTC, ISO 8601 format) when the event was resolved (due to timeout). This value is populated for \"ongoing\" events. | [optional] [readonly]
|
||||
**end_date** | **datetime** | The end date and time (in UTC, ISO 8601 format) when the event was resolved (due to timeout). This value is null for \"ongoing\" (active) events and is populated once the event is resolved. | [optional] [readonly]
|
||||
**severity** | [**EventAlertSeverity**](EventAlertSeverity.md) | | [optional]
|
||||
**aid** | **str** | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. | [optional]
|
||||
**summary** | **str** | A brief summary describing the cause of the event. | [optional] [readonly]
|
||||
**agent_type** | [**EventAgentType**](EventAgentType.md) | | [optional]
|
||||
**affected_tests** | [**AffectedTests**](AffectedTests.md) | | [optional]
|
||||
**affected_targets** | [**AffectedTargets**](AffectedTargets.md) | | [optional]
|
||||
**affected_agents** | [**AffectedAgents**](AffectedAgents.md) | | [optional]
|
||||
|
||||
@ -9,7 +9,7 @@ Name | Type | Description | Notes
|
||||
**type_name** | **str** | Event type name. Examples include, Local Agent Issue, Network Path Issue, Network Outage, DNS Issue, Server Issue, and Proxy Issue. | [optional] [readonly]
|
||||
**state** | [**EventState**](EventState.md) | | [optional]
|
||||
**start_date** | **datetime** | The start date and time (in UTC, ISO 8601 format) when the event was first detected. | [optional] [readonly]
|
||||
**end_date** | **datetime** | The end date and time (in UTC, ISO 8601 format) when the event was resolved (due to timeout). This value is populated for \"ongoing\" events. | [optional] [readonly]
|
||||
**end_date** | **datetime** | The end date and time (in UTC, ISO 8601 format) when the event was resolved (due to timeout). This value is null for \"ongoing\" (active) events and is populated once the event is resolved. | [optional] [readonly]
|
||||
**severity** | [**EventAlertSeverity**](EventAlertSeverity.md) | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
@ -9,10 +9,11 @@ Name | Type | Description | Notes
|
||||
**type_name** | **str** | Event type name. Examples include, Local Agent Issue, Network Path Issue, Network Outage, DNS Issue, Server Issue, and Proxy Issue. | [optional] [readonly]
|
||||
**state** | [**EventState**](EventState.md) | | [optional]
|
||||
**start_date** | **datetime** | The start date and time (in UTC, ISO 8601 format) when the event was first detected. | [optional] [readonly]
|
||||
**end_date** | **datetime** | The end date and time (in UTC, ISO 8601 format) when the event was resolved (due to timeout). This value is populated for \"ongoing\" events. | [optional] [readonly]
|
||||
**end_date** | **datetime** | The end date and time (in UTC, ISO 8601 format) when the event was resolved (due to timeout). This value is null for \"ongoing\" (active) events and is populated once the event is resolved. | [optional] [readonly]
|
||||
**severity** | [**EventAlertSeverity**](EventAlertSeverity.md) | | [optional]
|
||||
**aid** | **str** | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. | [optional]
|
||||
**summary** | **str** | A brief summary describing the cause of the event. | [optional] [readonly]
|
||||
**agent_type** | [**EventAgentType**](EventAgentType.md) | | [optional]
|
||||
**affected_tests** | [**AffectedTests**](AffectedTests.md) | | [optional]
|
||||
**affected_targets** | [**AffectedTargets**](AffectedTargets.md) | | [optional]
|
||||
**affected_agents** | [**AffectedAgents**](AffectedAgents.md) | | [optional]
|
||||
|
||||
@ -9,10 +9,11 @@ Name | Type | Description | Notes
|
||||
**type_name** | **str** | Event type name. Examples include, Local Agent Issue, Network Path Issue, Network Outage, DNS Issue, Server Issue, and Proxy Issue. | [optional] [readonly]
|
||||
**state** | [**EventState**](EventState.md) | | [optional]
|
||||
**start_date** | **datetime** | The start date and time (in UTC, ISO 8601 format) when the event was first detected. | [optional] [readonly]
|
||||
**end_date** | **datetime** | The end date and time (in UTC, ISO 8601 format) when the event was resolved (due to timeout). This value is populated for \"ongoing\" events. | [optional] [readonly]
|
||||
**end_date** | **datetime** | The end date and time (in UTC, ISO 8601 format) when the event was resolved (due to timeout). This value is null for \"ongoing\" (active) events and is populated once the event is resolved. | [optional] [readonly]
|
||||
**severity** | [**EventAlertSeverity**](EventAlertSeverity.md) | | [optional]
|
||||
**aid** | **str** | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. | [optional]
|
||||
**summary** | **str** | A brief summary describing the cause of the event. | [optional] [readonly]
|
||||
**agent_type** | [**EventAgentType**](EventAgentType.md) | | [optional]
|
||||
**affected_tests** | [**AffectedTests**](AffectedTests.md) | | [optional]
|
||||
**affected_targets** | [**AffectedTargets**](AffectedTargets.md) | | [optional]
|
||||
**affected_agents** | [**AffectedAgents**](AffectedAgents.md) | | [optional]
|
||||
|
||||
44
thousandeyes-sdk-event-detection/docs/VpnEventDetail.md
Normal file
44
thousandeyes-sdk-event-detection/docs/VpnEventDetail.md
Normal file
@ -0,0 +1,44 @@
|
||||
# VpnEventDetail
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **str** | A unique ID for each event. | [optional] [readonly]
|
||||
**type_name** | **str** | Event type name. Examples include, Local Agent Issue, Network Path Issue, Network Outage, DNS Issue, Server Issue, and Proxy Issue. | [optional] [readonly]
|
||||
**state** | [**EventState**](EventState.md) | | [optional]
|
||||
**start_date** | **datetime** | The start date and time (in UTC, ISO 8601 format) when the event was first detected. | [optional] [readonly]
|
||||
**end_date** | **datetime** | The end date and time (in UTC, ISO 8601 format) when the event was resolved (due to timeout). This value is null for \"ongoing\" (active) events and is populated once the event is resolved. | [optional] [readonly]
|
||||
**severity** | [**EventAlertSeverity**](EventAlertSeverity.md) | | [optional]
|
||||
**aid** | **str** | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. | [optional]
|
||||
**summary** | **str** | A brief summary describing the cause of the event. | [optional] [readonly]
|
||||
**agent_type** | [**EventAgentType**](EventAgentType.md) | | [optional]
|
||||
**affected_tests** | [**AffectedTests**](AffectedTests.md) | | [optional]
|
||||
**affected_targets** | [**AffectedTargets**](AffectedTargets.md) | | [optional]
|
||||
**affected_agents** | [**AffectedAgents**](AffectedAgents.md) | | [optional]
|
||||
**cause** | **List[str]** | The cause of the error. | [optional]
|
||||
**links** | [**SelfLinks**](SelfLinks.md) | | [optional]
|
||||
**type** | **str** | VPN event type. |
|
||||
**grouping** | [**VpnEventGrouping**](VpnEventGrouping.md) | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from thousandeyes_sdk.event_detection.models.vpn_event_detail import VpnEventDetail
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of VpnEventDetail from a JSON string
|
||||
vpn_event_detail_instance = VpnEventDetail.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(VpnEventDetail.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
vpn_event_detail_dict = vpn_event_detail_instance.to_dict()
|
||||
# create an instance of VpnEventDetail from a dict
|
||||
vpn_event_detail_from_dict = VpnEventDetail.from_dict(vpn_event_detail_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-event-detection/docs/VpnEventGrouping.md
Normal file
30
thousandeyes-sdk-event-detection/docs/VpnEventGrouping.md
Normal file
@ -0,0 +1,30 @@
|
||||
# VpnEventGrouping
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**vpn_type** | **str** | VPN type (for vpn events). | [optional] [readonly]
|
||||
**vpn_server_ip_address** | **str** | VPN server IP address (for vpn events). | [optional] [readonly]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from thousandeyes_sdk.event_detection.models.vpn_event_grouping import VpnEventGrouping
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of VpnEventGrouping from a JSON string
|
||||
vpn_event_grouping_instance = VpnEventGrouping.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(VpnEventGrouping.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
vpn_event_grouping_dict = vpn_event_grouping_instance.to_dict()
|
||||
# create an instance of VpnEventGrouping from a dict
|
||||
vpn_event_grouping_from_dict = VpnEventGrouping.from_dict(vpn_event_grouping_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)
|
||||
|
||||
|
||||
44
thousandeyes-sdk-event-detection/docs/WirelessEventDetail.md
Normal file
44
thousandeyes-sdk-event-detection/docs/WirelessEventDetail.md
Normal file
@ -0,0 +1,44 @@
|
||||
# WirelessEventDetail
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **str** | A unique ID for each event. | [optional] [readonly]
|
||||
**type_name** | **str** | Event type name. Examples include, Local Agent Issue, Network Path Issue, Network Outage, DNS Issue, Server Issue, and Proxy Issue. | [optional] [readonly]
|
||||
**state** | [**EventState**](EventState.md) | | [optional]
|
||||
**start_date** | **datetime** | The start date and time (in UTC, ISO 8601 format) when the event was first detected. | [optional] [readonly]
|
||||
**end_date** | **datetime** | The end date and time (in UTC, ISO 8601 format) when the event was resolved (due to timeout). This value is null for \"ongoing\" (active) events and is populated once the event is resolved. | [optional] [readonly]
|
||||
**severity** | [**EventAlertSeverity**](EventAlertSeverity.md) | | [optional]
|
||||
**aid** | **str** | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. | [optional]
|
||||
**summary** | **str** | A brief summary describing the cause of the event. | [optional] [readonly]
|
||||
**agent_type** | [**EventAgentType**](EventAgentType.md) | | [optional]
|
||||
**affected_tests** | [**AffectedTests**](AffectedTests.md) | | [optional]
|
||||
**affected_targets** | [**AffectedTargets**](AffectedTargets.md) | | [optional]
|
||||
**affected_agents** | [**AffectedAgents**](AffectedAgents.md) | | [optional]
|
||||
**cause** | **List[str]** | The cause of the error. | [optional]
|
||||
**links** | [**SelfLinks**](SelfLinks.md) | | [optional]
|
||||
**type** | **str** | Wireless event type. |
|
||||
**grouping** | [**WirelessEventGrouping**](WirelessEventGrouping.md) | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from thousandeyes_sdk.event_detection.models.wireless_event_detail import WirelessEventDetail
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of WirelessEventDetail from a JSON string
|
||||
wireless_event_detail_instance = WirelessEventDetail.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(WirelessEventDetail.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
wireless_event_detail_dict = wireless_event_detail_instance.to_dict()
|
||||
# create an instance of WirelessEventDetail from a dict
|
||||
wireless_event_detail_from_dict = WirelessEventDetail.from_dict(wireless_event_detail_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 @@
|
||||
# WirelessEventGrouping
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**ssid** | **str** | Wireless network SSID (for wireless events). | [optional] [readonly]
|
||||
**bssid** | **str** | Wireless network BSSID (for wireless events). | [optional] [readonly]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from thousandeyes_sdk.event_detection.models.wireless_event_grouping import WirelessEventGrouping
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of WirelessEventGrouping from a JSON string
|
||||
wireless_event_grouping_instance = WirelessEventGrouping.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(WirelessEventGrouping.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
wireless_event_grouping_dict = wireless_event_grouping_instance.to_dict()
|
||||
# create an instance of WirelessEventGrouping from a dict
|
||||
wireless_event_grouping_from_dict = WirelessEventGrouping.from_dict(wireless_event_grouping_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)
|
||||
|
||||
|
||||
@ -22,15 +22,28 @@ from thousandeyes_sdk.event_detection.models.affected_agents import AffectedAgen
|
||||
from thousandeyes_sdk.event_detection.models.affected_count import AffectedCount
|
||||
from thousandeyes_sdk.event_detection.models.affected_targets import AffectedTargets
|
||||
from thousandeyes_sdk.event_detection.models.affected_tests import AffectedTests
|
||||
from thousandeyes_sdk.event_detection.models.agent_branch_event_detail import AgentBranchEventDetail
|
||||
from thousandeyes_sdk.event_detection.models.agent_branch_event_grouping import AgentBranchEventGrouping
|
||||
from thousandeyes_sdk.event_detection.models.agent_event_detail import AgentEventDetail
|
||||
from thousandeyes_sdk.event_detection.models.agent_event_grouping import AgentEventGrouping
|
||||
from thousandeyes_sdk.event_detection.models.agent_links import AgentLinks
|
||||
from thousandeyes_sdk.event_detection.models.agent_local_event_detail import AgentLocalEventDetail
|
||||
from thousandeyes_sdk.event_detection.models.agent_local_event_grouping import AgentLocalEventGrouping
|
||||
from thousandeyes_sdk.event_detection.models.api_affected_target import ApiAffectedTarget
|
||||
from thousandeyes_sdk.event_detection.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType
|
||||
from thousandeyes_sdk.event_detection.models.application_event_detail import ApplicationEventDetail
|
||||
from thousandeyes_sdk.event_detection.models.application_event_grouping import ApplicationEventGrouping
|
||||
from thousandeyes_sdk.event_detection.models.dns_event_detail import DnsEventDetail
|
||||
from thousandeyes_sdk.event_detection.models.dns_event_grouping import DnsEventGrouping
|
||||
from thousandeyes_sdk.event_detection.models.dns_name_event_detail import DnsNameEventDetail
|
||||
from thousandeyes_sdk.event_detection.models.dns_name_event_grouping import DnsNameEventGrouping
|
||||
from thousandeyes_sdk.event_detection.models.dns_server_event_detail import DnsServerEventDetail
|
||||
from thousandeyes_sdk.event_detection.models.dns_server_event_grouping import DnsServerEventGrouping
|
||||
from thousandeyes_sdk.event_detection.models.domain_event_detail import DomainEventDetail
|
||||
from thousandeyes_sdk.event_detection.models.domain_event_grouping import DomainEventGrouping
|
||||
from thousandeyes_sdk.event_detection.models.error import Error
|
||||
from thousandeyes_sdk.event_detection.models.event import Event
|
||||
from thousandeyes_sdk.event_detection.models.event_affected_agent_type import EventAffectedAgentType
|
||||
from thousandeyes_sdk.event_detection.models.event_agent_type import EventAgentType
|
||||
from thousandeyes_sdk.event_detection.models.event_alert_severity import EventAlertSeverity
|
||||
from thousandeyes_sdk.event_detection.models.event_api_affected_agent import EventApiAffectedAgent
|
||||
from thousandeyes_sdk.event_detection.models.event_api_affected_test import EventApiAffectedTest
|
||||
@ -40,7 +53,11 @@ from thousandeyes_sdk.event_detection.models.event_state import EventState
|
||||
from thousandeyes_sdk.event_detection.models.event_test_links import EventTestLinks
|
||||
from thousandeyes_sdk.event_detection.models.event_type import EventType
|
||||
from thousandeyes_sdk.event_detection.models.events import Events
|
||||
from thousandeyes_sdk.event_detection.models.gateway_event_detail import GatewayEventDetail
|
||||
from thousandeyes_sdk.event_detection.models.gateway_event_grouping import GatewayEventGrouping
|
||||
from thousandeyes_sdk.event_detection.models.link import Link
|
||||
from thousandeyes_sdk.event_detection.models.name_server_event_detail import NameServerEventDetail
|
||||
from thousandeyes_sdk.event_detection.models.name_server_event_grouping import NameServerEventGrouping
|
||||
from thousandeyes_sdk.event_detection.models.network_event_detail import NetworkEventDetail
|
||||
from thousandeyes_sdk.event_detection.models.network_event_grouping import NetworkEventGrouping
|
||||
from thousandeyes_sdk.event_detection.models.network_pop_event_detail import NetworkPopEventDetail
|
||||
@ -57,3 +74,7 @@ from thousandeyes_sdk.event_detection.models.test_type import TestType
|
||||
from thousandeyes_sdk.event_detection.models.unauthorized_error import UnauthorizedError
|
||||
from thousandeyes_sdk.event_detection.models.validation_error import ValidationError
|
||||
from thousandeyes_sdk.event_detection.models.validation_error_item import ValidationErrorItem
|
||||
from thousandeyes_sdk.event_detection.models.vpn_event_detail import VpnEventDetail
|
||||
from thousandeyes_sdk.event_detection.models.vpn_event_grouping import VpnEventGrouping
|
||||
from thousandeyes_sdk.event_detection.models.wireless_event_detail import WirelessEventDetail
|
||||
from thousandeyes_sdk.event_detection.models.wireless_event_grouping import WirelessEventGrouping
|
||||
|
||||
@ -19,7 +19,7 @@ from importlib.metadata import version
|
||||
import thousandeyes_sdk.event_detection.models
|
||||
|
||||
from datetime import datetime
|
||||
from pydantic import Field, StrictInt, StrictStr, field_validator
|
||||
from pydantic import Field, StrictBool, StrictInt, StrictStr, field_validator
|
||||
from typing import Optional
|
||||
from typing_extensions import Annotated
|
||||
from thousandeyes_sdk.event_detection.models.event_detail import EventDetail
|
||||
@ -350,6 +350,7 @@ class EventsApi:
|
||||
end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None,
|
||||
max: Annotated[Optional[StrictInt], Field(description="(Optional) Maximum number of objects to return.")] = None,
|
||||
cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None,
|
||||
ongoing: Annotated[Optional[StrictBool], Field(description="When set to `true`, only ongoing (active) events whose start date is within the specified time window are included in the response. When set to `false`, ongoing events are excluded from the response. If not set, both ongoing and concluded events appear in the response.")] = None,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@ -379,6 +380,8 @@ class EventsApi:
|
||||
:type max: int
|
||||
:param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.
|
||||
:type cursor: str
|
||||
:param ongoing: When set to `true`, only ongoing (active) events whose start date is within the specified time window are included in the response. When set to `false`, ongoing events are excluded from the response. If not set, both ongoing and concluded events appear in the response.
|
||||
:type ongoing: bool
|
||||
: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
|
||||
@ -403,7 +406,7 @@ class EventsApi:
|
||||
return PaginationIterable(
|
||||
self.get_events,
|
||||
lambda data: data.events if data and data.events else [],
|
||||
aid = aid, window = window, start_date = start_date, end_date = end_date, max = max, cursor = cursor,
|
||||
aid = aid, window = window, start_date = start_date, end_date = end_date, max = max, cursor = cursor, ongoing = ongoing,
|
||||
_request_timeout=_request_timeout,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
@ -421,6 +424,7 @@ class EventsApi:
|
||||
end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None,
|
||||
max: Annotated[Optional[StrictInt], Field(description="(Optional) Maximum number of objects to return.")] = None,
|
||||
cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None,
|
||||
ongoing: Annotated[Optional[StrictBool], Field(description="When set to `true`, only ongoing (active) events whose start date is within the specified time window are included in the response. When set to `false`, ongoing events are excluded from the response. If not set, both ongoing and concluded events appear in the response.")] = None,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@ -450,6 +454,8 @@ class EventsApi:
|
||||
:type max: int
|
||||
:param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.
|
||||
:type cursor: str
|
||||
:param ongoing: When set to `true`, only ongoing (active) events whose start date is within the specified time window are included in the response. When set to `false`, ongoing events are excluded from the response. If not set, both ongoing and concluded events appear in the response.
|
||||
:type ongoing: bool
|
||||
: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
|
||||
@ -479,6 +485,7 @@ class EventsApi:
|
||||
end_date=end_date,
|
||||
max=max,
|
||||
cursor=cursor,
|
||||
ongoing=ongoing,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
@ -516,6 +523,7 @@ class EventsApi:
|
||||
end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None,
|
||||
max: Annotated[Optional[StrictInt], Field(description="(Optional) Maximum number of objects to return.")] = None,
|
||||
cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None,
|
||||
ongoing: Annotated[Optional[StrictBool], Field(description="When set to `true`, only ongoing (active) events whose start date is within the specified time window are included in the response. When set to `false`, ongoing events are excluded from the response. If not set, both ongoing and concluded events appear in the response.")] = None,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@ -545,6 +553,8 @@ class EventsApi:
|
||||
:type max: int
|
||||
:param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.
|
||||
:type cursor: str
|
||||
:param ongoing: When set to `true`, only ongoing (active) events whose start date is within the specified time window are included in the response. When set to `false`, ongoing events are excluded from the response. If not set, both ongoing and concluded events appear in the response.
|
||||
:type ongoing: bool
|
||||
: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
|
||||
@ -574,6 +584,7 @@ class EventsApi:
|
||||
end_date=end_date,
|
||||
max=max,
|
||||
cursor=cursor,
|
||||
ongoing=ongoing,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
@ -611,6 +622,7 @@ class EventsApi:
|
||||
end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None,
|
||||
max: Annotated[Optional[StrictInt], Field(description="(Optional) Maximum number of objects to return.")] = None,
|
||||
cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None,
|
||||
ongoing: Annotated[Optional[StrictBool], Field(description="When set to `true`, only ongoing (active) events whose start date is within the specified time window are included in the response. When set to `false`, ongoing events are excluded from the response. If not set, both ongoing and concluded events appear in the response.")] = None,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@ -640,6 +652,8 @@ class EventsApi:
|
||||
:type max: int
|
||||
:param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.
|
||||
:type cursor: str
|
||||
:param ongoing: When set to `true`, only ongoing (active) events whose start date is within the specified time window are included in the response. When set to `false`, ongoing events are excluded from the response. If not set, both ongoing and concluded events appear in the response.
|
||||
:type ongoing: bool
|
||||
: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
|
||||
@ -669,6 +683,7 @@ class EventsApi:
|
||||
end_date=end_date,
|
||||
max=max,
|
||||
cursor=cursor,
|
||||
ongoing=ongoing,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
@ -700,6 +715,7 @@ class EventsApi:
|
||||
end_date,
|
||||
max,
|
||||
cursor,
|
||||
ongoing,
|
||||
_request_auth,
|
||||
_content_type,
|
||||
_headers,
|
||||
@ -762,6 +778,10 @@ class EventsApi:
|
||||
|
||||
_query_params.append(('cursor', cursor))
|
||||
|
||||
if ongoing is not None:
|
||||
|
||||
_query_params.append(('ongoing', ongoing))
|
||||
|
||||
# process the header parameters
|
||||
# process the form parameters
|
||||
# process the body parameter
|
||||
|
||||
@ -17,15 +17,28 @@ from thousandeyes_sdk.event_detection.models.affected_agents import AffectedAgen
|
||||
from thousandeyes_sdk.event_detection.models.affected_count import AffectedCount
|
||||
from thousandeyes_sdk.event_detection.models.affected_targets import AffectedTargets
|
||||
from thousandeyes_sdk.event_detection.models.affected_tests import AffectedTests
|
||||
from thousandeyes_sdk.event_detection.models.agent_branch_event_detail import AgentBranchEventDetail
|
||||
from thousandeyes_sdk.event_detection.models.agent_branch_event_grouping import AgentBranchEventGrouping
|
||||
from thousandeyes_sdk.event_detection.models.agent_event_detail import AgentEventDetail
|
||||
from thousandeyes_sdk.event_detection.models.agent_event_grouping import AgentEventGrouping
|
||||
from thousandeyes_sdk.event_detection.models.agent_links import AgentLinks
|
||||
from thousandeyes_sdk.event_detection.models.agent_local_event_detail import AgentLocalEventDetail
|
||||
from thousandeyes_sdk.event_detection.models.agent_local_event_grouping import AgentLocalEventGrouping
|
||||
from thousandeyes_sdk.event_detection.models.api_affected_target import ApiAffectedTarget
|
||||
from thousandeyes_sdk.event_detection.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType
|
||||
from thousandeyes_sdk.event_detection.models.application_event_detail import ApplicationEventDetail
|
||||
from thousandeyes_sdk.event_detection.models.application_event_grouping import ApplicationEventGrouping
|
||||
from thousandeyes_sdk.event_detection.models.dns_event_detail import DnsEventDetail
|
||||
from thousandeyes_sdk.event_detection.models.dns_event_grouping import DnsEventGrouping
|
||||
from thousandeyes_sdk.event_detection.models.dns_name_event_detail import DnsNameEventDetail
|
||||
from thousandeyes_sdk.event_detection.models.dns_name_event_grouping import DnsNameEventGrouping
|
||||
from thousandeyes_sdk.event_detection.models.dns_server_event_detail import DnsServerEventDetail
|
||||
from thousandeyes_sdk.event_detection.models.dns_server_event_grouping import DnsServerEventGrouping
|
||||
from thousandeyes_sdk.event_detection.models.domain_event_detail import DomainEventDetail
|
||||
from thousandeyes_sdk.event_detection.models.domain_event_grouping import DomainEventGrouping
|
||||
from thousandeyes_sdk.event_detection.models.error import Error
|
||||
from thousandeyes_sdk.event_detection.models.event import Event
|
||||
from thousandeyes_sdk.event_detection.models.event_affected_agent_type import EventAffectedAgentType
|
||||
from thousandeyes_sdk.event_detection.models.event_agent_type import EventAgentType
|
||||
from thousandeyes_sdk.event_detection.models.event_alert_severity import EventAlertSeverity
|
||||
from thousandeyes_sdk.event_detection.models.event_api_affected_agent import EventApiAffectedAgent
|
||||
from thousandeyes_sdk.event_detection.models.event_api_affected_test import EventApiAffectedTest
|
||||
@ -35,7 +48,11 @@ from thousandeyes_sdk.event_detection.models.event_state import EventState
|
||||
from thousandeyes_sdk.event_detection.models.event_test_links import EventTestLinks
|
||||
from thousandeyes_sdk.event_detection.models.event_type import EventType
|
||||
from thousandeyes_sdk.event_detection.models.events import Events
|
||||
from thousandeyes_sdk.event_detection.models.gateway_event_detail import GatewayEventDetail
|
||||
from thousandeyes_sdk.event_detection.models.gateway_event_grouping import GatewayEventGrouping
|
||||
from thousandeyes_sdk.event_detection.models.link import Link
|
||||
from thousandeyes_sdk.event_detection.models.name_server_event_detail import NameServerEventDetail
|
||||
from thousandeyes_sdk.event_detection.models.name_server_event_grouping import NameServerEventGrouping
|
||||
from thousandeyes_sdk.event_detection.models.network_event_detail import NetworkEventDetail
|
||||
from thousandeyes_sdk.event_detection.models.network_event_grouping import NetworkEventGrouping
|
||||
from thousandeyes_sdk.event_detection.models.network_pop_event_detail import NetworkPopEventDetail
|
||||
@ -52,3 +69,7 @@ from thousandeyes_sdk.event_detection.models.test_type import TestType
|
||||
from thousandeyes_sdk.event_detection.models.unauthorized_error import UnauthorizedError
|
||||
from thousandeyes_sdk.event_detection.models.validation_error import ValidationError
|
||||
from thousandeyes_sdk.event_detection.models.validation_error_item import ValidationErrorItem
|
||||
from thousandeyes_sdk.event_detection.models.vpn_event_detail import VpnEventDetail
|
||||
from thousandeyes_sdk.event_detection.models.vpn_event_grouping import VpnEventGrouping
|
||||
from thousandeyes_sdk.event_detection.models.wireless_event_detail import WirelessEventDetail
|
||||
from thousandeyes_sdk.event_detection.models.wireless_event_grouping import WirelessEventGrouping
|
||||
|
||||
@ -0,0 +1,164 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Event Detection API
|
||||
|
||||
Event detection occurs when ThousandEyes identifies that error signals related to a component (proxy, network node, AS, server etc) have deviated from the baselines established by events. * To determine this, ThousandEyes takes the test results from all accounts groups within an organization, and analyzes that data. * Noisy test results (those that have too many errors in a short window) are removed until they stabilize, and the rest of the results are tagged with the components associated with that test result (for example, proxy, network, or server). * Next, any increase in failures from the test results and each component helps in determining the problem domain and which component may be at fault. * When this failure rate increases beyond a pre-defined threshold (set by the algorithm), an event is triggered and an email notification is sent to the user (if they've enabled email alerts). With the Events API, you can perform the following tasks on the ThousandEyes platform: * **Retrieve Events**: Obtain a list of events and detailed information for each event. For more information about events, see [Event Detection](https://docs.thousandeyes.com/product-documentation/event-detection).
|
||||
|
||||
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, field_validator
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing_extensions import Annotated
|
||||
from thousandeyes_sdk.event_detection.models.affected_agents import AffectedAgents
|
||||
from thousandeyes_sdk.event_detection.models.affected_targets import AffectedTargets
|
||||
from thousandeyes_sdk.event_detection.models.affected_tests import AffectedTests
|
||||
from thousandeyes_sdk.event_detection.models.agent_branch_event_grouping import AgentBranchEventGrouping
|
||||
from thousandeyes_sdk.event_detection.models.event_agent_type import EventAgentType
|
||||
from thousandeyes_sdk.event_detection.models.event_alert_severity import EventAlertSeverity
|
||||
from thousandeyes_sdk.event_detection.models.event_state import EventState
|
||||
from thousandeyes_sdk.event_detection.models.self_links import SelfLinks
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class AgentBranchEventDetail(BaseModel):
|
||||
"""
|
||||
AgentBranchEventDetail
|
||||
""" # noqa: E501
|
||||
id: Optional[StrictStr] = Field(default=None, description="A unique ID for each event.")
|
||||
type_name: Optional[StrictStr] = Field(default=None, description="Event type name. Examples include, Local Agent Issue, Network Path Issue, Network Outage, DNS Issue, Server Issue, and Proxy Issue.", alias="typeName")
|
||||
state: Optional[EventState] = None
|
||||
start_date: Optional[datetime] = Field(default=None, description="The start date and time (in UTC, ISO 8601 format) when the event was first detected.", alias="startDate")
|
||||
end_date: Optional[datetime] = Field(default=None, description="The end date and time (in UTC, ISO 8601 format) when the event was resolved (due to timeout). This value is null for \"ongoing\" (active) events and is populated once the event is resolved.", alias="endDate")
|
||||
severity: Optional[EventAlertSeverity] = None
|
||||
aid: Optional[StrictStr] = Field(default=None, description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint.")
|
||||
summary: Optional[StrictStr] = Field(default=None, description="A brief summary describing the cause of the event.")
|
||||
agent_type: Optional[EventAgentType] = Field(default=None, alias="agentType")
|
||||
affected_tests: Optional[AffectedTests] = Field(default=None, alias="affectedTests")
|
||||
affected_targets: Optional[AffectedTargets] = Field(default=None, alias="affectedTargets")
|
||||
affected_agents: Optional[AffectedAgents] = Field(default=None, alias="affectedAgents")
|
||||
cause: Optional[List[StrictStr]] = Field(default=None, description="The cause of the error.")
|
||||
links: Optional[SelfLinks] = Field(default=None, alias="_links")
|
||||
type: Annotated[str, Field(strict=True)] = Field(description="Agent branch event type.")
|
||||
grouping: Optional[AgentBranchEventGrouping] = None
|
||||
__properties: ClassVar[List[str]] = ["id", "typeName", "state", "startDate", "endDate", "severity", "aid", "summary", "agentType", "affectedTests", "affectedTargets", "affectedAgents", "cause", "_links", "type", "grouping"]
|
||||
|
||||
@field_validator('type')
|
||||
def type_validate_regular_expression(cls, value):
|
||||
"""Validates the regular expression"""
|
||||
if not re.match(r"^agent-branch$", value):
|
||||
raise ValueError(r"must validate the regular expression /^agent-branch$/")
|
||||
return 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 AgentBranchEventDetail 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.
|
||||
* OpenAPI `readOnly` fields are excluded.
|
||||
* OpenAPI `readOnly` fields are excluded.
|
||||
* OpenAPI `readOnly` fields are excluded.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
"id",
|
||||
"type_name",
|
||||
"start_date",
|
||||
"end_date",
|
||||
"summary",
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# override the default output from pydantic by calling `to_dict()` of affected_tests
|
||||
if self.affected_tests:
|
||||
_dict['affectedTests'] = self.affected_tests.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of affected_targets
|
||||
if self.affected_targets:
|
||||
_dict['affectedTargets'] = self.affected_targets.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of affected_agents
|
||||
if self.affected_agents:
|
||||
_dict['affectedAgents'] = self.affected_agents.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of links
|
||||
if self.links:
|
||||
_dict['_links'] = self.links.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of grouping
|
||||
if self.grouping:
|
||||
_dict['grouping'] = self.grouping.to_dict()
|
||||
# set to None if end_date (nullable) is None
|
||||
# and model_fields_set contains the field
|
||||
if self.end_date is None and "end_date" in self.model_fields_set:
|
||||
_dict['endDate'] = None
|
||||
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of AgentBranchEventDetail 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"),
|
||||
"typeName": obj.get("typeName"),
|
||||
"state": obj.get("state"),
|
||||
"startDate": obj.get("startDate"),
|
||||
"endDate": obj.get("endDate"),
|
||||
"severity": obj.get("severity"),
|
||||
"aid": obj.get("aid"),
|
||||
"summary": obj.get("summary"),
|
||||
"agentType": obj.get("agentType"),
|
||||
"affectedTests": AffectedTests.from_dict(obj["affectedTests"]) if obj.get("affectedTests") is not None else None,
|
||||
"affectedTargets": AffectedTargets.from_dict(obj["affectedTargets"]) if obj.get("affectedTargets") is not None else None,
|
||||
"affectedAgents": AffectedAgents.from_dict(obj["affectedAgents"]) if obj.get("affectedAgents") is not None else None,
|
||||
"cause": obj.get("cause"),
|
||||
"_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None,
|
||||
"type": obj.get("type"),
|
||||
"grouping": AgentBranchEventGrouping.from_dict(obj["grouping"]) if obj.get("grouping") is not None else None
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@ -0,0 +1,93 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Event Detection API
|
||||
|
||||
Event detection occurs when ThousandEyes identifies that error signals related to a component (proxy, network node, AS, server etc) have deviated from the baselines established by events. * To determine this, ThousandEyes takes the test results from all accounts groups within an organization, and analyzes that data. * Noisy test results (those that have too many errors in a short window) are removed until they stabilize, and the rest of the results are tagged with the components associated with that test result (for example, proxy, network, or server). * Next, any increase in failures from the test results and each component helps in determining the problem domain and which component may be at fault. * When this failure rate increases beyond a pre-defined threshold (set by the algorithm), an event is triggered and an email notification is sent to the user (if they've enabled email alerts). With the Events API, you can perform the following tasks on the ThousandEyes platform: * **Retrieve Events**: Obtain a list of events and detailed information for each event. For more information about events, see [Event Detection](https://docs.thousandeyes.com/product-documentation/event-detection).
|
||||
|
||||
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 AgentBranchEventGrouping(BaseModel):
|
||||
"""
|
||||
AgentBranchEventGrouping
|
||||
""" # noqa: E501
|
||||
asn: Optional[StrictInt] = Field(default=None, description="AS number of the agent's network (for agent-branch events).")
|
||||
asn_city: Optional[StrictStr] = Field(default=None, description="City associated with the agent's AS (for agent-branch events).", alias="asnCity")
|
||||
__properties: ClassVar[List[str]] = ["asn", "asnCity"]
|
||||
|
||||
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 AgentBranchEventGrouping 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([
|
||||
"asn",
|
||||
"asn_city",
|
||||
])
|
||||
|
||||
_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 AgentBranchEventGrouping from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"asn": obj.get("asn"),
|
||||
"asnCity": obj.get("asnCity")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@ -0,0 +1,164 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Event Detection API
|
||||
|
||||
Event detection occurs when ThousandEyes identifies that error signals related to a component (proxy, network node, AS, server etc) have deviated from the baselines established by events. * To determine this, ThousandEyes takes the test results from all accounts groups within an organization, and analyzes that data. * Noisy test results (those that have too many errors in a short window) are removed until they stabilize, and the rest of the results are tagged with the components associated with that test result (for example, proxy, network, or server). * Next, any increase in failures from the test results and each component helps in determining the problem domain and which component may be at fault. * When this failure rate increases beyond a pre-defined threshold (set by the algorithm), an event is triggered and an email notification is sent to the user (if they've enabled email alerts). With the Events API, you can perform the following tasks on the ThousandEyes platform: * **Retrieve Events**: Obtain a list of events and detailed information for each event. For more information about events, see [Event Detection](https://docs.thousandeyes.com/product-documentation/event-detection).
|
||||
|
||||
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, field_validator
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing_extensions import Annotated
|
||||
from thousandeyes_sdk.event_detection.models.affected_agents import AffectedAgents
|
||||
from thousandeyes_sdk.event_detection.models.affected_targets import AffectedTargets
|
||||
from thousandeyes_sdk.event_detection.models.affected_tests import AffectedTests
|
||||
from thousandeyes_sdk.event_detection.models.agent_event_grouping import AgentEventGrouping
|
||||
from thousandeyes_sdk.event_detection.models.event_agent_type import EventAgentType
|
||||
from thousandeyes_sdk.event_detection.models.event_alert_severity import EventAlertSeverity
|
||||
from thousandeyes_sdk.event_detection.models.event_state import EventState
|
||||
from thousandeyes_sdk.event_detection.models.self_links import SelfLinks
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class AgentEventDetail(BaseModel):
|
||||
"""
|
||||
AgentEventDetail
|
||||
""" # noqa: E501
|
||||
id: Optional[StrictStr] = Field(default=None, description="A unique ID for each event.")
|
||||
type_name: Optional[StrictStr] = Field(default=None, description="Event type name. Examples include, Local Agent Issue, Network Path Issue, Network Outage, DNS Issue, Server Issue, and Proxy Issue.", alias="typeName")
|
||||
state: Optional[EventState] = None
|
||||
start_date: Optional[datetime] = Field(default=None, description="The start date and time (in UTC, ISO 8601 format) when the event was first detected.", alias="startDate")
|
||||
end_date: Optional[datetime] = Field(default=None, description="The end date and time (in UTC, ISO 8601 format) when the event was resolved (due to timeout). This value is null for \"ongoing\" (active) events and is populated once the event is resolved.", alias="endDate")
|
||||
severity: Optional[EventAlertSeverity] = None
|
||||
aid: Optional[StrictStr] = Field(default=None, description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint.")
|
||||
summary: Optional[StrictStr] = Field(default=None, description="A brief summary describing the cause of the event.")
|
||||
agent_type: Optional[EventAgentType] = Field(default=None, alias="agentType")
|
||||
affected_tests: Optional[AffectedTests] = Field(default=None, alias="affectedTests")
|
||||
affected_targets: Optional[AffectedTargets] = Field(default=None, alias="affectedTargets")
|
||||
affected_agents: Optional[AffectedAgents] = Field(default=None, alias="affectedAgents")
|
||||
cause: Optional[List[StrictStr]] = Field(default=None, description="The cause of the error.")
|
||||
links: Optional[SelfLinks] = Field(default=None, alias="_links")
|
||||
type: Annotated[str, Field(strict=True)] = Field(description="Agent event type.")
|
||||
grouping: Optional[AgentEventGrouping] = None
|
||||
__properties: ClassVar[List[str]] = ["id", "typeName", "state", "startDate", "endDate", "severity", "aid", "summary", "agentType", "affectedTests", "affectedTargets", "affectedAgents", "cause", "_links", "type", "grouping"]
|
||||
|
||||
@field_validator('type')
|
||||
def type_validate_regular_expression(cls, value):
|
||||
"""Validates the regular expression"""
|
||||
if not re.match(r"^agent$", value):
|
||||
raise ValueError(r"must validate the regular expression /^agent$/")
|
||||
return 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 AgentEventDetail 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.
|
||||
* OpenAPI `readOnly` fields are excluded.
|
||||
* OpenAPI `readOnly` fields are excluded.
|
||||
* OpenAPI `readOnly` fields are excluded.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
"id",
|
||||
"type_name",
|
||||
"start_date",
|
||||
"end_date",
|
||||
"summary",
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# override the default output from pydantic by calling `to_dict()` of affected_tests
|
||||
if self.affected_tests:
|
||||
_dict['affectedTests'] = self.affected_tests.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of affected_targets
|
||||
if self.affected_targets:
|
||||
_dict['affectedTargets'] = self.affected_targets.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of affected_agents
|
||||
if self.affected_agents:
|
||||
_dict['affectedAgents'] = self.affected_agents.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of links
|
||||
if self.links:
|
||||
_dict['_links'] = self.links.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of grouping
|
||||
if self.grouping:
|
||||
_dict['grouping'] = self.grouping.to_dict()
|
||||
# set to None if end_date (nullable) is None
|
||||
# and model_fields_set contains the field
|
||||
if self.end_date is None and "end_date" in self.model_fields_set:
|
||||
_dict['endDate'] = None
|
||||
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of AgentEventDetail 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"),
|
||||
"typeName": obj.get("typeName"),
|
||||
"state": obj.get("state"),
|
||||
"startDate": obj.get("startDate"),
|
||||
"endDate": obj.get("endDate"),
|
||||
"severity": obj.get("severity"),
|
||||
"aid": obj.get("aid"),
|
||||
"summary": obj.get("summary"),
|
||||
"agentType": obj.get("agentType"),
|
||||
"affectedTests": AffectedTests.from_dict(obj["affectedTests"]) if obj.get("affectedTests") is not None else None,
|
||||
"affectedTargets": AffectedTargets.from_dict(obj["affectedTargets"]) if obj.get("affectedTargets") is not None else None,
|
||||
"affectedAgents": AffectedAgents.from_dict(obj["affectedAgents"]) if obj.get("affectedAgents") is not None else None,
|
||||
"cause": obj.get("cause"),
|
||||
"_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None,
|
||||
"type": obj.get("type"),
|
||||
"grouping": AgentEventGrouping.from_dict(obj["grouping"]) if obj.get("grouping") is not None else None
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@ -0,0 +1,89 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Event Detection API
|
||||
|
||||
Event detection occurs when ThousandEyes identifies that error signals related to a component (proxy, network node, AS, server etc) have deviated from the baselines established by events. * To determine this, ThousandEyes takes the test results from all accounts groups within an organization, and analyzes that data. * Noisy test results (those that have too many errors in a short window) are removed until they stabilize, and the rest of the results are tagged with the components associated with that test result (for example, proxy, network, or server). * Next, any increase in failures from the test results and each component helps in determining the problem domain and which component may be at fault. * When this failure rate increases beyond a pre-defined threshold (set by the algorithm), an event is triggered and an email notification is sent to the user (if they've enabled email alerts). With the Events API, you can perform the following tasks on the ThousandEyes platform: * **Retrieve Events**: Obtain a list of events and detailed information for each event. For more information about events, see [Event Detection](https://docs.thousandeyes.com/product-documentation/event-detection).
|
||||
|
||||
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 AgentEventGrouping(BaseModel):
|
||||
"""
|
||||
AgentEventGrouping
|
||||
""" # noqa: E501
|
||||
agent_id: Optional[StrictStr] = Field(default=None, description="Agent identifier (for agent events). Represents the machine ID for Endpoint Agents or the virtual agent ID for Cloud and Enterprise Agents'.", alias="agentId")
|
||||
__properties: ClassVar[List[str]] = ["agentId"]
|
||||
|
||||
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 AgentEventGrouping 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([
|
||||
"agent_id",
|
||||
])
|
||||
|
||||
_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 AgentEventGrouping from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"agentId": obj.get("agentId")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@ -24,6 +24,7 @@ from thousandeyes_sdk.event_detection.models.affected_agents import AffectedAgen
|
||||
from thousandeyes_sdk.event_detection.models.affected_targets import AffectedTargets
|
||||
from thousandeyes_sdk.event_detection.models.affected_tests import AffectedTests
|
||||
from thousandeyes_sdk.event_detection.models.agent_local_event_grouping import AgentLocalEventGrouping
|
||||
from thousandeyes_sdk.event_detection.models.event_agent_type import EventAgentType
|
||||
from thousandeyes_sdk.event_detection.models.event_alert_severity import EventAlertSeverity
|
||||
from thousandeyes_sdk.event_detection.models.event_state import EventState
|
||||
from thousandeyes_sdk.event_detection.models.self_links import SelfLinks
|
||||
@ -38,10 +39,11 @@ class AgentLocalEventDetail(BaseModel):
|
||||
type_name: Optional[StrictStr] = Field(default=None, description="Event type name. Examples include, Local Agent Issue, Network Path Issue, Network Outage, DNS Issue, Server Issue, and Proxy Issue.", alias="typeName")
|
||||
state: Optional[EventState] = None
|
||||
start_date: Optional[datetime] = Field(default=None, description="The start date and time (in UTC, ISO 8601 format) when the event was first detected.", alias="startDate")
|
||||
end_date: Optional[datetime] = Field(default=None, description="The end date and time (in UTC, ISO 8601 format) when the event was resolved (due to timeout). This value is populated for \"ongoing\" events.", alias="endDate")
|
||||
end_date: Optional[datetime] = Field(default=None, description="The end date and time (in UTC, ISO 8601 format) when the event was resolved (due to timeout). This value is null for \"ongoing\" (active) events and is populated once the event is resolved.", alias="endDate")
|
||||
severity: Optional[EventAlertSeverity] = None
|
||||
aid: Optional[StrictStr] = Field(default=None, description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint.")
|
||||
summary: Optional[StrictStr] = Field(default=None, description="A brief summary describing the cause of the event.")
|
||||
agent_type: Optional[EventAgentType] = Field(default=None, alias="agentType")
|
||||
affected_tests: Optional[AffectedTests] = Field(default=None, alias="affectedTests")
|
||||
affected_targets: Optional[AffectedTargets] = Field(default=None, alias="affectedTargets")
|
||||
affected_agents: Optional[AffectedAgents] = Field(default=None, alias="affectedAgents")
|
||||
@ -49,7 +51,7 @@ class AgentLocalEventDetail(BaseModel):
|
||||
links: Optional[SelfLinks] = Field(default=None, alias="_links")
|
||||
type: Annotated[str, Field(strict=True)] = Field(description="Agent local event type.")
|
||||
grouping: Optional[AgentLocalEventGrouping] = None
|
||||
__properties: ClassVar[List[str]] = ["id", "typeName", "state", "startDate", "endDate", "severity", "aid", "summary", "affectedTests", "affectedTargets", "affectedAgents", "cause", "_links", "type", "grouping"]
|
||||
__properties: ClassVar[List[str]] = ["id", "typeName", "state", "startDate", "endDate", "severity", "aid", "summary", "agentType", "affectedTests", "affectedTargets", "affectedAgents", "cause", "_links", "type", "grouping"]
|
||||
|
||||
@field_validator('type')
|
||||
def type_validate_regular_expression(cls, value):
|
||||
@ -148,6 +150,7 @@ class AgentLocalEventDetail(BaseModel):
|
||||
"severity": obj.get("severity"),
|
||||
"aid": obj.get("aid"),
|
||||
"summary": obj.get("summary"),
|
||||
"agentType": obj.get("agentType"),
|
||||
"affectedTests": AffectedTests.from_dict(obj["affectedTests"]) if obj.get("affectedTests") is not None else None,
|
||||
"affectedTargets": AffectedTargets.from_dict(obj["affectedTargets"]) if obj.get("affectedTargets") is not None else None,
|
||||
"affectedAgents": AffectedAgents.from_dict(obj["affectedAgents"]) if obj.get("affectedAgents") is not None else None,
|
||||
|
||||
@ -0,0 +1,164 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Event Detection API
|
||||
|
||||
Event detection occurs when ThousandEyes identifies that error signals related to a component (proxy, network node, AS, server etc) have deviated from the baselines established by events. * To determine this, ThousandEyes takes the test results from all accounts groups within an organization, and analyzes that data. * Noisy test results (those that have too many errors in a short window) are removed until they stabilize, and the rest of the results are tagged with the components associated with that test result (for example, proxy, network, or server). * Next, any increase in failures from the test results and each component helps in determining the problem domain and which component may be at fault. * When this failure rate increases beyond a pre-defined threshold (set by the algorithm), an event is triggered and an email notification is sent to the user (if they've enabled email alerts). With the Events API, you can perform the following tasks on the ThousandEyes platform: * **Retrieve Events**: Obtain a list of events and detailed information for each event. For more information about events, see [Event Detection](https://docs.thousandeyes.com/product-documentation/event-detection).
|
||||
|
||||
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, field_validator
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing_extensions import Annotated
|
||||
from thousandeyes_sdk.event_detection.models.affected_agents import AffectedAgents
|
||||
from thousandeyes_sdk.event_detection.models.affected_targets import AffectedTargets
|
||||
from thousandeyes_sdk.event_detection.models.affected_tests import AffectedTests
|
||||
from thousandeyes_sdk.event_detection.models.application_event_grouping import ApplicationEventGrouping
|
||||
from thousandeyes_sdk.event_detection.models.event_agent_type import EventAgentType
|
||||
from thousandeyes_sdk.event_detection.models.event_alert_severity import EventAlertSeverity
|
||||
from thousandeyes_sdk.event_detection.models.event_state import EventState
|
||||
from thousandeyes_sdk.event_detection.models.self_links import SelfLinks
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class ApplicationEventDetail(BaseModel):
|
||||
"""
|
||||
ApplicationEventDetail
|
||||
""" # noqa: E501
|
||||
id: Optional[StrictStr] = Field(default=None, description="A unique ID for each event.")
|
||||
type_name: Optional[StrictStr] = Field(default=None, description="Event type name. Examples include, Local Agent Issue, Network Path Issue, Network Outage, DNS Issue, Server Issue, and Proxy Issue.", alias="typeName")
|
||||
state: Optional[EventState] = None
|
||||
start_date: Optional[datetime] = Field(default=None, description="The start date and time (in UTC, ISO 8601 format) when the event was first detected.", alias="startDate")
|
||||
end_date: Optional[datetime] = Field(default=None, description="The end date and time (in UTC, ISO 8601 format) when the event was resolved (due to timeout). This value is null for \"ongoing\" (active) events and is populated once the event is resolved.", alias="endDate")
|
||||
severity: Optional[EventAlertSeverity] = None
|
||||
aid: Optional[StrictStr] = Field(default=None, description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint.")
|
||||
summary: Optional[StrictStr] = Field(default=None, description="A brief summary describing the cause of the event.")
|
||||
agent_type: Optional[EventAgentType] = Field(default=None, alias="agentType")
|
||||
affected_tests: Optional[AffectedTests] = Field(default=None, alias="affectedTests")
|
||||
affected_targets: Optional[AffectedTargets] = Field(default=None, alias="affectedTargets")
|
||||
affected_agents: Optional[AffectedAgents] = Field(default=None, alias="affectedAgents")
|
||||
cause: Optional[List[StrictStr]] = Field(default=None, description="The cause of the error.")
|
||||
links: Optional[SelfLinks] = Field(default=None, alias="_links")
|
||||
type: Annotated[str, Field(strict=True)] = Field(description="Application event type.")
|
||||
grouping: Optional[ApplicationEventGrouping] = None
|
||||
__properties: ClassVar[List[str]] = ["id", "typeName", "state", "startDate", "endDate", "severity", "aid", "summary", "agentType", "affectedTests", "affectedTargets", "affectedAgents", "cause", "_links", "type", "grouping"]
|
||||
|
||||
@field_validator('type')
|
||||
def type_validate_regular_expression(cls, value):
|
||||
"""Validates the regular expression"""
|
||||
if not re.match(r"^application$", value):
|
||||
raise ValueError(r"must validate the regular expression /^application$/")
|
||||
return 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 ApplicationEventDetail 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.
|
||||
* OpenAPI `readOnly` fields are excluded.
|
||||
* OpenAPI `readOnly` fields are excluded.
|
||||
* OpenAPI `readOnly` fields are excluded.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
"id",
|
||||
"type_name",
|
||||
"start_date",
|
||||
"end_date",
|
||||
"summary",
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# override the default output from pydantic by calling `to_dict()` of affected_tests
|
||||
if self.affected_tests:
|
||||
_dict['affectedTests'] = self.affected_tests.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of affected_targets
|
||||
if self.affected_targets:
|
||||
_dict['affectedTargets'] = self.affected_targets.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of affected_agents
|
||||
if self.affected_agents:
|
||||
_dict['affectedAgents'] = self.affected_agents.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of links
|
||||
if self.links:
|
||||
_dict['_links'] = self.links.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of grouping
|
||||
if self.grouping:
|
||||
_dict['grouping'] = self.grouping.to_dict()
|
||||
# set to None if end_date (nullable) is None
|
||||
# and model_fields_set contains the field
|
||||
if self.end_date is None and "end_date" in self.model_fields_set:
|
||||
_dict['endDate'] = None
|
||||
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of ApplicationEventDetail 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"),
|
||||
"typeName": obj.get("typeName"),
|
||||
"state": obj.get("state"),
|
||||
"startDate": obj.get("startDate"),
|
||||
"endDate": obj.get("endDate"),
|
||||
"severity": obj.get("severity"),
|
||||
"aid": obj.get("aid"),
|
||||
"summary": obj.get("summary"),
|
||||
"agentType": obj.get("agentType"),
|
||||
"affectedTests": AffectedTests.from_dict(obj["affectedTests"]) if obj.get("affectedTests") is not None else None,
|
||||
"affectedTargets": AffectedTargets.from_dict(obj["affectedTargets"]) if obj.get("affectedTargets") is not None else None,
|
||||
"affectedAgents": AffectedAgents.from_dict(obj["affectedAgents"]) if obj.get("affectedAgents") is not None else None,
|
||||
"cause": obj.get("cause"),
|
||||
"_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None,
|
||||
"type": obj.get("type"),
|
||||
"grouping": ApplicationEventGrouping.from_dict(obj["grouping"]) if obj.get("grouping") is not None else None
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@ -0,0 +1,89 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Event Detection API
|
||||
|
||||
Event detection occurs when ThousandEyes identifies that error signals related to a component (proxy, network node, AS, server etc) have deviated from the baselines established by events. * To determine this, ThousandEyes takes the test results from all accounts groups within an organization, and analyzes that data. * Noisy test results (those that have too many errors in a short window) are removed until they stabilize, and the rest of the results are tagged with the components associated with that test result (for example, proxy, network, or server). * Next, any increase in failures from the test results and each component helps in determining the problem domain and which component may be at fault. * When this failure rate increases beyond a pre-defined threshold (set by the algorithm), an event is triggered and an email notification is sent to the user (if they've enabled email alerts). With the Events API, you can perform the following tasks on the ThousandEyes platform: * **Retrieve Events**: Obtain a list of events and detailed information for each event. For more information about events, see [Event Detection](https://docs.thousandeyes.com/product-documentation/event-detection).
|
||||
|
||||
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 ApplicationEventGrouping(BaseModel):
|
||||
"""
|
||||
ApplicationEventGrouping
|
||||
""" # noqa: E501
|
||||
fqdn: Optional[StrictStr] = Field(default=None, description="Fully qualified domain name of the application (for application events).")
|
||||
__properties: ClassVar[List[str]] = ["fqdn"]
|
||||
|
||||
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 ApplicationEventGrouping 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([
|
||||
"fqdn",
|
||||
])
|
||||
|
||||
_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 ApplicationEventGrouping from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"fqdn": obj.get("fqdn")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@ -24,6 +24,7 @@ from thousandeyes_sdk.event_detection.models.affected_agents import AffectedAgen
|
||||
from thousandeyes_sdk.event_detection.models.affected_targets import AffectedTargets
|
||||
from thousandeyes_sdk.event_detection.models.affected_tests import AffectedTests
|
||||
from thousandeyes_sdk.event_detection.models.dns_event_grouping import DnsEventGrouping
|
||||
from thousandeyes_sdk.event_detection.models.event_agent_type import EventAgentType
|
||||
from thousandeyes_sdk.event_detection.models.event_alert_severity import EventAlertSeverity
|
||||
from thousandeyes_sdk.event_detection.models.event_state import EventState
|
||||
from thousandeyes_sdk.event_detection.models.self_links import SelfLinks
|
||||
@ -38,10 +39,11 @@ class DnsEventDetail(BaseModel):
|
||||
type_name: Optional[StrictStr] = Field(default=None, description="Event type name. Examples include, Local Agent Issue, Network Path Issue, Network Outage, DNS Issue, Server Issue, and Proxy Issue.", alias="typeName")
|
||||
state: Optional[EventState] = None
|
||||
start_date: Optional[datetime] = Field(default=None, description="The start date and time (in UTC, ISO 8601 format) when the event was first detected.", alias="startDate")
|
||||
end_date: Optional[datetime] = Field(default=None, description="The end date and time (in UTC, ISO 8601 format) when the event was resolved (due to timeout). This value is populated for \"ongoing\" events.", alias="endDate")
|
||||
end_date: Optional[datetime] = Field(default=None, description="The end date and time (in UTC, ISO 8601 format) when the event was resolved (due to timeout). This value is null for \"ongoing\" (active) events and is populated once the event is resolved.", alias="endDate")
|
||||
severity: Optional[EventAlertSeverity] = None
|
||||
aid: Optional[StrictStr] = Field(default=None, description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint.")
|
||||
summary: Optional[StrictStr] = Field(default=None, description="A brief summary describing the cause of the event.")
|
||||
agent_type: Optional[EventAgentType] = Field(default=None, alias="agentType")
|
||||
affected_tests: Optional[AffectedTests] = Field(default=None, alias="affectedTests")
|
||||
affected_targets: Optional[AffectedTargets] = Field(default=None, alias="affectedTargets")
|
||||
affected_agents: Optional[AffectedAgents] = Field(default=None, alias="affectedAgents")
|
||||
@ -49,7 +51,7 @@ class DnsEventDetail(BaseModel):
|
||||
links: Optional[SelfLinks] = Field(default=None, alias="_links")
|
||||
type: Annotated[str, Field(strict=True)] = Field(description="DNS event type.")
|
||||
grouping: Optional[DnsEventGrouping] = None
|
||||
__properties: ClassVar[List[str]] = ["id", "typeName", "state", "startDate", "endDate", "severity", "aid", "summary", "affectedTests", "affectedTargets", "affectedAgents", "cause", "_links", "type", "grouping"]
|
||||
__properties: ClassVar[List[str]] = ["id", "typeName", "state", "startDate", "endDate", "severity", "aid", "summary", "agentType", "affectedTests", "affectedTargets", "affectedAgents", "cause", "_links", "type", "grouping"]
|
||||
|
||||
@field_validator('type')
|
||||
def type_validate_regular_expression(cls, value):
|
||||
@ -148,6 +150,7 @@ class DnsEventDetail(BaseModel):
|
||||
"severity": obj.get("severity"),
|
||||
"aid": obj.get("aid"),
|
||||
"summary": obj.get("summary"),
|
||||
"agentType": obj.get("agentType"),
|
||||
"affectedTests": AffectedTests.from_dict(obj["affectedTests"]) if obj.get("affectedTests") is not None else None,
|
||||
"affectedTargets": AffectedTargets.from_dict(obj["affectedTargets"]) if obj.get("affectedTargets") is not None else None,
|
||||
"affectedAgents": AffectedAgents.from_dict(obj["affectedAgents"]) if obj.get("affectedAgents") is not None else None,
|
||||
|
||||
@ -0,0 +1,164 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Event Detection API
|
||||
|
||||
Event detection occurs when ThousandEyes identifies that error signals related to a component (proxy, network node, AS, server etc) have deviated from the baselines established by events. * To determine this, ThousandEyes takes the test results from all accounts groups within an organization, and analyzes that data. * Noisy test results (those that have too many errors in a short window) are removed until they stabilize, and the rest of the results are tagged with the components associated with that test result (for example, proxy, network, or server). * Next, any increase in failures from the test results and each component helps in determining the problem domain and which component may be at fault. * When this failure rate increases beyond a pre-defined threshold (set by the algorithm), an event is triggered and an email notification is sent to the user (if they've enabled email alerts). With the Events API, you can perform the following tasks on the ThousandEyes platform: * **Retrieve Events**: Obtain a list of events and detailed information for each event. For more information about events, see [Event Detection](https://docs.thousandeyes.com/product-documentation/event-detection).
|
||||
|
||||
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, field_validator
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing_extensions import Annotated
|
||||
from thousandeyes_sdk.event_detection.models.affected_agents import AffectedAgents
|
||||
from thousandeyes_sdk.event_detection.models.affected_targets import AffectedTargets
|
||||
from thousandeyes_sdk.event_detection.models.affected_tests import AffectedTests
|
||||
from thousandeyes_sdk.event_detection.models.dns_name_event_grouping import DnsNameEventGrouping
|
||||
from thousandeyes_sdk.event_detection.models.event_agent_type import EventAgentType
|
||||
from thousandeyes_sdk.event_detection.models.event_alert_severity import EventAlertSeverity
|
||||
from thousandeyes_sdk.event_detection.models.event_state import EventState
|
||||
from thousandeyes_sdk.event_detection.models.self_links import SelfLinks
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class DnsNameEventDetail(BaseModel):
|
||||
"""
|
||||
DnsNameEventDetail
|
||||
""" # noqa: E501
|
||||
id: Optional[StrictStr] = Field(default=None, description="A unique ID for each event.")
|
||||
type_name: Optional[StrictStr] = Field(default=None, description="Event type name. Examples include, Local Agent Issue, Network Path Issue, Network Outage, DNS Issue, Server Issue, and Proxy Issue.", alias="typeName")
|
||||
state: Optional[EventState] = None
|
||||
start_date: Optional[datetime] = Field(default=None, description="The start date and time (in UTC, ISO 8601 format) when the event was first detected.", alias="startDate")
|
||||
end_date: Optional[datetime] = Field(default=None, description="The end date and time (in UTC, ISO 8601 format) when the event was resolved (due to timeout). This value is null for \"ongoing\" (active) events and is populated once the event is resolved.", alias="endDate")
|
||||
severity: Optional[EventAlertSeverity] = None
|
||||
aid: Optional[StrictStr] = Field(default=None, description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint.")
|
||||
summary: Optional[StrictStr] = Field(default=None, description="A brief summary describing the cause of the event.")
|
||||
agent_type: Optional[EventAgentType] = Field(default=None, alias="agentType")
|
||||
affected_tests: Optional[AffectedTests] = Field(default=None, alias="affectedTests")
|
||||
affected_targets: Optional[AffectedTargets] = Field(default=None, alias="affectedTargets")
|
||||
affected_agents: Optional[AffectedAgents] = Field(default=None, alias="affectedAgents")
|
||||
cause: Optional[List[StrictStr]] = Field(default=None, description="The cause of the error.")
|
||||
links: Optional[SelfLinks] = Field(default=None, alias="_links")
|
||||
type: Annotated[str, Field(strict=True)] = Field(description="DNS name event type.")
|
||||
grouping: Optional[DnsNameEventGrouping] = None
|
||||
__properties: ClassVar[List[str]] = ["id", "typeName", "state", "startDate", "endDate", "severity", "aid", "summary", "agentType", "affectedTests", "affectedTargets", "affectedAgents", "cause", "_links", "type", "grouping"]
|
||||
|
||||
@field_validator('type')
|
||||
def type_validate_regular_expression(cls, value):
|
||||
"""Validates the regular expression"""
|
||||
if not re.match(r"^dns-name$", value):
|
||||
raise ValueError(r"must validate the regular expression /^dns-name$/")
|
||||
return 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 DnsNameEventDetail 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.
|
||||
* OpenAPI `readOnly` fields are excluded.
|
||||
* OpenAPI `readOnly` fields are excluded.
|
||||
* OpenAPI `readOnly` fields are excluded.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
"id",
|
||||
"type_name",
|
||||
"start_date",
|
||||
"end_date",
|
||||
"summary",
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# override the default output from pydantic by calling `to_dict()` of affected_tests
|
||||
if self.affected_tests:
|
||||
_dict['affectedTests'] = self.affected_tests.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of affected_targets
|
||||
if self.affected_targets:
|
||||
_dict['affectedTargets'] = self.affected_targets.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of affected_agents
|
||||
if self.affected_agents:
|
||||
_dict['affectedAgents'] = self.affected_agents.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of links
|
||||
if self.links:
|
||||
_dict['_links'] = self.links.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of grouping
|
||||
if self.grouping:
|
||||
_dict['grouping'] = self.grouping.to_dict()
|
||||
# set to None if end_date (nullable) is None
|
||||
# and model_fields_set contains the field
|
||||
if self.end_date is None and "end_date" in self.model_fields_set:
|
||||
_dict['endDate'] = None
|
||||
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of DnsNameEventDetail 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"),
|
||||
"typeName": obj.get("typeName"),
|
||||
"state": obj.get("state"),
|
||||
"startDate": obj.get("startDate"),
|
||||
"endDate": obj.get("endDate"),
|
||||
"severity": obj.get("severity"),
|
||||
"aid": obj.get("aid"),
|
||||
"summary": obj.get("summary"),
|
||||
"agentType": obj.get("agentType"),
|
||||
"affectedTests": AffectedTests.from_dict(obj["affectedTests"]) if obj.get("affectedTests") is not None else None,
|
||||
"affectedTargets": AffectedTargets.from_dict(obj["affectedTargets"]) if obj.get("affectedTargets") is not None else None,
|
||||
"affectedAgents": AffectedAgents.from_dict(obj["affectedAgents"]) if obj.get("affectedAgents") is not None else None,
|
||||
"cause": obj.get("cause"),
|
||||
"_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None,
|
||||
"type": obj.get("type"),
|
||||
"grouping": DnsNameEventGrouping.from_dict(obj["grouping"]) if obj.get("grouping") is not None else None
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@ -0,0 +1,89 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Event Detection API
|
||||
|
||||
Event detection occurs when ThousandEyes identifies that error signals related to a component (proxy, network node, AS, server etc) have deviated from the baselines established by events. * To determine this, ThousandEyes takes the test results from all accounts groups within an organization, and analyzes that data. * Noisy test results (those that have too many errors in a short window) are removed until they stabilize, and the rest of the results are tagged with the components associated with that test result (for example, proxy, network, or server). * Next, any increase in failures from the test results and each component helps in determining the problem domain and which component may be at fault. * When this failure rate increases beyond a pre-defined threshold (set by the algorithm), an event is triggered and an email notification is sent to the user (if they've enabled email alerts). With the Events API, you can perform the following tasks on the ThousandEyes platform: * **Retrieve Events**: Obtain a list of events and detailed information for each event. For more information about events, see [Event Detection](https://docs.thousandeyes.com/product-documentation/event-detection).
|
||||
|
||||
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 DnsNameEventGrouping(BaseModel):
|
||||
"""
|
||||
DnsNameEventGrouping
|
||||
""" # noqa: E501
|
||||
domain_name_suffix: Optional[StrictStr] = Field(default=None, description="Domain name suffix (for dns-name events).", alias="domainNameSuffix")
|
||||
__properties: ClassVar[List[str]] = ["domainNameSuffix"]
|
||||
|
||||
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 DnsNameEventGrouping 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([
|
||||
"domain_name_suffix",
|
||||
])
|
||||
|
||||
_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 DnsNameEventGrouping from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"domainNameSuffix": obj.get("domainNameSuffix")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@ -0,0 +1,164 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Event Detection API
|
||||
|
||||
Event detection occurs when ThousandEyes identifies that error signals related to a component (proxy, network node, AS, server etc) have deviated from the baselines established by events. * To determine this, ThousandEyes takes the test results from all accounts groups within an organization, and analyzes that data. * Noisy test results (those that have too many errors in a short window) are removed until they stabilize, and the rest of the results are tagged with the components associated with that test result (for example, proxy, network, or server). * Next, any increase in failures from the test results and each component helps in determining the problem domain and which component may be at fault. * When this failure rate increases beyond a pre-defined threshold (set by the algorithm), an event is triggered and an email notification is sent to the user (if they've enabled email alerts). With the Events API, you can perform the following tasks on the ThousandEyes platform: * **Retrieve Events**: Obtain a list of events and detailed information for each event. For more information about events, see [Event Detection](https://docs.thousandeyes.com/product-documentation/event-detection).
|
||||
|
||||
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, field_validator
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing_extensions import Annotated
|
||||
from thousandeyes_sdk.event_detection.models.affected_agents import AffectedAgents
|
||||
from thousandeyes_sdk.event_detection.models.affected_targets import AffectedTargets
|
||||
from thousandeyes_sdk.event_detection.models.affected_tests import AffectedTests
|
||||
from thousandeyes_sdk.event_detection.models.dns_server_event_grouping import DnsServerEventGrouping
|
||||
from thousandeyes_sdk.event_detection.models.event_agent_type import EventAgentType
|
||||
from thousandeyes_sdk.event_detection.models.event_alert_severity import EventAlertSeverity
|
||||
from thousandeyes_sdk.event_detection.models.event_state import EventState
|
||||
from thousandeyes_sdk.event_detection.models.self_links import SelfLinks
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class DnsServerEventDetail(BaseModel):
|
||||
"""
|
||||
DnsServerEventDetail
|
||||
""" # noqa: E501
|
||||
id: Optional[StrictStr] = Field(default=None, description="A unique ID for each event.")
|
||||
type_name: Optional[StrictStr] = Field(default=None, description="Event type name. Examples include, Local Agent Issue, Network Path Issue, Network Outage, DNS Issue, Server Issue, and Proxy Issue.", alias="typeName")
|
||||
state: Optional[EventState] = None
|
||||
start_date: Optional[datetime] = Field(default=None, description="The start date and time (in UTC, ISO 8601 format) when the event was first detected.", alias="startDate")
|
||||
end_date: Optional[datetime] = Field(default=None, description="The end date and time (in UTC, ISO 8601 format) when the event was resolved (due to timeout). This value is null for \"ongoing\" (active) events and is populated once the event is resolved.", alias="endDate")
|
||||
severity: Optional[EventAlertSeverity] = None
|
||||
aid: Optional[StrictStr] = Field(default=None, description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint.")
|
||||
summary: Optional[StrictStr] = Field(default=None, description="A brief summary describing the cause of the event.")
|
||||
agent_type: Optional[EventAgentType] = Field(default=None, alias="agentType")
|
||||
affected_tests: Optional[AffectedTests] = Field(default=None, alias="affectedTests")
|
||||
affected_targets: Optional[AffectedTargets] = Field(default=None, alias="affectedTargets")
|
||||
affected_agents: Optional[AffectedAgents] = Field(default=None, alias="affectedAgents")
|
||||
cause: Optional[List[StrictStr]] = Field(default=None, description="The cause of the error.")
|
||||
links: Optional[SelfLinks] = Field(default=None, alias="_links")
|
||||
type: Annotated[str, Field(strict=True)] = Field(description="DNS server event type.")
|
||||
grouping: Optional[DnsServerEventGrouping] = None
|
||||
__properties: ClassVar[List[str]] = ["id", "typeName", "state", "startDate", "endDate", "severity", "aid", "summary", "agentType", "affectedTests", "affectedTargets", "affectedAgents", "cause", "_links", "type", "grouping"]
|
||||
|
||||
@field_validator('type')
|
||||
def type_validate_regular_expression(cls, value):
|
||||
"""Validates the regular expression"""
|
||||
if not re.match(r"^dns-server$", value):
|
||||
raise ValueError(r"must validate the regular expression /^dns-server$/")
|
||||
return 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 DnsServerEventDetail 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.
|
||||
* OpenAPI `readOnly` fields are excluded.
|
||||
* OpenAPI `readOnly` fields are excluded.
|
||||
* OpenAPI `readOnly` fields are excluded.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
"id",
|
||||
"type_name",
|
||||
"start_date",
|
||||
"end_date",
|
||||
"summary",
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# override the default output from pydantic by calling `to_dict()` of affected_tests
|
||||
if self.affected_tests:
|
||||
_dict['affectedTests'] = self.affected_tests.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of affected_targets
|
||||
if self.affected_targets:
|
||||
_dict['affectedTargets'] = self.affected_targets.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of affected_agents
|
||||
if self.affected_agents:
|
||||
_dict['affectedAgents'] = self.affected_agents.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of links
|
||||
if self.links:
|
||||
_dict['_links'] = self.links.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of grouping
|
||||
if self.grouping:
|
||||
_dict['grouping'] = self.grouping.to_dict()
|
||||
# set to None if end_date (nullable) is None
|
||||
# and model_fields_set contains the field
|
||||
if self.end_date is None and "end_date" in self.model_fields_set:
|
||||
_dict['endDate'] = None
|
||||
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of DnsServerEventDetail 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"),
|
||||
"typeName": obj.get("typeName"),
|
||||
"state": obj.get("state"),
|
||||
"startDate": obj.get("startDate"),
|
||||
"endDate": obj.get("endDate"),
|
||||
"severity": obj.get("severity"),
|
||||
"aid": obj.get("aid"),
|
||||
"summary": obj.get("summary"),
|
||||
"agentType": obj.get("agentType"),
|
||||
"affectedTests": AffectedTests.from_dict(obj["affectedTests"]) if obj.get("affectedTests") is not None else None,
|
||||
"affectedTargets": AffectedTargets.from_dict(obj["affectedTargets"]) if obj.get("affectedTargets") is not None else None,
|
||||
"affectedAgents": AffectedAgents.from_dict(obj["affectedAgents"]) if obj.get("affectedAgents") is not None else None,
|
||||
"cause": obj.get("cause"),
|
||||
"_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None,
|
||||
"type": obj.get("type"),
|
||||
"grouping": DnsServerEventGrouping.from_dict(obj["grouping"]) if obj.get("grouping") is not None else None
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@ -0,0 +1,89 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Event Detection API
|
||||
|
||||
Event detection occurs when ThousandEyes identifies that error signals related to a component (proxy, network node, AS, server etc) have deviated from the baselines established by events. * To determine this, ThousandEyes takes the test results from all accounts groups within an organization, and analyzes that data. * Noisy test results (those that have too many errors in a short window) are removed until they stabilize, and the rest of the results are tagged with the components associated with that test result (for example, proxy, network, or server). * Next, any increase in failures from the test results and each component helps in determining the problem domain and which component may be at fault. * When this failure rate increases beyond a pre-defined threshold (set by the algorithm), an event is triggered and an email notification is sent to the user (if they've enabled email alerts). With the Events API, you can perform the following tasks on the ThousandEyes platform: * **Retrieve Events**: Obtain a list of events and detailed information for each event. For more information about events, see [Event Detection](https://docs.thousandeyes.com/product-documentation/event-detection).
|
||||
|
||||
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 DnsServerEventGrouping(BaseModel):
|
||||
"""
|
||||
DnsServerEventGrouping
|
||||
""" # noqa: E501
|
||||
ip_address: Optional[StrictStr] = Field(default=None, description="DNS server IP address (for dns-server events).", alias="ipAddress")
|
||||
__properties: ClassVar[List[str]] = ["ipAddress"]
|
||||
|
||||
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 DnsServerEventGrouping 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([
|
||||
"ip_address",
|
||||
])
|
||||
|
||||
_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 DnsServerEventGrouping from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"ipAddress": obj.get("ipAddress")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@ -0,0 +1,164 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Event Detection API
|
||||
|
||||
Event detection occurs when ThousandEyes identifies that error signals related to a component (proxy, network node, AS, server etc) have deviated from the baselines established by events. * To determine this, ThousandEyes takes the test results from all accounts groups within an organization, and analyzes that data. * Noisy test results (those that have too many errors in a short window) are removed until they stabilize, and the rest of the results are tagged with the components associated with that test result (for example, proxy, network, or server). * Next, any increase in failures from the test results and each component helps in determining the problem domain and which component may be at fault. * When this failure rate increases beyond a pre-defined threshold (set by the algorithm), an event is triggered and an email notification is sent to the user (if they've enabled email alerts). With the Events API, you can perform the following tasks on the ThousandEyes platform: * **Retrieve Events**: Obtain a list of events and detailed information for each event. For more information about events, see [Event Detection](https://docs.thousandeyes.com/product-documentation/event-detection).
|
||||
|
||||
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, field_validator
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing_extensions import Annotated
|
||||
from thousandeyes_sdk.event_detection.models.affected_agents import AffectedAgents
|
||||
from thousandeyes_sdk.event_detection.models.affected_targets import AffectedTargets
|
||||
from thousandeyes_sdk.event_detection.models.affected_tests import AffectedTests
|
||||
from thousandeyes_sdk.event_detection.models.domain_event_grouping import DomainEventGrouping
|
||||
from thousandeyes_sdk.event_detection.models.event_agent_type import EventAgentType
|
||||
from thousandeyes_sdk.event_detection.models.event_alert_severity import EventAlertSeverity
|
||||
from thousandeyes_sdk.event_detection.models.event_state import EventState
|
||||
from thousandeyes_sdk.event_detection.models.self_links import SelfLinks
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class DomainEventDetail(BaseModel):
|
||||
"""
|
||||
DomainEventDetail
|
||||
""" # noqa: E501
|
||||
id: Optional[StrictStr] = Field(default=None, description="A unique ID for each event.")
|
||||
type_name: Optional[StrictStr] = Field(default=None, description="Event type name. Examples include, Local Agent Issue, Network Path Issue, Network Outage, DNS Issue, Server Issue, and Proxy Issue.", alias="typeName")
|
||||
state: Optional[EventState] = None
|
||||
start_date: Optional[datetime] = Field(default=None, description="The start date and time (in UTC, ISO 8601 format) when the event was first detected.", alias="startDate")
|
||||
end_date: Optional[datetime] = Field(default=None, description="The end date and time (in UTC, ISO 8601 format) when the event was resolved (due to timeout). This value is null for \"ongoing\" (active) events and is populated once the event is resolved.", alias="endDate")
|
||||
severity: Optional[EventAlertSeverity] = None
|
||||
aid: Optional[StrictStr] = Field(default=None, description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint.")
|
||||
summary: Optional[StrictStr] = Field(default=None, description="A brief summary describing the cause of the event.")
|
||||
agent_type: Optional[EventAgentType] = Field(default=None, alias="agentType")
|
||||
affected_tests: Optional[AffectedTests] = Field(default=None, alias="affectedTests")
|
||||
affected_targets: Optional[AffectedTargets] = Field(default=None, alias="affectedTargets")
|
||||
affected_agents: Optional[AffectedAgents] = Field(default=None, alias="affectedAgents")
|
||||
cause: Optional[List[StrictStr]] = Field(default=None, description="The cause of the error.")
|
||||
links: Optional[SelfLinks] = Field(default=None, alias="_links")
|
||||
type: Annotated[str, Field(strict=True)] = Field(description="Domain event type.")
|
||||
grouping: Optional[DomainEventGrouping] = None
|
||||
__properties: ClassVar[List[str]] = ["id", "typeName", "state", "startDate", "endDate", "severity", "aid", "summary", "agentType", "affectedTests", "affectedTargets", "affectedAgents", "cause", "_links", "type", "grouping"]
|
||||
|
||||
@field_validator('type')
|
||||
def type_validate_regular_expression(cls, value):
|
||||
"""Validates the regular expression"""
|
||||
if not re.match(r"^domain$", value):
|
||||
raise ValueError(r"must validate the regular expression /^domain$/")
|
||||
return 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 DomainEventDetail 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.
|
||||
* OpenAPI `readOnly` fields are excluded.
|
||||
* OpenAPI `readOnly` fields are excluded.
|
||||
* OpenAPI `readOnly` fields are excluded.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
"id",
|
||||
"type_name",
|
||||
"start_date",
|
||||
"end_date",
|
||||
"summary",
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# override the default output from pydantic by calling `to_dict()` of affected_tests
|
||||
if self.affected_tests:
|
||||
_dict['affectedTests'] = self.affected_tests.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of affected_targets
|
||||
if self.affected_targets:
|
||||
_dict['affectedTargets'] = self.affected_targets.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of affected_agents
|
||||
if self.affected_agents:
|
||||
_dict['affectedAgents'] = self.affected_agents.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of links
|
||||
if self.links:
|
||||
_dict['_links'] = self.links.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of grouping
|
||||
if self.grouping:
|
||||
_dict['grouping'] = self.grouping.to_dict()
|
||||
# set to None if end_date (nullable) is None
|
||||
# and model_fields_set contains the field
|
||||
if self.end_date is None and "end_date" in self.model_fields_set:
|
||||
_dict['endDate'] = None
|
||||
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of DomainEventDetail 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"),
|
||||
"typeName": obj.get("typeName"),
|
||||
"state": obj.get("state"),
|
||||
"startDate": obj.get("startDate"),
|
||||
"endDate": obj.get("endDate"),
|
||||
"severity": obj.get("severity"),
|
||||
"aid": obj.get("aid"),
|
||||
"summary": obj.get("summary"),
|
||||
"agentType": obj.get("agentType"),
|
||||
"affectedTests": AffectedTests.from_dict(obj["affectedTests"]) if obj.get("affectedTests") is not None else None,
|
||||
"affectedTargets": AffectedTargets.from_dict(obj["affectedTargets"]) if obj.get("affectedTargets") is not None else None,
|
||||
"affectedAgents": AffectedAgents.from_dict(obj["affectedAgents"]) if obj.get("affectedAgents") is not None else None,
|
||||
"cause": obj.get("cause"),
|
||||
"_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None,
|
||||
"type": obj.get("type"),
|
||||
"grouping": DomainEventGrouping.from_dict(obj["grouping"]) if obj.get("grouping") is not None else None
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@ -0,0 +1,89 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Event Detection API
|
||||
|
||||
Event detection occurs when ThousandEyes identifies that error signals related to a component (proxy, network node, AS, server etc) have deviated from the baselines established by events. * To determine this, ThousandEyes takes the test results from all accounts groups within an organization, and analyzes that data. * Noisy test results (those that have too many errors in a short window) are removed until they stabilize, and the rest of the results are tagged with the components associated with that test result (for example, proxy, network, or server). * Next, any increase in failures from the test results and each component helps in determining the problem domain and which component may be at fault. * When this failure rate increases beyond a pre-defined threshold (set by the algorithm), an event is triggered and an email notification is sent to the user (if they've enabled email alerts). With the Events API, you can perform the following tasks on the ThousandEyes platform: * **Retrieve Events**: Obtain a list of events and detailed information for each event. For more information about events, see [Event Detection](https://docs.thousandeyes.com/product-documentation/event-detection).
|
||||
|
||||
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 DomainEventGrouping(BaseModel):
|
||||
"""
|
||||
DomainEventGrouping
|
||||
""" # noqa: E501
|
||||
fqdn: Optional[StrictStr] = Field(default=None, description="Fully qualified domain name (for domain events).")
|
||||
__properties: ClassVar[List[str]] = ["fqdn"]
|
||||
|
||||
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 DomainEventGrouping 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([
|
||||
"fqdn",
|
||||
])
|
||||
|
||||
_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 DomainEventGrouping from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"fqdn": obj.get("fqdn")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@ -20,6 +20,7 @@ from datetime import datetime
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from thousandeyes_sdk.event_detection.models.affected_count import AffectedCount
|
||||
from thousandeyes_sdk.event_detection.models.event_agent_type import EventAgentType
|
||||
from thousandeyes_sdk.event_detection.models.event_alert_severity import EventAlertSeverity
|
||||
from thousandeyes_sdk.event_detection.models.event_state import EventState
|
||||
from thousandeyes_sdk.event_detection.models.event_type import EventType
|
||||
@ -35,15 +36,16 @@ class Event(BaseModel):
|
||||
type_name: Optional[StrictStr] = Field(default=None, description="Event type name. Examples include, Local Agent Issue, Network Path Issue, Network Outage, DNS Issue, Server Issue, and Proxy Issue.", alias="typeName")
|
||||
state: Optional[EventState] = None
|
||||
start_date: Optional[datetime] = Field(default=None, description="The start date and time (in UTC, ISO 8601 format) when the event was first detected.", alias="startDate")
|
||||
end_date: Optional[datetime] = Field(default=None, description="The end date and time (in UTC, ISO 8601 format) when the event was resolved (due to timeout). This value is populated for \"ongoing\" events.", alias="endDate")
|
||||
end_date: Optional[datetime] = Field(default=None, description="The end date and time (in UTC, ISO 8601 format) when the event was resolved (due to timeout). This value is null for \"ongoing\" (active) events and is populated once the event is resolved.", alias="endDate")
|
||||
severity: Optional[EventAlertSeverity] = None
|
||||
title: Optional[StrictStr] = Field(default=None, description="Event title")
|
||||
type: Optional[EventType] = None
|
||||
agent_type: Optional[EventAgentType] = Field(default=None, alias="agentType")
|
||||
affected_tests: Optional[AffectedCount] = Field(default=None, alias="affectedTests")
|
||||
affected_targets: Optional[AffectedCount] = Field(default=None, alias="affectedTargets")
|
||||
affected_agents: Optional[AffectedCount] = Field(default=None, alias="affectedAgents")
|
||||
links: Optional[SelfLinks] = Field(default=None, alias="_links")
|
||||
__properties: ClassVar[List[str]] = ["id", "typeName", "state", "startDate", "endDate", "severity", "title", "type", "affectedTests", "affectedTargets", "affectedAgents", "_links"]
|
||||
__properties: ClassVar[List[str]] = ["id", "typeName", "state", "startDate", "endDate", "severity", "title", "type", "agentType", "affectedTests", "affectedTargets", "affectedAgents", "_links"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
@ -132,6 +134,7 @@ class Event(BaseModel):
|
||||
"severity": obj.get("severity"),
|
||||
"title": obj.get("title"),
|
||||
"type": obj.get("type"),
|
||||
"agentType": obj.get("agentType"),
|
||||
"affectedTests": AffectedCount.from_dict(obj["affectedTests"]) if obj.get("affectedTests") is not None else None,
|
||||
"affectedTargets": AffectedCount.from_dict(obj["affectedTargets"]) if obj.get("affectedTargets") is not None else None,
|
||||
"affectedAgents": AffectedCount.from_dict(obj["affectedAgents"]) if obj.get("affectedAgents") is not None else None,
|
||||
|
||||
@ -17,9 +17,9 @@ from enum import Enum
|
||||
from typing_extensions import Self
|
||||
|
||||
|
||||
class CloudEnterpriseAgentType(str, Enum):
|
||||
class EventAffectedAgentType(str, Enum):
|
||||
"""
|
||||
Type of the agent.
|
||||
Type of the affected agent.
|
||||
"""
|
||||
|
||||
"""
|
||||
@ -28,11 +28,14 @@ class CloudEnterpriseAgentType(str, Enum):
|
||||
CLOUD = 'cloud'
|
||||
ENTERPRISE_MINUS_CLUSTER = 'enterprise-cluster'
|
||||
ENTERPRISE = 'enterprise'
|
||||
ENTERPRISE_MINUS_LITE = 'enterprise-lite'
|
||||
ENTERPRISE_MINUS_PULSE = 'enterprise-pulse'
|
||||
ENTERPRISE_MINUS_CSC = 'enterprise-csc'
|
||||
UNKNOWN = 'unknown'
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Self:
|
||||
"""Create an instance of CloudEnterpriseAgentType from a JSON string"""
|
||||
"""Create an instance of EventAffectedAgentType from a JSON string"""
|
||||
return cls(json.loads(json_str))
|
||||
|
||||
@classmethod
|
||||
@ -0,0 +1,41 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Event Detection API
|
||||
|
||||
Event detection occurs when ThousandEyes identifies that error signals related to a component (proxy, network node, AS, server etc) have deviated from the baselines established by events. * To determine this, ThousandEyes takes the test results from all accounts groups within an organization, and analyzes that data. * Noisy test results (those that have too many errors in a short window) are removed until they stabilize, and the rest of the results are tagged with the components associated with that test result (for example, proxy, network, or server). * Next, any increase in failures from the test results and each component helps in determining the problem domain and which component may be at fault. * When this failure rate increases beyond a pre-defined threshold (set by the algorithm), an event is triggered and an email notification is sent to the user (if they've enabled email alerts). With the Events API, you can perform the following tasks on the ThousandEyes platform: * **Retrieve Events**: Obtain a list of events and detailed information for each event. For more information about events, see [Event Detection](https://docs.thousandeyes.com/product-documentation/event-detection).
|
||||
|
||||
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 EventAgentType(str, Enum):
|
||||
"""
|
||||
Specifies the agent type associated with the event. Allowed values are `cloud-enterprise-agent` and `endpoint-agent`.
|
||||
"""
|
||||
|
||||
"""
|
||||
allowed enum values
|
||||
"""
|
||||
CLOUD_MINUS_ENTERPRISE_MINUS_AGENT = 'cloud-enterprise-agent'
|
||||
ENDPOINT_MINUS_AGENT = 'endpoint-agent'
|
||||
UNKNOWN = 'unknown'
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Self:
|
||||
"""Create an instance of EventAgentType from a JSON string"""
|
||||
return cls(json.loads(json_str))
|
||||
|
||||
@classmethod
|
||||
def _missing_(cls, value):
|
||||
"""Handle unknown values"""
|
||||
return cls.UNKNOWN
|
||||
|
||||
@ -19,7 +19,7 @@ import json
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from thousandeyes_sdk.event_detection.models.agent_links import AgentLinks
|
||||
from thousandeyes_sdk.event_detection.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType
|
||||
from thousandeyes_sdk.event_detection.models.event_affected_agent_type import EventAffectedAgentType
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
@ -28,7 +28,7 @@ class EventApiAffectedAgent(BaseModel):
|
||||
EventApiAffectedAgent
|
||||
""" # noqa: E501
|
||||
agent_id: Optional[StrictStr] = Field(default=None, description="The ID of the virtual agent.", alias="agentId")
|
||||
type: Optional[CloudEnterpriseAgentType] = None
|
||||
type: Optional[EventAffectedAgentType] = None
|
||||
name: Optional[StrictStr] = Field(default=None, description="The name of the agent as defined in settings.")
|
||||
location: Optional[StrictStr] = Field(default=None, description="The name of the agent's location.")
|
||||
country_code: Optional[StrictStr] = Field(default=None, description="The country code of the agent's location .", alias="countryCode")
|
||||
|
||||
@ -16,18 +16,28 @@ import json
|
||||
import pprint
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
|
||||
from typing import Any, List, Optional
|
||||
from thousandeyes_sdk.event_detection.models.agent_branch_event_detail import AgentBranchEventDetail
|
||||
from thousandeyes_sdk.event_detection.models.agent_event_detail import AgentEventDetail
|
||||
from thousandeyes_sdk.event_detection.models.agent_local_event_detail import AgentLocalEventDetail
|
||||
from thousandeyes_sdk.event_detection.models.application_event_detail import ApplicationEventDetail
|
||||
from thousandeyes_sdk.event_detection.models.dns_event_detail import DnsEventDetail
|
||||
from thousandeyes_sdk.event_detection.models.dns_name_event_detail import DnsNameEventDetail
|
||||
from thousandeyes_sdk.event_detection.models.dns_server_event_detail import DnsServerEventDetail
|
||||
from thousandeyes_sdk.event_detection.models.domain_event_detail import DomainEventDetail
|
||||
from thousandeyes_sdk.event_detection.models.gateway_event_detail import GatewayEventDetail
|
||||
from thousandeyes_sdk.event_detection.models.name_server_event_detail import NameServerEventDetail
|
||||
from thousandeyes_sdk.event_detection.models.network_event_detail import NetworkEventDetail
|
||||
from thousandeyes_sdk.event_detection.models.network_pop_event_detail import NetworkPopEventDetail
|
||||
from thousandeyes_sdk.event_detection.models.proxy_event_detail import ProxyEventDetail
|
||||
from thousandeyes_sdk.event_detection.models.target_event_detail import TargetEventDetail
|
||||
from thousandeyes_sdk.event_detection.models.target_network_event_detail import TargetNetworkEventDetail
|
||||
from thousandeyes_sdk.event_detection.models.vpn_event_detail import VpnEventDetail
|
||||
from thousandeyes_sdk.event_detection.models.wireless_event_detail import WirelessEventDetail
|
||||
from pydantic import StrictStr, Field, model_serializer
|
||||
from typing import Union, List, Set, Optional, Dict
|
||||
from typing_extensions import Literal, Self
|
||||
|
||||
EVENTDETAIL_ONE_OF_SCHEMAS = ["AgentLocalEventDetail", "DnsEventDetail", "NetworkEventDetail", "NetworkPopEventDetail", "ProxyEventDetail", "TargetEventDetail", "TargetNetworkEventDetail"]
|
||||
EVENTDETAIL_ONE_OF_SCHEMAS = ["AgentBranchEventDetail", "AgentEventDetail", "AgentLocalEventDetail", "ApplicationEventDetail", "DnsEventDetail", "DnsNameEventDetail", "DnsServerEventDetail", "DomainEventDetail", "GatewayEventDetail", "NameServerEventDetail", "NetworkEventDetail", "NetworkPopEventDetail", "ProxyEventDetail", "TargetEventDetail", "TargetNetworkEventDetail", "VpnEventDetail", "WirelessEventDetail"]
|
||||
|
||||
class EventDetail(BaseModel):
|
||||
"""
|
||||
@ -47,8 +57,28 @@ class EventDetail(BaseModel):
|
||||
oneof_schema_6_validator: Optional[NetworkEventDetail] = None
|
||||
# data type: NetworkPopEventDetail
|
||||
oneof_schema_7_validator: Optional[NetworkPopEventDetail] = None
|
||||
actual_instance: Optional[Union[AgentLocalEventDetail, DnsEventDetail, NetworkEventDetail, NetworkPopEventDetail, ProxyEventDetail, TargetEventDetail, TargetNetworkEventDetail]] = None
|
||||
one_of_schemas: Set[str] = { "AgentLocalEventDetail", "DnsEventDetail", "NetworkEventDetail", "NetworkPopEventDetail", "ProxyEventDetail", "TargetEventDetail", "TargetNetworkEventDetail" }
|
||||
# data type: AgentEventDetail
|
||||
oneof_schema_8_validator: Optional[AgentEventDetail] = None
|
||||
# data type: ApplicationEventDetail
|
||||
oneof_schema_9_validator: Optional[ApplicationEventDetail] = None
|
||||
# data type: WirelessEventDetail
|
||||
oneof_schema_10_validator: Optional[WirelessEventDetail] = None
|
||||
# data type: GatewayEventDetail
|
||||
oneof_schema_11_validator: Optional[GatewayEventDetail] = None
|
||||
# data type: DnsServerEventDetail
|
||||
oneof_schema_12_validator: Optional[DnsServerEventDetail] = None
|
||||
# data type: DnsNameEventDetail
|
||||
oneof_schema_13_validator: Optional[DnsNameEventDetail] = None
|
||||
# data type: VpnEventDetail
|
||||
oneof_schema_14_validator: Optional[VpnEventDetail] = None
|
||||
# data type: AgentBranchEventDetail
|
||||
oneof_schema_15_validator: Optional[AgentBranchEventDetail] = None
|
||||
# data type: DomainEventDetail
|
||||
oneof_schema_16_validator: Optional[DomainEventDetail] = None
|
||||
# data type: NameServerEventDetail
|
||||
oneof_schema_17_validator: Optional[NameServerEventDetail] = None
|
||||
actual_instance: Optional[Union[AgentBranchEventDetail, AgentEventDetail, AgentLocalEventDetail, ApplicationEventDetail, DnsEventDetail, DnsNameEventDetail, DnsServerEventDetail, DomainEventDetail, GatewayEventDetail, NameServerEventDetail, NetworkEventDetail, NetworkPopEventDetail, ProxyEventDetail, TargetEventDetail, TargetNetworkEventDetail, VpnEventDetail, WirelessEventDetail]] = None
|
||||
one_of_schemas: Set[str] = { "AgentBranchEventDetail", "AgentEventDetail", "AgentLocalEventDetail", "ApplicationEventDetail", "DnsEventDetail", "DnsNameEventDetail", "DnsServerEventDetail", "DomainEventDetail", "GatewayEventDetail", "NameServerEventDetail", "NetworkEventDetail", "NetworkPopEventDetail", "ProxyEventDetail", "TargetEventDetail", "TargetNetworkEventDetail", "VpnEventDetail", "WirelessEventDetail" }
|
||||
|
||||
model_config = ConfigDict(
|
||||
validate_assignment=True,
|
||||
@ -109,12 +139,62 @@ class EventDetail(BaseModel):
|
||||
error_messages.append(f"Error! Input type `{type(v)}` is not `NetworkPopEventDetail`")
|
||||
else:
|
||||
match += 1
|
||||
# validate data type: AgentEventDetail
|
||||
if not isinstance(v, AgentEventDetail):
|
||||
error_messages.append(f"Error! Input type `{type(v)}` is not `AgentEventDetail`")
|
||||
else:
|
||||
match += 1
|
||||
# validate data type: ApplicationEventDetail
|
||||
if not isinstance(v, ApplicationEventDetail):
|
||||
error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationEventDetail`")
|
||||
else:
|
||||
match += 1
|
||||
# validate data type: WirelessEventDetail
|
||||
if not isinstance(v, WirelessEventDetail):
|
||||
error_messages.append(f"Error! Input type `{type(v)}` is not `WirelessEventDetail`")
|
||||
else:
|
||||
match += 1
|
||||
# validate data type: GatewayEventDetail
|
||||
if not isinstance(v, GatewayEventDetail):
|
||||
error_messages.append(f"Error! Input type `{type(v)}` is not `GatewayEventDetail`")
|
||||
else:
|
||||
match += 1
|
||||
# validate data type: DnsServerEventDetail
|
||||
if not isinstance(v, DnsServerEventDetail):
|
||||
error_messages.append(f"Error! Input type `{type(v)}` is not `DnsServerEventDetail`")
|
||||
else:
|
||||
match += 1
|
||||
# validate data type: DnsNameEventDetail
|
||||
if not isinstance(v, DnsNameEventDetail):
|
||||
error_messages.append(f"Error! Input type `{type(v)}` is not `DnsNameEventDetail`")
|
||||
else:
|
||||
match += 1
|
||||
# validate data type: VpnEventDetail
|
||||
if not isinstance(v, VpnEventDetail):
|
||||
error_messages.append(f"Error! Input type `{type(v)}` is not `VpnEventDetail`")
|
||||
else:
|
||||
match += 1
|
||||
# validate data type: AgentBranchEventDetail
|
||||
if not isinstance(v, AgentBranchEventDetail):
|
||||
error_messages.append(f"Error! Input type `{type(v)}` is not `AgentBranchEventDetail`")
|
||||
else:
|
||||
match += 1
|
||||
# validate data type: DomainEventDetail
|
||||
if not isinstance(v, DomainEventDetail):
|
||||
error_messages.append(f"Error! Input type `{type(v)}` is not `DomainEventDetail`")
|
||||
else:
|
||||
match += 1
|
||||
# validate data type: NameServerEventDetail
|
||||
if not isinstance(v, NameServerEventDetail):
|
||||
error_messages.append(f"Error! Input type `{type(v)}` is not `NameServerEventDetail`")
|
||||
else:
|
||||
match += 1
|
||||
if match > 1:
|
||||
# more than 1 match
|
||||
raise ValueError("Multiple matches found when setting `actual_instance` in EventDetail with oneOf schemas: AgentLocalEventDetail, DnsEventDetail, NetworkEventDetail, NetworkPopEventDetail, ProxyEventDetail, TargetEventDetail, TargetNetworkEventDetail. Details: " + ", ".join(error_messages))
|
||||
raise ValueError("Multiple matches found when setting `actual_instance` in EventDetail with oneOf schemas: AgentBranchEventDetail, AgentEventDetail, AgentLocalEventDetail, ApplicationEventDetail, DnsEventDetail, DnsNameEventDetail, DnsServerEventDetail, DomainEventDetail, GatewayEventDetail, NameServerEventDetail, NetworkEventDetail, NetworkPopEventDetail, ProxyEventDetail, TargetEventDetail, TargetNetworkEventDetail, VpnEventDetail, WirelessEventDetail. Details: " + ", ".join(error_messages))
|
||||
elif match == 0:
|
||||
# no match
|
||||
raise ValueError("No match found when setting `actual_instance` in EventDetail with oneOf schemas: AgentLocalEventDetail, DnsEventDetail, NetworkEventDetail, NetworkPopEventDetail, ProxyEventDetail, TargetEventDetail, TargetNetworkEventDetail. Details: " + ", ".join(error_messages))
|
||||
raise ValueError("No match found when setting `actual_instance` in EventDetail with oneOf schemas: AgentBranchEventDetail, AgentEventDetail, AgentLocalEventDetail, ApplicationEventDetail, DnsEventDetail, DnsNameEventDetail, DnsServerEventDetail, DomainEventDetail, GatewayEventDetail, NameServerEventDetail, NetworkEventDetail, NetworkPopEventDetail, ProxyEventDetail, TargetEventDetail, TargetNetworkEventDetail, VpnEventDetail, WirelessEventDetail. Details: " + ", ".join(error_messages))
|
||||
else:
|
||||
return v
|
||||
|
||||
@ -171,13 +251,73 @@ class EventDetail(BaseModel):
|
||||
match += 1
|
||||
except (ValidationError, ValueError) as e:
|
||||
error_messages.append(str(e))
|
||||
# deserialize data into AgentEventDetail
|
||||
try:
|
||||
instance.actual_instance = AgentEventDetail.from_json(json_str)
|
||||
match += 1
|
||||
except (ValidationError, ValueError) as e:
|
||||
error_messages.append(str(e))
|
||||
# deserialize data into ApplicationEventDetail
|
||||
try:
|
||||
instance.actual_instance = ApplicationEventDetail.from_json(json_str)
|
||||
match += 1
|
||||
except (ValidationError, ValueError) as e:
|
||||
error_messages.append(str(e))
|
||||
# deserialize data into WirelessEventDetail
|
||||
try:
|
||||
instance.actual_instance = WirelessEventDetail.from_json(json_str)
|
||||
match += 1
|
||||
except (ValidationError, ValueError) as e:
|
||||
error_messages.append(str(e))
|
||||
# deserialize data into GatewayEventDetail
|
||||
try:
|
||||
instance.actual_instance = GatewayEventDetail.from_json(json_str)
|
||||
match += 1
|
||||
except (ValidationError, ValueError) as e:
|
||||
error_messages.append(str(e))
|
||||
# deserialize data into DnsServerEventDetail
|
||||
try:
|
||||
instance.actual_instance = DnsServerEventDetail.from_json(json_str)
|
||||
match += 1
|
||||
except (ValidationError, ValueError) as e:
|
||||
error_messages.append(str(e))
|
||||
# deserialize data into DnsNameEventDetail
|
||||
try:
|
||||
instance.actual_instance = DnsNameEventDetail.from_json(json_str)
|
||||
match += 1
|
||||
except (ValidationError, ValueError) as e:
|
||||
error_messages.append(str(e))
|
||||
# deserialize data into VpnEventDetail
|
||||
try:
|
||||
instance.actual_instance = VpnEventDetail.from_json(json_str)
|
||||
match += 1
|
||||
except (ValidationError, ValueError) as e:
|
||||
error_messages.append(str(e))
|
||||
# deserialize data into AgentBranchEventDetail
|
||||
try:
|
||||
instance.actual_instance = AgentBranchEventDetail.from_json(json_str)
|
||||
match += 1
|
||||
except (ValidationError, ValueError) as e:
|
||||
error_messages.append(str(e))
|
||||
# deserialize data into DomainEventDetail
|
||||
try:
|
||||
instance.actual_instance = DomainEventDetail.from_json(json_str)
|
||||
match += 1
|
||||
except (ValidationError, ValueError) as e:
|
||||
error_messages.append(str(e))
|
||||
# deserialize data into NameServerEventDetail
|
||||
try:
|
||||
instance.actual_instance = NameServerEventDetail.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 EventDetail with oneOf schemas: AgentLocalEventDetail, DnsEventDetail, NetworkEventDetail, NetworkPopEventDetail, ProxyEventDetail, TargetEventDetail, TargetNetworkEventDetail. Details: " + ", ".join(error_messages))
|
||||
raise ValueError("Multiple matches found when deserializing the JSON string into EventDetail with oneOf schemas: AgentBranchEventDetail, AgentEventDetail, AgentLocalEventDetail, ApplicationEventDetail, DnsEventDetail, DnsNameEventDetail, DnsServerEventDetail, DomainEventDetail, GatewayEventDetail, NameServerEventDetail, NetworkEventDetail, NetworkPopEventDetail, ProxyEventDetail, TargetEventDetail, TargetNetworkEventDetail, VpnEventDetail, WirelessEventDetail. Details: " + ", ".join(error_messages))
|
||||
elif match == 0:
|
||||
# no match
|
||||
raise ValueError("No match found when deserializing the JSON string into EventDetail with oneOf schemas: AgentLocalEventDetail, DnsEventDetail, NetworkEventDetail, NetworkPopEventDetail, ProxyEventDetail, TargetEventDetail, TargetNetworkEventDetail. Details: " + ", ".join(error_messages))
|
||||
raise ValueError("No match found when deserializing the JSON string into EventDetail with oneOf schemas: AgentBranchEventDetail, AgentEventDetail, AgentLocalEventDetail, ApplicationEventDetail, DnsEventDetail, DnsNameEventDetail, DnsServerEventDetail, DomainEventDetail, GatewayEventDetail, NameServerEventDetail, NetworkEventDetail, NetworkPopEventDetail, ProxyEventDetail, TargetEventDetail, TargetNetworkEventDetail, VpnEventDetail, WirelessEventDetail. Details: " + ", ".join(error_messages))
|
||||
else:
|
||||
return instance
|
||||
|
||||
@ -195,7 +335,7 @@ class EventDetail(BaseModel):
|
||||
else:
|
||||
return json.dumps(self.actual_instance)
|
||||
|
||||
def to_dict(self) -> Optional[Union[Dict[str, Any], AgentLocalEventDetail, DnsEventDetail, NetworkEventDetail, NetworkPopEventDetail, ProxyEventDetail, TargetEventDetail, TargetNetworkEventDetail]]:
|
||||
def to_dict(self) -> Optional[Union[Dict[str, Any], AgentBranchEventDetail, AgentEventDetail, AgentLocalEventDetail, ApplicationEventDetail, DnsEventDetail, DnsNameEventDetail, DnsServerEventDetail, DomainEventDetail, GatewayEventDetail, NameServerEventDetail, NetworkEventDetail, NetworkPopEventDetail, ProxyEventDetail, TargetEventDetail, TargetNetworkEventDetail, VpnEventDetail, WirelessEventDetail]]:
|
||||
"""Returns the dict representation of the actual instance"""
|
||||
if self.actual_instance is None:
|
||||
return None
|
||||
|
||||
@ -22,6 +22,7 @@ from typing import Any, ClassVar, Dict, List, Optional
|
||||
from thousandeyes_sdk.event_detection.models.affected_agents import AffectedAgents
|
||||
from thousandeyes_sdk.event_detection.models.affected_targets import AffectedTargets
|
||||
from thousandeyes_sdk.event_detection.models.affected_tests import AffectedTests
|
||||
from thousandeyes_sdk.event_detection.models.event_agent_type import EventAgentType
|
||||
from thousandeyes_sdk.event_detection.models.event_alert_severity import EventAlertSeverity
|
||||
from thousandeyes_sdk.event_detection.models.event_state import EventState
|
||||
from thousandeyes_sdk.event_detection.models.self_links import SelfLinks
|
||||
@ -36,16 +37,17 @@ class EventDetailBase(BaseModel):
|
||||
type_name: Optional[StrictStr] = Field(default=None, description="Event type name. Examples include, Local Agent Issue, Network Path Issue, Network Outage, DNS Issue, Server Issue, and Proxy Issue.", alias="typeName")
|
||||
state: Optional[EventState] = None
|
||||
start_date: Optional[datetime] = Field(default=None, description="The start date and time (in UTC, ISO 8601 format) when the event was first detected.", alias="startDate")
|
||||
end_date: Optional[datetime] = Field(default=None, description="The end date and time (in UTC, ISO 8601 format) when the event was resolved (due to timeout). This value is populated for \"ongoing\" events.", alias="endDate")
|
||||
end_date: Optional[datetime] = Field(default=None, description="The end date and time (in UTC, ISO 8601 format) when the event was resolved (due to timeout). This value is null for \"ongoing\" (active) events and is populated once the event is resolved.", alias="endDate")
|
||||
severity: Optional[EventAlertSeverity] = None
|
||||
aid: Optional[StrictStr] = Field(default=None, description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint.")
|
||||
summary: Optional[StrictStr] = Field(default=None, description="A brief summary describing the cause of the event.")
|
||||
agent_type: Optional[EventAgentType] = Field(default=None, alias="agentType")
|
||||
affected_tests: Optional[AffectedTests] = Field(default=None, alias="affectedTests")
|
||||
affected_targets: Optional[AffectedTargets] = Field(default=None, alias="affectedTargets")
|
||||
affected_agents: Optional[AffectedAgents] = Field(default=None, alias="affectedAgents")
|
||||
cause: Optional[List[StrictStr]] = Field(default=None, description="The cause of the error.")
|
||||
links: Optional[SelfLinks] = Field(default=None, alias="_links")
|
||||
__properties: ClassVar[List[str]] = ["id", "typeName", "state", "startDate", "endDate", "severity", "aid", "summary", "affectedTests", "affectedTargets", "affectedAgents", "cause", "_links"]
|
||||
__properties: ClassVar[List[str]] = ["id", "typeName", "state", "startDate", "endDate", "severity", "aid", "summary", "agentType", "affectedTests", "affectedTargets", "affectedAgents", "cause", "_links"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
@ -134,6 +136,7 @@ class EventDetailBase(BaseModel):
|
||||
"severity": obj.get("severity"),
|
||||
"aid": obj.get("aid"),
|
||||
"summary": obj.get("summary"),
|
||||
"agentType": obj.get("agentType"),
|
||||
"affectedTests": AffectedTests.from_dict(obj["affectedTests"]) if obj.get("affectedTests") is not None else None,
|
||||
"affectedTargets": AffectedTargets.from_dict(obj["affectedTargets"]) if obj.get("affectedTargets") is not None else None,
|
||||
"affectedAgents": AffectedAgents.from_dict(obj["affectedAgents"]) if obj.get("affectedAgents") is not None else None,
|
||||
|
||||
@ -19,7 +19,7 @@ from typing_extensions import Self
|
||||
|
||||
class EventType(str, Enum):
|
||||
"""
|
||||
Specifies the event type in a machine-readable and backwards-compatible format. Allowed values are: `agent-local`, `network-pop`, `network`, `dns`, `target`, and `proxy`.
|
||||
Specifies the event type in a machine-readable and backwards-compatible format, such as `agent` or `target`.
|
||||
"""
|
||||
|
||||
"""
|
||||
@ -32,6 +32,16 @@ class EventType(str, Enum):
|
||||
TARGET = 'target'
|
||||
TARGET_MINUS_NETWORK = 'target-network'
|
||||
PROXY = 'proxy'
|
||||
AGENT = 'agent'
|
||||
APPLICATION = 'application'
|
||||
WIRELESS = 'wireless'
|
||||
GATEWAY = 'gateway'
|
||||
DNS_MINUS_SERVER = 'dns-server'
|
||||
DNS_MINUS_NAME = 'dns-name'
|
||||
VPN = 'vpn'
|
||||
AGENT_MINUS_BRANCH = 'agent-branch'
|
||||
DOMAIN = 'domain'
|
||||
NAME_MINUS_SERVER = 'name-server'
|
||||
UNKNOWN = 'unknown'
|
||||
|
||||
@classmethod
|
||||
|
||||
@ -0,0 +1,164 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Event Detection API
|
||||
|
||||
Event detection occurs when ThousandEyes identifies that error signals related to a component (proxy, network node, AS, server etc) have deviated from the baselines established by events. * To determine this, ThousandEyes takes the test results from all accounts groups within an organization, and analyzes that data. * Noisy test results (those that have too many errors in a short window) are removed until they stabilize, and the rest of the results are tagged with the components associated with that test result (for example, proxy, network, or server). * Next, any increase in failures from the test results and each component helps in determining the problem domain and which component may be at fault. * When this failure rate increases beyond a pre-defined threshold (set by the algorithm), an event is triggered and an email notification is sent to the user (if they've enabled email alerts). With the Events API, you can perform the following tasks on the ThousandEyes platform: * **Retrieve Events**: Obtain a list of events and detailed information for each event. For more information about events, see [Event Detection](https://docs.thousandeyes.com/product-documentation/event-detection).
|
||||
|
||||
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, field_validator
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing_extensions import Annotated
|
||||
from thousandeyes_sdk.event_detection.models.affected_agents import AffectedAgents
|
||||
from thousandeyes_sdk.event_detection.models.affected_targets import AffectedTargets
|
||||
from thousandeyes_sdk.event_detection.models.affected_tests import AffectedTests
|
||||
from thousandeyes_sdk.event_detection.models.event_agent_type import EventAgentType
|
||||
from thousandeyes_sdk.event_detection.models.event_alert_severity import EventAlertSeverity
|
||||
from thousandeyes_sdk.event_detection.models.event_state import EventState
|
||||
from thousandeyes_sdk.event_detection.models.gateway_event_grouping import GatewayEventGrouping
|
||||
from thousandeyes_sdk.event_detection.models.self_links import SelfLinks
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class GatewayEventDetail(BaseModel):
|
||||
"""
|
||||
GatewayEventDetail
|
||||
""" # noqa: E501
|
||||
id: Optional[StrictStr] = Field(default=None, description="A unique ID for each event.")
|
||||
type_name: Optional[StrictStr] = Field(default=None, description="Event type name. Examples include, Local Agent Issue, Network Path Issue, Network Outage, DNS Issue, Server Issue, and Proxy Issue.", alias="typeName")
|
||||
state: Optional[EventState] = None
|
||||
start_date: Optional[datetime] = Field(default=None, description="The start date and time (in UTC, ISO 8601 format) when the event was first detected.", alias="startDate")
|
||||
end_date: Optional[datetime] = Field(default=None, description="The end date and time (in UTC, ISO 8601 format) when the event was resolved (due to timeout). This value is null for \"ongoing\" (active) events and is populated once the event is resolved.", alias="endDate")
|
||||
severity: Optional[EventAlertSeverity] = None
|
||||
aid: Optional[StrictStr] = Field(default=None, description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint.")
|
||||
summary: Optional[StrictStr] = Field(default=None, description="A brief summary describing the cause of the event.")
|
||||
agent_type: Optional[EventAgentType] = Field(default=None, alias="agentType")
|
||||
affected_tests: Optional[AffectedTests] = Field(default=None, alias="affectedTests")
|
||||
affected_targets: Optional[AffectedTargets] = Field(default=None, alias="affectedTargets")
|
||||
affected_agents: Optional[AffectedAgents] = Field(default=None, alias="affectedAgents")
|
||||
cause: Optional[List[StrictStr]] = Field(default=None, description="The cause of the error.")
|
||||
links: Optional[SelfLinks] = Field(default=None, alias="_links")
|
||||
type: Annotated[str, Field(strict=True)] = Field(description="Gateway event type.")
|
||||
grouping: Optional[GatewayEventGrouping] = None
|
||||
__properties: ClassVar[List[str]] = ["id", "typeName", "state", "startDate", "endDate", "severity", "aid", "summary", "agentType", "affectedTests", "affectedTargets", "affectedAgents", "cause", "_links", "type", "grouping"]
|
||||
|
||||
@field_validator('type')
|
||||
def type_validate_regular_expression(cls, value):
|
||||
"""Validates the regular expression"""
|
||||
if not re.match(r"^gateway$", value):
|
||||
raise ValueError(r"must validate the regular expression /^gateway$/")
|
||||
return 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 GatewayEventDetail 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.
|
||||
* OpenAPI `readOnly` fields are excluded.
|
||||
* OpenAPI `readOnly` fields are excluded.
|
||||
* OpenAPI `readOnly` fields are excluded.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
"id",
|
||||
"type_name",
|
||||
"start_date",
|
||||
"end_date",
|
||||
"summary",
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# override the default output from pydantic by calling `to_dict()` of affected_tests
|
||||
if self.affected_tests:
|
||||
_dict['affectedTests'] = self.affected_tests.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of affected_targets
|
||||
if self.affected_targets:
|
||||
_dict['affectedTargets'] = self.affected_targets.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of affected_agents
|
||||
if self.affected_agents:
|
||||
_dict['affectedAgents'] = self.affected_agents.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of links
|
||||
if self.links:
|
||||
_dict['_links'] = self.links.to_dict()
|
||||
# override the default output from pydantic by calling `to_dict()` of grouping
|
||||
if self.grouping:
|
||||
_dict['grouping'] = self.grouping.to_dict()
|
||||
# set to None if end_date (nullable) is None
|
||||
# and model_fields_set contains the field
|
||||
if self.end_date is None and "end_date" in self.model_fields_set:
|
||||
_dict['endDate'] = None
|
||||
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of GatewayEventDetail 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"),
|
||||
"typeName": obj.get("typeName"),
|
||||
"state": obj.get("state"),
|
||||
"startDate": obj.get("startDate"),
|
||||
"endDate": obj.get("endDate"),
|
||||
"severity": obj.get("severity"),
|
||||
"aid": obj.get("aid"),
|
||||
"summary": obj.get("summary"),
|
||||
"agentType": obj.get("agentType"),
|
||||
"affectedTests": AffectedTests.from_dict(obj["affectedTests"]) if obj.get("affectedTests") is not None else None,
|
||||
"affectedTargets": AffectedTargets.from_dict(obj["affectedTargets"]) if obj.get("affectedTargets") is not None else None,
|
||||
"affectedAgents": AffectedAgents.from_dict(obj["affectedAgents"]) if obj.get("affectedAgents") is not None else None,
|
||||
"cause": obj.get("cause"),
|
||||
"_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None,
|
||||
"type": obj.get("type"),
|
||||
"grouping": GatewayEventGrouping.from_dict(obj["grouping"]) if obj.get("grouping") is not None else None
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@ -0,0 +1,93 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Event Detection API
|
||||
|
||||
Event detection occurs when ThousandEyes identifies that error signals related to a component (proxy, network node, AS, server etc) have deviated from the baselines established by events. * To determine this, ThousandEyes takes the test results from all accounts groups within an organization, and analyzes that data. * Noisy test results (those that have too many errors in a short window) are removed until they stabilize, and the rest of the results are tagged with the components associated with that test result (for example, proxy, network, or server). * Next, any increase in failures from the test results and each component helps in determining the problem domain and which component may be at fault. * When this failure rate increases beyond a pre-defined threshold (set by the algorithm), an event is triggered and an email notification is sent to the user (if they've enabled email alerts). With the Events API, you can perform the following tasks on the ThousandEyes platform: * **Retrieve Events**: Obtain a list of events and detailed information for each event. For more information about events, see [Event Detection](https://docs.thousandeyes.com/product-documentation/event-detection).
|
||||
|
||||
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 GatewayEventGrouping(BaseModel):
|
||||
"""
|
||||
GatewayEventGrouping
|
||||
""" # noqa: E501
|
||||
ip_address: Optional[StrictStr] = Field(default=None, description="Gateway IP address (for gateway events).", alias="ipAddress")
|
||||
mac_address: Optional[StrictStr] = Field(default=None, description="Gateway MAC address (for gateway events).", alias="macAddress")
|
||||
__properties: ClassVar[List[str]] = ["ipAddress", "macAddress"]
|
||||
|
||||
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 GatewayEventGrouping 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([
|
||||
"ip_address",
|
||||
"mac_address",
|
||||
])
|
||||
|
||||
_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 GatewayEventGrouping from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"ipAddress": obj.get("ipAddress"),
|
||||
"macAddress": obj.get("macAddress")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user