Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GitHub Bot] Generated python SDK #85

Merged
merged 1 commit into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion thousandeyes-sdk-administrative/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.28
- API version: 7.0.29
- Generator version: 7.6.0
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator

Expand Down
2 changes: 1 addition & 1 deletion thousandeyes-sdk-agents/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Manage all agents available to your account in ThousandEyes, including both Clou

This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 7.0.28
- API version: 7.0.29
- Generator version: 7.6.0
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator

Expand Down
2 changes: 2 additions & 0 deletions thousandeyes-sdk-alerts/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ README.md
docs/Alert.md
docs/AlertDetail.md
docs/AlertDirection.md
docs/AlertGroupType.md
docs/AlertLinks.md
docs/AlertMeta.md
docs/AlertMetricDetail.md
Expand Down Expand Up @@ -69,6 +70,7 @@ src/thousandeyes_sdk/alerts/models/__init__.py
src/thousandeyes_sdk/alerts/models/alert.py
src/thousandeyes_sdk/alerts/models/alert_detail.py
src/thousandeyes_sdk/alerts/models/alert_direction.py
src/thousandeyes_sdk/alerts/models/alert_group_type.py
src/thousandeyes_sdk/alerts/models/alert_links.py
src/thousandeyes_sdk/alerts/models/alert_meta.py
src/thousandeyes_sdk/alerts/models/alert_metric_detail.py
Expand Down
3 changes: 2 additions & 1 deletion thousandeyes-sdk-alerts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ For more information about the alerts, see [Alerts](https://docs.thousandeyes.co

This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 7.0.28
- API version: 7.0.29
- Generator version: 7.6.0
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator

Expand Down Expand Up @@ -123,6 +123,7 @@ Class | Method | HTTP request | Description
- [Alert](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-alerts/docs/Alert.md)
- [AlertDetail](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-alerts/docs/AlertDetail.md)
- [AlertDirection](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-alerts/docs/AlertDirection.md)
- [AlertGroupType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-alerts/docs/AlertGroupType.md)
- [AlertLinks](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-alerts/docs/AlertLinks.md)
- [AlertMeta](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-alerts/docs/AlertMeta.md)
- [AlertMetricDetail](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-alerts/docs/AlertMetricDetail.md)
Expand Down
12 changes: 12 additions & 0 deletions thousandeyes-sdk-alerts/docs/AlertGroupType.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# AlertGroupType

Category of alert type based on the application or network layer and source of the test.

## 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)


1 change: 1 addition & 0 deletions thousandeyes-sdk-alerts/docs/BaseRule.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Name | Type | Description | Notes
**notify_on_clear** | **bool** | Send notification when alert clears. | [optional]
**is_default** | **bool** | If set to `true`, this alert rule becomes the default for its test type and is automatically applied to newly created tests with relevant metrics. Only one default alert rule is allowed per test type. | [optional]
**alert_type** | [**AlertType**](AlertType.md) | |
**alert_group_type** | [**AlertGroupType**](AlertGroupType.md) | | [optional]
**minimum_sources** | **int** | The minimum number of agents or monitors that must meet the specified criteria to trigger the alert. | [optional]
**minimum_sources_pct** | **int** | The minimum percentage of all assigned agents or monitors that must meet the specified criteria to trigger the alert. | [optional]
**rounds_violating_mode** | [**AlertRoundsViolationMode**](AlertRoundsViolationMode.md) | | [optional]
Expand Down
1 change: 1 addition & 0 deletions thousandeyes-sdk-alerts/docs/Rule.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Name | Type | Description | Notes
**notify_on_clear** | **bool** | Send notification when alert clears. | [optional]
**is_default** | **bool** | If set to `true`, this alert rule becomes the default for its test type and is automatically applied to newly created tests with relevant metrics. Only one default alert rule is allowed per test type. | [optional]
**alert_type** | [**AlertType**](AlertType.md) | |
**alert_group_type** | [**AlertGroupType**](AlertGroupType.md) | | [optional]
**minimum_sources** | **int** | The minimum number of agents or monitors that must meet the specified criteria to trigger the alert. | [optional]
**minimum_sources_pct** | **int** | The minimum percentage of all assigned agents or monitors that must meet the specified criteria to trigger the alert. | [optional]
**rounds_violating_mode** | [**AlertRoundsViolationMode**](AlertRoundsViolationMode.md) | | [optional]
Expand Down
1 change: 1 addition & 0 deletions thousandeyes-sdk-alerts/docs/RuleDetail.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Name | Type | Description | Notes
**notify_on_clear** | **bool** | Send notification when alert clears. | [optional]
**is_default** | **bool** | If set to `true`, this alert rule becomes the default for its test type and is automatically applied to newly created tests with relevant metrics. Only one default alert rule is allowed per test type. | [optional]
**alert_type** | [**AlertType**](AlertType.md) | |
**alert_group_type** | [**AlertGroupType**](AlertGroupType.md) | | [optional]
**minimum_sources** | **int** | The minimum number of agents or monitors that must meet the specified criteria to trigger the alert. | [optional]
**minimum_sources_pct** | **int** | The minimum percentage of all assigned agents or monitors that must meet the specified criteria to trigger the alert. | [optional]
**rounds_violating_mode** | [**AlertRoundsViolationMode**](AlertRoundsViolationMode.md) | | [optional]
Expand Down
1 change: 1 addition & 0 deletions thousandeyes-sdk-alerts/docs/RuleDetailUpdate.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Name | Type | Description | Notes
**notify_on_clear** | **bool** | Send notification when alert clears. | [optional]
**is_default** | **bool** | If set to `true`, this alert rule becomes the default for its test type and is automatically applied to newly created tests with relevant metrics. Only one default alert rule is allowed per test type. | [optional]
**alert_type** | [**AlertType**](AlertType.md) | |
**alert_group_type** | [**AlertGroupType**](AlertGroupType.md) | | [optional]
**minimum_sources** | **int** | The minimum number of agents or monitors that must meet the specified criteria to trigger the alert. | [optional]
**minimum_sources_pct** | **int** | The minimum percentage of all assigned agents or monitors that must meet the specified criteria to trigger the alert. | [optional]
**rounds_violating_mode** | [**AlertRoundsViolationMode**](AlertRoundsViolationMode.md) | | [optional]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
from thousandeyes_sdk.alerts.models.alert import Alert
from thousandeyes_sdk.alerts.models.alert_detail import AlertDetail
from thousandeyes_sdk.alerts.models.alert_direction import AlertDirection
from thousandeyes_sdk.alerts.models.alert_group_type import AlertGroupType
from thousandeyes_sdk.alerts.models.alert_links import AlertLinks
from thousandeyes_sdk.alerts.models.alert_meta import AlertMeta
from thousandeyes_sdk.alerts.models.alert_metric_detail import AlertMetricDetail
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from thousandeyes_sdk.alerts.models.alert import Alert
from thousandeyes_sdk.alerts.models.alert_detail import AlertDetail
from thousandeyes_sdk.alerts.models.alert_direction import AlertDirection
from thousandeyes_sdk.alerts.models.alert_group_type import AlertGroupType
from thousandeyes_sdk.alerts.models.alert_links import AlertLinks
from thousandeyes_sdk.alerts.models.alert_meta import AlertMeta
from thousandeyes_sdk.alerts.models.alert_metric_detail import AlertMetricDetail
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# coding: utf-8

"""
Alerts API

You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts).

Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
""" # noqa: E501


from __future__ import annotations
import json
from enum import Enum
from typing_extensions import Self


class AlertGroupType(str, Enum):
"""
Category of alert type based on the application or network layer and source of the test.
"""

"""
allowed enum values
"""
BROWSER_MINUS_SESSION = 'browser-session'
CLOUD_MINUS_ENTERPRISE = 'cloud-enterprise'
ENDPOINT = 'endpoint'
UNKNOWN = 'unknown'

@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of AlertGroupType from a JSON string"""
return cls(json.loads(json_str))

@classmethod
def _missing_(cls, value):
"""Handle unknown values"""
return cls.UNKNOWN

Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from thousandeyes_sdk.alerts.models.alert_direction import AlertDirection
from thousandeyes_sdk.alerts.models.alert_group_type import AlertGroupType
from thousandeyes_sdk.alerts.models.alert_rounds_violation_mode import AlertRoundsViolationMode
from thousandeyes_sdk.alerts.models.alert_type import AlertType
from thousandeyes_sdk.alerts.models.sensitivity_level import SensitivityLevel
Expand All @@ -37,6 +38,7 @@ class BaseRule(BaseModel):
notify_on_clear: Optional[StrictBool] = Field(default=None, description="Send notification when alert clears.", alias="notifyOnClear")
is_default: Optional[StrictBool] = Field(default=None, description="If set to `true`, this alert rule becomes the default for its test type and is automatically applied to newly created tests with relevant metrics. Only one default alert rule is allowed per test type.", alias="isDefault")
alert_type: AlertType = Field(alias="alertType")
alert_group_type: Optional[AlertGroupType] = Field(default=None, alias="alertGroupType")
minimum_sources: Optional[StrictInt] = Field(default=None, description="The minimum number of agents or monitors that must meet the specified criteria to trigger the alert.", alias="minimumSources")
minimum_sources_pct: Optional[StrictInt] = Field(default=None, description="The minimum percentage of all assigned agents or monitors that must meet the specified criteria to trigger the alert.", alias="minimumSourcesPct")
rounds_violating_mode: Optional[AlertRoundsViolationMode] = Field(default=None, alias="roundsViolatingMode")
Expand All @@ -45,7 +47,7 @@ class BaseRule(BaseModel):
include_covered_prefixes: Optional[StrictBool] = Field(default=None, description="Set true to include covered prefixes in the BGP alert rule. Only applicable to BGP alert rules.", alias="includeCoveredPrefixes")
sensitivity_level: Optional[SensitivityLevel] = Field(default=None, alias="sensitivityLevel")
severity: Optional[Severity] = None
__properties: ClassVar[List[str]] = ["ruleId", "ruleName", "expression", "direction", "notifyOnClear", "isDefault", "alertType", "minimumSources", "minimumSourcesPct", "roundsViolatingMode", "roundsViolatingOutOf", "roundsViolatingRequired", "includeCoveredPrefixes", "sensitivityLevel", "severity"]
__properties: ClassVar[List[str]] = ["ruleId", "ruleName", "expression", "direction", "notifyOnClear", "isDefault", "alertType", "alertGroupType", "minimumSources", "minimumSourcesPct", "roundsViolatingMode", "roundsViolatingOutOf", "roundsViolatingRequired", "includeCoveredPrefixes", "sensitivityLevel", "severity"]

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -108,6 +110,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"notifyOnClear": obj.get("notifyOnClear"),
"isDefault": obj.get("isDefault"),
"alertType": obj.get("alertType"),
"alertGroupType": obj.get("alertGroupType"),
"minimumSources": obj.get("minimumSources"),
"minimumSourcesPct": obj.get("minimumSourcesPct"),
"roundsViolatingMode": obj.get("roundsViolatingMode"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from thousandeyes_sdk.alerts.models.alert_direction import AlertDirection
from thousandeyes_sdk.alerts.models.alert_group_type import AlertGroupType
from thousandeyes_sdk.alerts.models.alert_notification import AlertNotification
from thousandeyes_sdk.alerts.models.alert_rounds_violation_mode import AlertRoundsViolationMode
from thousandeyes_sdk.alerts.models.alert_type import AlertType
Expand All @@ -39,6 +40,7 @@ class Rule(BaseModel):
notify_on_clear: Optional[StrictBool] = Field(default=None, description="Send notification when alert clears.", alias="notifyOnClear")
is_default: Optional[StrictBool] = Field(default=None, description="If set to `true`, this alert rule becomes the default for its test type and is automatically applied to newly created tests with relevant metrics. Only one default alert rule is allowed per test type.", alias="isDefault")
alert_type: AlertType = Field(alias="alertType")
alert_group_type: Optional[AlertGroupType] = Field(default=None, alias="alertGroupType")
minimum_sources: Optional[StrictInt] = Field(default=None, description="The minimum number of agents or monitors that must meet the specified criteria to trigger the alert.", alias="minimumSources")
minimum_sources_pct: Optional[StrictInt] = Field(default=None, description="The minimum percentage of all assigned agents or monitors that must meet the specified criteria to trigger the alert.", alias="minimumSourcesPct")
rounds_violating_mode: Optional[AlertRoundsViolationMode] = Field(default=None, alias="roundsViolatingMode")
Expand All @@ -50,7 +52,7 @@ class Rule(BaseModel):
notifications: Optional[AlertNotification] = None
test_ids: Optional[List[StrictStr]] = Field(default=None, description="Array of test IDs to link to alert rule (get `testId` from `/tests` endpoint).", alias="testIds")
links: Optional[SelfLinks] = Field(default=None, alias="_links")
__properties: ClassVar[List[str]] = ["ruleId", "ruleName", "expression", "direction", "notifyOnClear", "isDefault", "alertType", "minimumSources", "minimumSourcesPct", "roundsViolatingMode", "roundsViolatingOutOf", "roundsViolatingRequired", "includeCoveredPrefixes", "sensitivityLevel", "severity", "notifications", "testIds", "_links"]
__properties: ClassVar[List[str]] = ["ruleId", "ruleName", "expression", "direction", "notifyOnClear", "isDefault", "alertType", "alertGroupType", "minimumSources", "minimumSourcesPct", "roundsViolatingMode", "roundsViolatingOutOf", "roundsViolatingRequired", "includeCoveredPrefixes", "sensitivityLevel", "severity", "notifications", "testIds", "_links"]

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -119,6 +121,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"notifyOnClear": obj.get("notifyOnClear"),
"isDefault": obj.get("isDefault"),
"alertType": obj.get("alertType"),
"alertGroupType": obj.get("alertGroupType"),
"minimumSources": obj.get("minimumSources"),
"minimumSourcesPct": obj.get("minimumSourcesPct"),
"roundsViolatingMode": obj.get("roundsViolatingMode"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from thousandeyes_sdk.alerts.models.alert_direction import AlertDirection
from thousandeyes_sdk.alerts.models.alert_group_type import AlertGroupType
from thousandeyes_sdk.alerts.models.alert_notification import AlertNotification
from thousandeyes_sdk.alerts.models.alert_rounds_violation_mode import AlertRoundsViolationMode
from thousandeyes_sdk.alerts.models.alert_type import AlertType
Expand All @@ -40,6 +41,7 @@ class RuleDetail(BaseModel):
notify_on_clear: Optional[StrictBool] = Field(default=None, description="Send notification when alert clears.", alias="notifyOnClear")
is_default: Optional[StrictBool] = Field(default=None, description="If set to `true`, this alert rule becomes the default for its test type and is automatically applied to newly created tests with relevant metrics. Only one default alert rule is allowed per test type.", alias="isDefault")
alert_type: AlertType = Field(alias="alertType")
alert_group_type: Optional[AlertGroupType] = Field(default=None, alias="alertGroupType")
minimum_sources: Optional[StrictInt] = Field(default=None, description="The minimum number of agents or monitors that must meet the specified criteria to trigger the alert.", alias="minimumSources")
minimum_sources_pct: Optional[StrictInt] = Field(default=None, description="The minimum percentage of all assigned agents or monitors that must meet the specified criteria to trigger the alert.", alias="minimumSourcesPct")
rounds_violating_mode: Optional[AlertRoundsViolationMode] = Field(default=None, alias="roundsViolatingMode")
Expand All @@ -51,7 +53,7 @@ class RuleDetail(BaseModel):
notifications: Optional[AlertNotification] = None
tests: Optional[List[SimpleTest]] = None
links: Optional[SelfLinks] = Field(default=None, alias="_links")
__properties: ClassVar[List[str]] = ["ruleId", "ruleName", "expression", "direction", "notifyOnClear", "isDefault", "alertType", "minimumSources", "minimumSourcesPct", "roundsViolatingMode", "roundsViolatingOutOf", "roundsViolatingRequired", "includeCoveredPrefixes", "sensitivityLevel", "severity", "notifications", "tests", "_links"]
__properties: ClassVar[List[str]] = ["ruleId", "ruleName", "expression", "direction", "notifyOnClear", "isDefault", "alertType", "alertGroupType", "minimumSources", "minimumSourcesPct", "roundsViolatingMode", "roundsViolatingOutOf", "roundsViolatingRequired", "includeCoveredPrefixes", "sensitivityLevel", "severity", "notifications", "tests", "_links"]

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -129,6 +131,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"notifyOnClear": obj.get("notifyOnClear"),
"isDefault": obj.get("isDefault"),
"alertType": obj.get("alertType"),
"alertGroupType": obj.get("alertGroupType"),
"minimumSources": obj.get("minimumSources"),
"minimumSourcesPct": obj.get("minimumSourcesPct"),
"roundsViolatingMode": obj.get("roundsViolatingMode"),
Expand Down
Loading