Skip to content

Commit 99f801d

Browse files
tshe-teAPI Team
andauthored
[GitHub Bot] Generated python SDK (#113)
Co-authored-by: API Team <[email protected]>
1 parent b34d332 commit 99f801d

File tree

95 files changed

+379
-107
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+379
-107
lines changed

thousandeyes-sdk-administrative/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This API provides the following operations to manage your organization:
1212

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

15-
- API version: 7.0.58
15+
- API version: 7.0.62
1616
- Generator version: 7.6.0
1717
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
1818

thousandeyes-sdk-agents/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Manage Cloud and Enterprise Agents available to your account in ThousandEyes.
55

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

8-
- API version: 7.0.58
8+
- API version: 7.0.62
99
- Generator version: 7.6.0
1010
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
1111

thousandeyes-sdk-alerts/.openapi-generator/FILES

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ README.md
44
docs/Alert.md
55
docs/AlertDetail.md
66
docs/AlertDirection.md
7+
docs/AlertEmbedded.md
78
docs/AlertGroupType.md
89
docs/AlertLinks.md
910
docs/AlertMeta.md
@@ -22,6 +23,7 @@ docs/AlertTestType.md
2223
docs/AlertType.md
2324
docs/Alerts.md
2425
docs/AlertsApi.md
26+
docs/Asn.md
2527
docs/BaseAlert.md
2628
docs/BaseAlertSuppressionWindow.md
2729
docs/BaseRule.md
@@ -73,6 +75,7 @@ src/thousandeyes_sdk/alerts/models/__init__.py
7375
src/thousandeyes_sdk/alerts/models/alert.py
7476
src/thousandeyes_sdk/alerts/models/alert_detail.py
7577
src/thousandeyes_sdk/alerts/models/alert_direction.py
78+
src/thousandeyes_sdk/alerts/models/alert_embedded.py
7679
src/thousandeyes_sdk/alerts/models/alert_group_type.py
7780
src/thousandeyes_sdk/alerts/models/alert_links.py
7881
src/thousandeyes_sdk/alerts/models/alert_meta.py
@@ -88,6 +91,7 @@ src/thousandeyes_sdk/alerts/models/alert_suppression_windows.py
8891
src/thousandeyes_sdk/alerts/models/alert_test_type.py
8992
src/thousandeyes_sdk/alerts/models/alert_type.py
9093
src/thousandeyes_sdk/alerts/models/alerts.py
94+
src/thousandeyes_sdk/alerts/models/asn.py
9195
src/thousandeyes_sdk/alerts/models/base_alert.py
9296
src/thousandeyes_sdk/alerts/models/base_alert_suppression_window.py
9397
src/thousandeyes_sdk/alerts/models/base_rule.py

thousandeyes-sdk-alerts/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ For more information about the alerts, see [Alerts](https://docs.thousandeyes.co
1212

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

15-
- API version: 7.0.58
15+
- API version: 7.0.62
1616
- Generator version: 7.6.0
1717
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
1818

@@ -123,6 +123,7 @@ Class | Method | HTTP request | Description
123123
- [Alert](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-alerts/docs/Alert.md)
124124
- [AlertDetail](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-alerts/docs/AlertDetail.md)
125125
- [AlertDirection](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-alerts/docs/AlertDirection.md)
126+
- [AlertEmbedded](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-alerts/docs/AlertEmbedded.md)
126127
- [AlertGroupType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-alerts/docs/AlertGroupType.md)
127128
- [AlertLinks](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-alerts/docs/AlertLinks.md)
128129
- [AlertMeta](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-alerts/docs/AlertMeta.md)
@@ -138,6 +139,7 @@ Class | Method | HTTP request | Description
138139
- [AlertTestType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-alerts/docs/AlertTestType.md)
139140
- [AlertType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-alerts/docs/AlertType.md)
140141
- [Alerts](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-alerts/docs/Alerts.md)
142+
- [Asn](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-alerts/docs/Asn.md)
141143
- [BaseAlert](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-alerts/docs/BaseAlert.md)
142144
- [BaseAlertSuppressionWindow](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-alerts/docs/BaseAlertSuppressionWindow.md)
143145
- [BaseRule](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-alerts/docs/BaseRule.md)

thousandeyes-sdk-alerts/docs/AlertDetail.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Name | Type | Description | Notes
1919
**alert_state** | [**State**](State.md) | | [optional]
2020
**alert_severity** | [**Severity**](Severity.md) | | [optional]
2121
**details** | [**List[AlertMetricDetail]**](AlertMetricDetail.md) | | [optional]
22+
**embedded** | [**AlertEmbedded**](AlertEmbedded.md) | | [optional]
2223

2324
## Example
2425

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# AlertEmbedded
2+
3+
Container for embedded resources in alert responses (HATEOAS).
4+
5+
## Properties
6+
7+
Name | Type | Description | Notes
8+
------------ | ------------- | ------------- | -------------
9+
**asn** | [**Asn**](Asn.md) | | [optional]
10+
11+
## Example
12+
13+
```python
14+
from thousandeyes_sdk.alerts.models.alert_embedded import AlertEmbedded
15+
16+
# TODO update the JSON string below
17+
json = "{}"
18+
# create an instance of AlertEmbedded from a JSON string
19+
alert_embedded_instance = AlertEmbedded.from_json(json)
20+
# print the JSON string representation of the object
21+
print(AlertEmbedded.to_json())
22+
23+
# convert the object into a dict
24+
alert_embedded_dict = alert_embedded_instance.to_dict()
25+
# create an instance of AlertEmbedded from a dict
26+
alert_embedded_from_dict = AlertEmbedded.from_dict(alert_embedded_dict)
27+
```
28+
[[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+
30+
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Asn
2+
3+
Autonomous System Number (ASN) information for network outage alerts.
4+
5+
## Properties
6+
7+
Name | Type | Description | Notes
8+
------------ | ------------- | ------------- | -------------
9+
**id** | **str** | ASN identifier. | [optional]
10+
**name** | **str** | Autonomous system name. | [optional]
11+
**type** | **str** | Resource type. | [optional]
12+
13+
## Example
14+
15+
```python
16+
from thousandeyes_sdk.alerts.models.asn import Asn
17+
18+
# TODO update the JSON string below
19+
json = "{}"
20+
# create an instance of Asn from a JSON string
21+
asn_instance = Asn.from_json(json)
22+
# print the JSON string representation of the object
23+
print(Asn.to_json())
24+
25+
# convert the object into a dict
26+
asn_dict = asn_instance.to_dict()
27+
# create an instance of Asn from a dict
28+
asn_from_dict = Asn.from_dict(asn_dict)
29+
```
30+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
31+
32+

thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
from thousandeyes_sdk.alerts.models.alert import Alert
2424
from thousandeyes_sdk.alerts.models.alert_detail import AlertDetail
2525
from thousandeyes_sdk.alerts.models.alert_direction import AlertDirection
26+
from thousandeyes_sdk.alerts.models.alert_embedded import AlertEmbedded
2627
from thousandeyes_sdk.alerts.models.alert_group_type import AlertGroupType
2728
from thousandeyes_sdk.alerts.models.alert_links import AlertLinks
2829
from thousandeyes_sdk.alerts.models.alert_meta import AlertMeta
@@ -38,6 +39,7 @@
3839
from thousandeyes_sdk.alerts.models.alert_test_type import AlertTestType
3940
from thousandeyes_sdk.alerts.models.alert_type import AlertType
4041
from thousandeyes_sdk.alerts.models.alerts import Alerts
42+
from thousandeyes_sdk.alerts.models.asn import Asn
4143
from thousandeyes_sdk.alerts.models.base_alert import BaseAlert
4244
from thousandeyes_sdk.alerts.models.base_alert_suppression_window import BaseAlertSuppressionWindow
4345
from thousandeyes_sdk.alerts.models.base_rule import BaseRule

thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from thousandeyes_sdk.alerts.models.alert import Alert
1717
from thousandeyes_sdk.alerts.models.alert_detail import AlertDetail
1818
from thousandeyes_sdk.alerts.models.alert_direction import AlertDirection
19+
from thousandeyes_sdk.alerts.models.alert_embedded import AlertEmbedded
1920
from thousandeyes_sdk.alerts.models.alert_group_type import AlertGroupType
2021
from thousandeyes_sdk.alerts.models.alert_links import AlertLinks
2122
from thousandeyes_sdk.alerts.models.alert_meta import AlertMeta
@@ -31,6 +32,7 @@
3132
from thousandeyes_sdk.alerts.models.alert_test_type import AlertTestType
3233
from thousandeyes_sdk.alerts.models.alert_type import AlertType
3334
from thousandeyes_sdk.alerts.models.alerts import Alerts
35+
from thousandeyes_sdk.alerts.models.asn import Asn
3436
from thousandeyes_sdk.alerts.models.base_alert import BaseAlert
3537
from thousandeyes_sdk.alerts.models.base_alert_suppression_window import BaseAlertSuppressionWindow
3638
from thousandeyes_sdk.alerts.models.base_rule import BaseRule

thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_detail.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
from datetime import datetime
2020
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
2121
from typing import Any, ClassVar, Dict, List, Optional
22+
from thousandeyes_sdk.alerts.models.alert_embedded import AlertEmbedded
2223
from thousandeyes_sdk.alerts.models.alert_links import AlertLinks
2324
from thousandeyes_sdk.alerts.models.alert_meta import AlertMeta
2425
from thousandeyes_sdk.alerts.models.alert_metric_detail import AlertMetricDetail
@@ -46,7 +47,8 @@ class AlertDetail(BaseModel):
4647
alert_state: Optional[State] = Field(default=None, alias="alertState")
4748
alert_severity: Optional[Severity] = Field(default=None, alias="alertSeverity")
4849
details: Optional[List[AlertMetricDetail]] = None
49-
__properties: ClassVar[List[str]] = ["id", "alertType", "startDate", "endDate", "violationCount", "duration", "suppressed", "meta", "_links", "state", "severity", "alertState", "alertSeverity", "details"]
50+
embedded: Optional[AlertEmbedded] = Field(default=None, alias="_embedded")
51+
__properties: ClassVar[List[str]] = ["id", "alertType", "startDate", "endDate", "violationCount", "duration", "suppressed", "meta", "_links", "state", "severity", "alertState", "alertSeverity", "details", "_embedded"]
5052

5153
model_config = ConfigDict(
5254
populate_by_name=True,
@@ -107,6 +109,9 @@ def to_dict(self) -> Dict[str, Any]:
107109
if _item:
108110
_items.append(_item.to_dict())
109111
_dict['details'] = _items
112+
# override the default output from pydantic by calling `to_dict()` of embedded
113+
if self.embedded:
114+
_dict['_embedded'] = self.embedded.to_dict()
110115
return _dict
111116

112117
@classmethod
@@ -132,7 +137,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
132137
"severity": obj.get("severity"),
133138
"alertState": obj.get("alertState"),
134139
"alertSeverity": obj.get("alertSeverity"),
135-
"details": [AlertMetricDetail.from_dict(_item) for _item in obj["details"]] if obj.get("details") is not None else None
140+
"details": [AlertMetricDetail.from_dict(_item) for _item in obj["details"]] if obj.get("details") is not None else None,
141+
"_embedded": AlertEmbedded.from_dict(obj["_embedded"]) if obj.get("_embedded") is not None else None
136142
})
137143
return _obj
138144

0 commit comments

Comments
 (0)