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
7e7c1c4c0a
commit
b300d0ccbc
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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,6 +124,10 @@ 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/test_events_api.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
|
||||
|
||||
|
||||
@ -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.name_server_event_grouping import NameServerEventGrouping
|
||||
from thousandeyes_sdk.event_detection.models.self_links import SelfLinks
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class NameServerEventDetail(BaseModel):
|
||||
"""
|
||||
NameServerEventDetail
|
||||
""" # 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="Name server event type.")
|
||||
grouping: Optional[NameServerEventGrouping] = 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"^name-server$", value):
|
||||
raise ValueError(r"must validate the regular expression /^name-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 NameServerEventDetail 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 NameServerEventDetail 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": NameServerEventGrouping.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 NameServerEventGrouping(BaseModel):
|
||||
"""
|
||||
NameServerEventGrouping
|
||||
""" # noqa: E501
|
||||
server_name: Optional[StrictStr] = Field(default=None, description="Name server hostname (for name-server events).", alias="serverName")
|
||||
__properties: ClassVar[List[str]] = ["serverName"]
|
||||
|
||||
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 NameServerEventGrouping 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([
|
||||
"server_name",
|
||||
])
|
||||
|
||||
_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 NameServerEventGrouping from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"serverName": obj.get("serverName")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@ -23,6 +23,7 @@ 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.network_event_grouping import NetworkEventGrouping
|
||||
@ -38,10 +39,11 @@ class NetworkEventDetail(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 NetworkEventDetail(BaseModel):
|
||||
links: Optional[SelfLinks] = Field(default=None, alias="_links")
|
||||
type: Annotated[str, Field(strict=True)] = Field(description="Network event type.")
|
||||
grouping: Optional[NetworkEventGrouping] = 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 NetworkEventDetail(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,
|
||||
|
||||
@ -23,6 +23,7 @@ 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.network_event_grouping import NetworkEventGrouping
|
||||
@ -38,10 +39,11 @@ class NetworkPopEventDetail(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 NetworkPopEventDetail(BaseModel):
|
||||
links: Optional[SelfLinks] = Field(default=None, alias="_links")
|
||||
type: Annotated[str, Field(strict=True)] = Field(description="Network pop event type.")
|
||||
grouping: Optional[NetworkEventGrouping] = 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 NetworkPopEventDetail(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,
|
||||
|
||||
@ -23,6 +23,7 @@ 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.proxy_event_grouping import ProxyEventGrouping
|
||||
@ -38,10 +39,11 @@ class ProxyEventDetail(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 ProxyEventDetail(BaseModel):
|
||||
links: Optional[SelfLinks] = Field(default=None, alias="_links")
|
||||
type: Annotated[str, Field(strict=True)] = Field(description="Proxy event type.")
|
||||
grouping: Optional[ProxyEventGrouping] = 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 ProxyEventDetail(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,
|
||||
|
||||
@ -32,7 +32,7 @@ class SimpleEventDetail(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
|
||||
__properties: ClassVar[List[str]] = ["id", "typeName", "state", "startDate", "endDate", "severity"]
|
||||
|
||||
|
||||
@ -23,6 +23,7 @@ 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.self_links import SelfLinks
|
||||
@ -38,10 +39,11 @@ class TargetEventDetail(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 TargetEventDetail(BaseModel):
|
||||
links: Optional[SelfLinks] = Field(default=None, alias="_links")
|
||||
type: Annotated[str, Field(strict=True)] = Field(description="Target event type.")
|
||||
grouping: Optional[TargetEventGrouping] = 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 TargetEventDetail(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,
|
||||
|
||||
@ -23,6 +23,7 @@ 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.self_links import SelfLinks
|
||||
@ -38,10 +39,11 @@ class TargetNetworkEventDetail(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 TargetNetworkEventDetail(BaseModel):
|
||||
links: Optional[SelfLinks] = Field(default=None, alias="_links")
|
||||
type: Annotated[str, Field(strict=True)] = Field(description="Target network event type.")
|
||||
grouping: Optional[TargetNetworkEventGrouping] = 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 TargetNetworkEventDetail(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.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 thousandeyes_sdk.event_detection.models.vpn_event_grouping import VpnEventGrouping
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class VpnEventDetail(BaseModel):
|
||||
"""
|
||||
VpnEventDetail
|
||||
""" # 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="VPN event type.")
|
||||
grouping: Optional[VpnEventGrouping] = 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"^vpn$", value):
|
||||
raise ValueError(r"must validate the regular expression /^vpn$/")
|
||||
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 VpnEventDetail 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 VpnEventDetail 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": VpnEventGrouping.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 VpnEventGrouping(BaseModel):
|
||||
"""
|
||||
VpnEventGrouping
|
||||
""" # noqa: E501
|
||||
vpn_type: Optional[StrictStr] = Field(default=None, description="VPN type (for vpn events).", alias="vpnType")
|
||||
vpn_server_ip_address: Optional[StrictStr] = Field(default=None, description="VPN server IP address (for vpn events).", alias="vpnServerIpAddress")
|
||||
__properties: ClassVar[List[str]] = ["vpnType", "vpnServerIpAddress"]
|
||||
|
||||
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 VpnEventGrouping 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([
|
||||
"vpn_type",
|
||||
"vpn_server_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 VpnEventGrouping from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"vpnType": obj.get("vpnType"),
|
||||
"vpnServerIpAddress": obj.get("vpnServerIpAddress")
|
||||
})
|
||||
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.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 thousandeyes_sdk.event_detection.models.wireless_event_grouping import WirelessEventGrouping
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class WirelessEventDetail(BaseModel):
|
||||
"""
|
||||
WirelessEventDetail
|
||||
""" # 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="Wireless event type.")
|
||||
grouping: Optional[WirelessEventGrouping] = 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"^wireless$", value):
|
||||
raise ValueError(r"must validate the regular expression /^wireless$/")
|
||||
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 WirelessEventDetail 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 WirelessEventDetail 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": WirelessEventGrouping.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 WirelessEventGrouping(BaseModel):
|
||||
"""
|
||||
WirelessEventGrouping
|
||||
""" # noqa: E501
|
||||
ssid: Optional[StrictStr] = Field(default=None, description="Wireless network SSID (for wireless events).")
|
||||
bssid: Optional[StrictStr] = Field(default=None, description="Wireless network BSSID (for wireless events).")
|
||||
__properties: ClassVar[List[str]] = ["ssid", "bssid"]
|
||||
|
||||
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 WirelessEventGrouping 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([
|
||||
"ssid",
|
||||
"bssid",
|
||||
])
|
||||
|
||||
_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 WirelessEventGrouping from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"ssid": obj.get("ssid"),
|
||||
"bssid": obj.get("bssid")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
||||
@ -35,6 +35,7 @@ class TestEventsApi(unittest.TestCase):
|
||||
{
|
||||
"severity" : "medium",
|
||||
"summary" : "Significant number of issues detected with 66.29.146.15",
|
||||
"agentType" : "cloud-enterprise-agent",
|
||||
"affectedTests" : {
|
||||
"total" : 5,
|
||||
"tests" : [ {
|
||||
@ -134,7 +135,7 @@ class TestEventsApi(unittest.TestCase):
|
||||
"name" : "São Paulo, Brazil - agent",
|
||||
"location" : "São Paulo, Brazil",
|
||||
"affectedTestIds" : [ "2954", "2953" ],
|
||||
"type" : "enterprise-cluster"
|
||||
"type" : "enterprise"
|
||||
}, {
|
||||
"affectedTargetIds" : [ "123", "1234" ],
|
||||
"agentId" : "2954",
|
||||
@ -154,7 +155,7 @@ class TestEventsApi(unittest.TestCase):
|
||||
"name" : "São Paulo, Brazil - agent",
|
||||
"location" : "São Paulo, Brazil",
|
||||
"affectedTestIds" : [ "2954", "2953" ],
|
||||
"type" : "enterprise-cluster"
|
||||
"type" : "enterprise"
|
||||
} ]
|
||||
},
|
||||
"id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569",
|
||||
@ -199,6 +200,7 @@ class TestEventsApi(unittest.TestCase):
|
||||
"startDate" : "2022-07-17T22:00:54Z",
|
||||
"events" : [ {
|
||||
"severity" : "medium",
|
||||
"agentType" : "cloud-enterprise-agent",
|
||||
"affectedTests" : {
|
||||
"total" : 5,
|
||||
"inAccountGroup" : 2
|
||||
@ -216,22 +218,23 @@ class TestEventsApi(unittest.TestCase):
|
||||
"title" : "title"
|
||||
}
|
||||
},
|
||||
"affectedAgents" : {
|
||||
"total" : 5,
|
||||
"inAccountGroup" : 2
|
||||
},
|
||||
"typeName" : "Network Issue",
|
||||
"id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569",
|
||||
"state" : "resolved",
|
||||
"title" : "Affecting destinations in google.com",
|
||||
"type" : "target",
|
||||
"affectedTargets" : {
|
||||
"total" : 5,
|
||||
"inAccountGroup" : 2
|
||||
},
|
||||
"affectedAgents" : {
|
||||
"total" : 5,
|
||||
"inAccountGroup" : 2
|
||||
},
|
||||
"id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569",
|
||||
"state" : "resolved",
|
||||
"startDate" : "2020-04-23T13:43:16Z"
|
||||
}, {
|
||||
"severity" : "medium",
|
||||
"agentType" : "cloud-enterprise-agent",
|
||||
"affectedTests" : {
|
||||
"total" : 5,
|
||||
"inAccountGroup" : 2
|
||||
@ -249,19 +252,19 @@ class TestEventsApi(unittest.TestCase):
|
||||
"title" : "title"
|
||||
}
|
||||
},
|
||||
"affectedAgents" : {
|
||||
"total" : 5,
|
||||
"inAccountGroup" : 2
|
||||
},
|
||||
"typeName" : "Network Issue",
|
||||
"id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569",
|
||||
"state" : "resolved",
|
||||
"title" : "Affecting destinations in google.com",
|
||||
"type" : "target",
|
||||
"affectedTargets" : {
|
||||
"total" : 5,
|
||||
"inAccountGroup" : 2
|
||||
},
|
||||
"affectedAgents" : {
|
||||
"total" : 5,
|
||||
"inAccountGroup" : 2
|
||||
},
|
||||
"id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569",
|
||||
"state" : "resolved",
|
||||
"startDate" : "2020-04-23T13:43:16Z"
|
||||
} ]
|
||||
}"""
|
||||
|
||||
@ -6,7 +6,7 @@ The response does not include the immediate test results. Use the Test Results e
|
||||
|
||||
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||
|
||||
- API version: 7.0.96
|
||||
- API version: 7.0.97
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@ For more information about Internet Insights, see the [Internet Insights](https:
|
||||
|
||||
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||
|
||||
- API version: 7.0.96
|
||||
- API version: 7.0.97
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@ Creates a new test snapshot in ThousandEyes.
|
||||
|
||||
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||
|
||||
- API version: 7.0.96
|
||||
- API version: 7.0.97
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@ For more information about ThousandEyes for OpenTelemetry, see the [product docu
|
||||
|
||||
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||
|
||||
- API version: 7.0.96
|
||||
- API version: 7.0.97
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@ Things to note with the ThousandEyes Tags API:
|
||||
|
||||
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||
|
||||
- API version: 7.0.96
|
||||
- API version: 7.0.97
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@ Get test result metrics for Network and Application Synthetics tests.
|
||||
|
||||
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||
|
||||
- API version: 7.0.96
|
||||
- API version: 7.0.97
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ This API allows you to list, create, edit, and delete Network and Application Sy
|
||||
|
||||
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||
|
||||
- API version: 7.0.96
|
||||
- API version: 7.0.97
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@ Refer to the Usage API operations for detailed usage instructions and optional p
|
||||
|
||||
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||
|
||||
- API version: 7.0.96
|
||||
- API version: 7.0.97
|
||||
- Generator version: 7.6.0
|
||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user