From 1886e002b2f2e506b7355cd8fbab0ce393bc9f32 Mon Sep 17 00:00:00 2001 From: API Team Date: Mon, 30 Sep 2024 15:22:07 +0000 Subject: [PATCH] [GitHub Bot] Generated python SDK --- thousandeyes-sdk-administrative/README.md | 2 +- thousandeyes-sdk-agents/README.md | 2 +- thousandeyes-sdk-alerts/README.md | 2 +- thousandeyes-sdk-bgp-monitors/README.md | 2 +- thousandeyes-sdk-credentials/README.md | 2 +- thousandeyes-sdk-dashboards/README.md | 2 +- thousandeyes-sdk-emulation/README.md | 2 +- thousandeyes-sdk-endpoint-agents/README.md | 2 +- .../README.md | 2 +- .../RunEndpointInstantScheduledTestsApi.md | 9 +- ...un_endpoint_instant_scheduled_tests_api.py | 11 +- ...un_endpoint_instant_scheduled_tests_api.py | 8 + thousandeyes-sdk-endpoint-labels/README.md | 2 +- .../README.md | 2 +- ...est_real_user_endpoint_test_results_api.py | 4 +- thousandeyes-sdk-endpoint-tests/README.md | 2 +- thousandeyes-sdk-event-detection/README.md | 2 +- thousandeyes-sdk-instant-tests/README.md | 2 +- thousandeyes-sdk-internet-insights/README.md | 2 +- thousandeyes-sdk-snapshots/README.md | 2 +- .../.openapi-generator/FILES | 6 + thousandeyes-sdk-streaming/README.md | 5 +- .../docs/CreateStreamResponse.md | 1 + thousandeyes-sdk-streaming/docs/Filters.md | 30 ++ .../docs/FiltersTestTypes.md | 30 ++ .../docs/GetStreamResponse.md | 1 + thousandeyes-sdk-streaming/docs/PutStream.md | 1 + thousandeyes-sdk-streaming/docs/Stream.md | 1 + thousandeyes-sdk-streaming/docs/TagMatch.md | 1 - thousandeyes-sdk-streaming/docs/TestType.md | 12 + .../thousandeyes_sdk/streaming/__init__.py | 3 + .../streaming/models/__init__.py | 3 + .../models/create_stream_response.py | 8 +- .../streaming/models/filters.py | 91 ++++++ .../streaming/models/filters_test_types.py | 88 ++++++ .../streaming/models/get_stream_response.py | 8 +- .../streaming/models/put_stream.py | 8 +- .../streaming/models/stream.py | 8 +- .../streaming/models/tag_match.py | 5 +- .../streaming/models/test_type.py | 52 ++++ .../test/test_streaming_api.py | 135 +++++--- thousandeyes-sdk-tags/README.md | 6 +- .../docs/TagAssignmentApi.md | 25 +- thousandeyes-sdk-tags/docs/TagsApi.md | 42 ++- .../tags/api/tag_assignment_api.py | 31 +- .../src/thousandeyes_sdk/tags/api/tags_api.py | 52 ++-- .../test/test_tag_assignment_api.py | 67 ++++ thousandeyes-sdk-tags/test/test_tags_api.py | 290 ++++++++++++++++++ thousandeyes-sdk-test-results/README.md | 2 +- thousandeyes-sdk-tests/README.md | 2 +- thousandeyes-sdk-usage/README.md | 2 +- 51 files changed, 925 insertions(+), 155 deletions(-) create mode 100644 thousandeyes-sdk-streaming/docs/Filters.md create mode 100644 thousandeyes-sdk-streaming/docs/FiltersTestTypes.md create mode 100644 thousandeyes-sdk-streaming/docs/TestType.md create mode 100644 thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/filters.py create mode 100644 thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/filters_test_types.py create mode 100644 thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/test_type.py diff --git a/thousandeyes-sdk-administrative/README.md b/thousandeyes-sdk-administrative/README.md index dd8422a8..72c5712c 100644 --- a/thousandeyes-sdk-administrative/README.md +++ b/thousandeyes-sdk-administrative/README.md @@ -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.20 +- API version: 7.0.21 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-agents/README.md b/thousandeyes-sdk-agents/README.md index 314f984e..5f427c19 100644 --- a/thousandeyes-sdk-agents/README.md +++ b/thousandeyes-sdk-agents/README.md @@ -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.20 +- API version: 7.0.21 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-alerts/README.md b/thousandeyes-sdk-alerts/README.md index 03c436a1..c4bc23a5 100644 --- a/thousandeyes-sdk-alerts/README.md +++ b/thousandeyes-sdk-alerts/README.md @@ -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.20 +- API version: 7.0.21 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-bgp-monitors/README.md b/thousandeyes-sdk-bgp-monitors/README.md index 674d9285..ed82ae66 100644 --- a/thousandeyes-sdk-bgp-monitors/README.md +++ b/thousandeyes-sdk-bgp-monitors/README.md @@ -9,7 +9,7 @@ For more information about monitors, see [Inside-Out BGP Visibility](https://doc This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.20 +- API version: 7.0.21 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-credentials/README.md b/thousandeyes-sdk-credentials/README.md index 835cf7e6..64d6b3cf 100644 --- a/thousandeyes-sdk-credentials/README.md +++ b/thousandeyes-sdk-credentials/README.md @@ -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.20 +- API version: 7.0.21 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-dashboards/README.md b/thousandeyes-sdk-dashboards/README.md index bb28a7d3..231b2a4d 100644 --- a/thousandeyes-sdk-dashboards/README.md +++ b/thousandeyes-sdk-dashboards/README.md @@ -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.20 +- API version: 7.0.21 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-emulation/README.md b/thousandeyes-sdk-emulation/README.md index 4feefa92..b077ab09 100644 --- a/thousandeyes-sdk-emulation/README.md +++ b/thousandeyes-sdk-emulation/README.md @@ -9,7 +9,7 @@ To access Emulation API operations, the following permissions are required: This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.20 +- API version: 7.0.21 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-endpoint-agents/README.md b/thousandeyes-sdk-endpoint-agents/README.md index 8d949479..f1078179 100644 --- a/thousandeyes-sdk-endpoint-agents/README.md +++ b/thousandeyes-sdk-endpoint-agents/README.md @@ -5,7 +5,7 @@ For more information about Endpoint Agents, see [Endpoint Agents](https://docs.t This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.20 +- API version: 7.0.21 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-endpoint-instant-tests/README.md b/thousandeyes-sdk-endpoint-instant-tests/README.md index 69512046..a12036e7 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/README.md +++ b/thousandeyes-sdk-endpoint-instant-tests/README.md @@ -13,7 +13,7 @@ The URLs for these API test data endpoints are provided within the test definiti This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.20 +- API version: 7.0.21 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-endpoint-instant-tests/docs/RunEndpointInstantScheduledTestsApi.md b/thousandeyes-sdk-endpoint-instant-tests/docs/RunEndpointInstantScheduledTestsApi.md index e63f3cdc..14589e61 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/docs/RunEndpointInstantScheduledTestsApi.md +++ b/thousandeyes-sdk-endpoint-instant-tests/docs/RunEndpointInstantScheduledTestsApi.md @@ -8,7 +8,7 @@ Method | HTTP request | Description # **run_endpoint_scheduled_instant_test** -> run_endpoint_scheduled_instant_test(test_id, aid=aid) +> EndpointRunScheduledInstantTestResult run_endpoint_scheduled_instant_test(test_id, aid=aid) Run endpoint instant scheduled test @@ -20,6 +20,7 @@ Runs an existing endpoint instant scheduled test in ThousandEyes. ```python import thousandeyes_sdk.endpoint_instant_tests +from thousandeyes_sdk.endpoint_instant_tests.models.endpoint_run_scheduled_instant_test_result import EndpointRunScheduledInstantTestResult from thousandeyes_sdk.endpoint_instant_tests.rest import ApiException from pprint import pprint @@ -48,7 +49,9 @@ with thousandeyes_sdk.endpoint_instant_tests.ApiClient(configuration) as api_cli try: # Run endpoint instant scheduled test - api_instance.run_endpoint_scheduled_instant_test(test_id, aid=aid) + api_response = api_instance.run_endpoint_scheduled_instant_test(test_id, aid=aid) + print("The response of RunEndpointInstantScheduledTestsApi->run_endpoint_scheduled_instant_test:\n") + pprint(api_response) except Exception as e: print("Exception when calling RunEndpointInstantScheduledTestsApi->run_endpoint_scheduled_instant_test: %s\n" % e) ``` @@ -65,7 +68,7 @@ Name | Type | Description | Notes ### Return type -void (empty response body) +[**EndpointRunScheduledInstantTestResult**](EndpointRunScheduledInstantTestResult.md) ### Authorization diff --git a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/api/run_endpoint_instant_scheduled_tests_api.py b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/api/run_endpoint_instant_scheduled_tests_api.py index 31a9b57f..fd057104 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/api/run_endpoint_instant_scheduled_tests_api.py +++ b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/api/run_endpoint_instant_scheduled_tests_api.py @@ -21,6 +21,7 @@ import thousandeyes_sdk.endpoint_instant_tests.models from pydantic import Field, StrictStr from typing import Optional from typing_extensions import Annotated +from thousandeyes_sdk.endpoint_instant_tests.models.endpoint_run_scheduled_instant_test_result import EndpointRunScheduledInstantTestResult from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse @@ -58,7 +59,7 @@ class RunEndpointInstantScheduledTestsApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: + ) -> EndpointRunScheduledInstantTestResult: """Run endpoint instant scheduled test Runs an existing endpoint instant scheduled test in ThousandEyes. @@ -99,7 +100,7 @@ class RunEndpointInstantScheduledTestsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, + '200': "EndpointRunScheduledInstantTestResult", '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", @@ -137,7 +138,7 @@ class RunEndpointInstantScheduledTestsApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: + ) -> ApiResponse[EndpointRunScheduledInstantTestResult]: """Run endpoint instant scheduled test Runs an existing endpoint instant scheduled test in ThousandEyes. @@ -178,7 +179,7 @@ class RunEndpointInstantScheduledTestsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, + '200': "EndpointRunScheduledInstantTestResult", '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", @@ -257,7 +258,7 @@ class RunEndpointInstantScheduledTestsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, + '200': "EndpointRunScheduledInstantTestResult", '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", diff --git a/thousandeyes-sdk-endpoint-instant-tests/test/test_run_endpoint_instant_scheduled_tests_api.py b/thousandeyes-sdk-endpoint-instant-tests/test/test_run_endpoint_instant_scheduled_tests_api.py index 273a5f8e..c92701de 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/test/test_run_endpoint_instant_scheduled_tests_api.py +++ b/thousandeyes-sdk-endpoint-instant-tests/test/test_run_endpoint_instant_scheduled_tests_api.py @@ -31,6 +31,14 @@ class TestRunEndpointInstantScheduledTestsApi(unittest.TestCase): def test_run_endpoint_scheduled_instant_test_models_validation(self) -> None: """Test case for run_endpoint_scheduled_instant_test request and response models""" + response_body_json = """ + { + "message" : "Successfully reran the instant scheduled test with testId=765231567" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.endpoint_instant_tests.models.EndpointRunScheduledInstantTestResult.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) if __name__ == '__main__': diff --git a/thousandeyes-sdk-endpoint-labels/README.md b/thousandeyes-sdk-endpoint-labels/README.md index f28e63f9..3bda8cc4 100644 --- a/thousandeyes-sdk-endpoint-labels/README.md +++ b/thousandeyes-sdk-endpoint-labels/README.md @@ -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.20 +- API version: 7.0.21 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-endpoint-test-results/README.md b/thousandeyes-sdk-endpoint-test-results/README.md index 6ddcf6b5..a8eda2cc 100644 --- a/thousandeyes-sdk-endpoint-test-results/README.md +++ b/thousandeyes-sdk-endpoint-test-results/README.md @@ -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.20 +- API version: 7.0.21 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-endpoint-test-results/test/test_real_user_endpoint_test_results_api.py b/thousandeyes-sdk-endpoint-test-results/test/test_real_user_endpoint_test_results_api.py index 0c170d6f..86251992 100644 --- a/thousandeyes-sdk-endpoint-test-results/test/test_real_user_endpoint_test_results_api.py +++ b/thousandeyes-sdk-endpoint-test-results/test/test_real_user_endpoint_test_results_api.py @@ -380,11 +380,11 @@ class TestRealUserEndpointTestResultsApi(unittest.TestCase): "log" : { "browser" : { "name" : "Google Chrome", - "version" : "7.0.20.98" + "version" : "7.0.21.98" }, "creator" : { "name" : "ThousandEyes Endpoint Agent", - "version" : "7.0.20" + "version" : "7.0.21" }, "entries" : [ { "pageref" : "page_1", diff --git a/thousandeyes-sdk-endpoint-tests/README.md b/thousandeyes-sdk-endpoint-tests/README.md index 29a0871b..994d4f24 100644 --- a/thousandeyes-sdk-endpoint-tests/README.md +++ b/thousandeyes-sdk-endpoint-tests/README.md @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.20 +- API version: 7.0.21 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-event-detection/README.md b/thousandeyes-sdk-event-detection/README.md index 2d6709ce..6d7883d7 100644 --- a/thousandeyes-sdk-event-detection/README.md +++ b/thousandeyes-sdk-event-detection/README.md @@ -12,7 +12,7 @@ With the Events API, you can perform the following tasks on the ThousandEyes pla This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.20 +- API version: 7.0.21 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-instant-tests/README.md b/thousandeyes-sdk-instant-tests/README.md index e00eb7a0..c993c953 100644 --- a/thousandeyes-sdk-instant-tests/README.md +++ b/thousandeyes-sdk-instant-tests/README.md @@ -8,7 +8,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.20 +- API version: 7.0.21 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-internet-insights/README.md b/thousandeyes-sdk-internet-insights/README.md index 3db0eee3..197d23b0 100644 --- a/thousandeyes-sdk-internet-insights/README.md +++ b/thousandeyes-sdk-internet-insights/README.md @@ -14,7 +14,7 @@ For more information about Internet Insights, see the [Internet Insights](https: This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.20 +- API version: 7.0.21 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-snapshots/README.md b/thousandeyes-sdk-snapshots/README.md index 09887aff..0ef8e6d3 100644 --- a/thousandeyes-sdk-snapshots/README.md +++ b/thousandeyes-sdk-snapshots/README.md @@ -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.20 +- API version: 7.0.21 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-streaming/.openapi-generator/FILES b/thousandeyes-sdk-streaming/.openapi-generator/FILES index d2e4ae8f..eb643223 100644 --- a/thousandeyes-sdk-streaming/.openapi-generator/FILES +++ b/thousandeyes-sdk-streaming/.openapi-generator/FILES @@ -11,6 +11,8 @@ docs/DataModelVersion.md docs/EndpointType.md docs/ExporterConfig.md docs/ExporterConfigSplunkHec.md +docs/Filters.md +docs/FiltersTestTypes.md docs/GetStreamResponse.md docs/PutStream.md docs/Stream.md @@ -23,6 +25,7 @@ docs/TagMatch.md docs/TagMatchObjectType.md docs/TestMatch.md docs/TestMatchDomain.md +docs/TestType.md docs/UnauthorizedError.md pyproject.toml setup.cfg @@ -40,6 +43,8 @@ src/thousandeyes_sdk/streaming/models/data_model_version.py src/thousandeyes_sdk/streaming/models/endpoint_type.py src/thousandeyes_sdk/streaming/models/exporter_config.py src/thousandeyes_sdk/streaming/models/exporter_config_splunk_hec.py +src/thousandeyes_sdk/streaming/models/filters.py +src/thousandeyes_sdk/streaming/models/filters_test_types.py src/thousandeyes_sdk/streaming/models/get_stream_response.py src/thousandeyes_sdk/streaming/models/put_stream.py src/thousandeyes_sdk/streaming/models/stream.py @@ -51,6 +56,7 @@ src/thousandeyes_sdk/streaming/models/tag_match.py src/thousandeyes_sdk/streaming/models/tag_match_object_type.py src/thousandeyes_sdk/streaming/models/test_match.py src/thousandeyes_sdk/streaming/models/test_match_domain.py +src/thousandeyes_sdk/streaming/models/test_type.py src/thousandeyes_sdk/streaming/models/unauthorized_error.py src/thousandeyes_sdk/streaming/py.typed test/__init__.py diff --git a/thousandeyes-sdk-streaming/README.md b/thousandeyes-sdk-streaming/README.md index 3f9823fe..c6098527 100644 --- a/thousandeyes-sdk-streaming/README.md +++ b/thousandeyes-sdk-streaming/README.md @@ -15,7 +15,7 @@ For more information about ThousandEyes for OpenTelemetry, see the [documentatio This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.20 +- API version: 7.0.21 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator @@ -126,6 +126,8 @@ Class | Method | HTTP request | Description - [EndpointType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-streaming/docs/EndpointType.md) - [ExporterConfig](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-streaming/docs/ExporterConfig.md) - [ExporterConfigSplunkHec](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-streaming/docs/ExporterConfigSplunkHec.md) + - [Filters](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-streaming/docs/Filters.md) + - [FiltersTestTypes](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-streaming/docs/FiltersTestTypes.md) - [GetStreamResponse](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-streaming/docs/GetStreamResponse.md) - [PutStream](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-streaming/docs/PutStream.md) - [Stream](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-streaming/docs/Stream.md) @@ -137,6 +139,7 @@ Class | Method | HTTP request | Description - [TagMatchObjectType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-streaming/docs/TagMatchObjectType.md) - [TestMatch](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-streaming/docs/TestMatch.md) - [TestMatchDomain](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-streaming/docs/TestMatchDomain.md) + - [TestType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-streaming/docs/TestType.md) - [UnauthorizedError](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-streaming/docs/UnauthorizedError.md) diff --git a/thousandeyes-sdk-streaming/docs/CreateStreamResponse.md b/thousandeyes-sdk-streaming/docs/CreateStreamResponse.md index 4bb37aa1..0e3a8d3f 100644 --- a/thousandeyes-sdk-streaming/docs/CreateStreamResponse.md +++ b/thousandeyes-sdk-streaming/docs/CreateStreamResponse.md @@ -15,6 +15,7 @@ Name | Type | Description | Notes **custom_headers** | **Dict[str, str]** | Custom headers. **Note**: When using the `splunk-hec` `type`, the `customHeaders` must contain just one element with the key `token` and the value of the *Splunk HEC Token*. | [optional] **tag_match** | [**List[TagMatch]**](TagMatch.md) | A collection of tags that determine what tests are included in the data stream. These tag values are also included as attributes in the data stream metrics. | [optional] **test_match** | [**List[TestMatch]**](TestMatch.md) | A collection of tests to be included in the data stream. | [optional] +**filters** | [**Filters**](Filters.md) | | [optional] **exporter_config** | [**ExporterConfig**](ExporterConfig.md) | | [optional] **audit_operation** | [**AuditOperation**](AuditOperation.md) | | [optional] diff --git a/thousandeyes-sdk-streaming/docs/Filters.md b/thousandeyes-sdk-streaming/docs/Filters.md new file mode 100644 index 00000000..259267f0 --- /dev/null +++ b/thousandeyes-sdk-streaming/docs/Filters.md @@ -0,0 +1,30 @@ +# Filters + +Provides the ability to filter data points based on the specified test types. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**test_types** | [**FiltersTestTypes**](FiltersTestTypes.md) | | [optional] + +## Example + +```python +from thousandeyes_sdk.streaming.models.filters import Filters + +# TODO update the JSON string below +json = "{}" +# create an instance of Filters from a JSON string +filters_instance = Filters.from_json(json) +# print the JSON string representation of the object +print(Filters.to_json()) + +# convert the object into a dict +filters_dict = filters_instance.to_dict() +# create an instance of Filters from a dict +filters_from_dict = Filters.from_dict(filters_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) + + diff --git a/thousandeyes-sdk-streaming/docs/FiltersTestTypes.md b/thousandeyes-sdk-streaming/docs/FiltersTestTypes.md new file mode 100644 index 00000000..40320195 --- /dev/null +++ b/thousandeyes-sdk-streaming/docs/FiltersTestTypes.md @@ -0,0 +1,30 @@ +# FiltersTestTypes + +Test types that can be used for filtering data points. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**values** | [**List[TestType]**](TestType.md) | A list of test types to filter data points. | [optional] + +## Example + +```python +from thousandeyes_sdk.streaming.models.filters_test_types import FiltersTestTypes + +# TODO update the JSON string below +json = "{}" +# create an instance of FiltersTestTypes from a JSON string +filters_test_types_instance = FiltersTestTypes.from_json(json) +# print the JSON string representation of the object +print(FiltersTestTypes.to_json()) + +# convert the object into a dict +filters_test_types_dict = filters_test_types_instance.to_dict() +# create an instance of FiltersTestTypes from a dict +filters_test_types_from_dict = FiltersTestTypes.from_dict(filters_test_types_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) + + diff --git a/thousandeyes-sdk-streaming/docs/GetStreamResponse.md b/thousandeyes-sdk-streaming/docs/GetStreamResponse.md index 1570902b..0da2ce35 100644 --- a/thousandeyes-sdk-streaming/docs/GetStreamResponse.md +++ b/thousandeyes-sdk-streaming/docs/GetStreamResponse.md @@ -15,6 +15,7 @@ Name | Type | Description | Notes **custom_headers** | **Dict[str, str]** | Custom headers. **Note**: When using the `splunk-hec` `type`, the `customHeaders` must contain just one element with the key `token` and the value of the *Splunk HEC Token*. | [optional] **tag_match** | [**List[TagMatch]**](TagMatch.md) | A collection of tags that determine what tests are included in the data stream. These tag values are also included as attributes in the data stream metrics. | [optional] **test_match** | [**List[TestMatch]**](TestMatch.md) | A collection of tests to be included in the data stream. | [optional] +**filters** | [**Filters**](Filters.md) | | [optional] **exporter_config** | [**ExporterConfig**](ExporterConfig.md) | | [optional] **audit_operation** | [**AuditOperationWithUpdate**](AuditOperationWithUpdate.md) | | [optional] diff --git a/thousandeyes-sdk-streaming/docs/PutStream.md b/thousandeyes-sdk-streaming/docs/PutStream.md index ef892312..871eb454 100644 --- a/thousandeyes-sdk-streaming/docs/PutStream.md +++ b/thousandeyes-sdk-streaming/docs/PutStream.md @@ -9,6 +9,7 @@ Name | Type | Description | Notes **tag_match** | [**List[TagMatch]**](TagMatch.md) | A collection of tags that determine what tests are included in the data stream. These tag values are also included as attributes in the data stream metrics. | [optional] **test_match** | [**List[TestMatch]**](TestMatch.md) | A collection of tests to be included in the data stream. | [optional] **enabled** | **bool** | Flag to enable or disable the stream integration. | [optional] +**filters** | [**Filters**](Filters.md) | | [optional] **exporter_config** | [**ExporterConfig**](ExporterConfig.md) | | [optional] ## Example diff --git a/thousandeyes-sdk-streaming/docs/Stream.md b/thousandeyes-sdk-streaming/docs/Stream.md index 3e100f2c..8340284e 100644 --- a/thousandeyes-sdk-streaming/docs/Stream.md +++ b/thousandeyes-sdk-streaming/docs/Stream.md @@ -9,6 +9,7 @@ Name | Type | Description | Notes **tag_match** | [**List[TagMatch]**](TagMatch.md) | A collection of tags that determine what tests are included in the data stream. These tag values are also included as attributes in the data stream metrics. | [optional] **test_match** | [**List[TestMatch]**](TestMatch.md) | A collection of tests to be included in the data stream. | [optional] **enabled** | **bool** | Flag to enable or disable the stream integration. | [optional] +**filters** | [**Filters**](Filters.md) | | [optional] **exporter_config** | [**ExporterConfig**](ExporterConfig.md) | | [optional] **type** | [**StreamType**](StreamType.md) | | [optional] **endpoint_type** | [**EndpointType**](EndpointType.md) | | [optional] diff --git a/thousandeyes-sdk-streaming/docs/TagMatch.md b/thousandeyes-sdk-streaming/docs/TagMatch.md index f1902d84..e686d0d2 100644 --- a/thousandeyes-sdk-streaming/docs/TagMatch.md +++ b/thousandeyes-sdk-streaming/docs/TagMatch.md @@ -5,7 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**object_type** | [**TagMatchObjectType**](TagMatchObjectType.md) | | [optional] **key** | **str** | The name of the tag key to match | [optional] **value** | **str** | The value of the tag to match | [optional] diff --git a/thousandeyes-sdk-streaming/docs/TestType.md b/thousandeyes-sdk-streaming/docs/TestType.md new file mode 100644 index 00000000..8093a739 --- /dev/null +++ b/thousandeyes-sdk-streaming/docs/TestType.md @@ -0,0 +1,12 @@ +# TestType + +This is a read only value, as test type is implicit in the test creation url. + +## 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) + + diff --git a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/__init__.py b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/__init__.py index b54dc1b7..b9ab7cb8 100644 --- a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/__init__.py +++ b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/__init__.py @@ -28,6 +28,8 @@ from thousandeyes_sdk.streaming.models.data_model_version import DataModelVersio from thousandeyes_sdk.streaming.models.endpoint_type import EndpointType from thousandeyes_sdk.streaming.models.exporter_config import ExporterConfig from thousandeyes_sdk.streaming.models.exporter_config_splunk_hec import ExporterConfigSplunkHec +from thousandeyes_sdk.streaming.models.filters import Filters +from thousandeyes_sdk.streaming.models.filters_test_types import FiltersTestTypes from thousandeyes_sdk.streaming.models.get_stream_response import GetStreamResponse from thousandeyes_sdk.streaming.models.put_stream import PutStream from thousandeyes_sdk.streaming.models.stream import Stream @@ -39,4 +41,5 @@ from thousandeyes_sdk.streaming.models.tag_match import TagMatch from thousandeyes_sdk.streaming.models.tag_match_object_type import TagMatchObjectType from thousandeyes_sdk.streaming.models.test_match import TestMatch from thousandeyes_sdk.streaming.models.test_match_domain import TestMatchDomain +from thousandeyes_sdk.streaming.models.test_type import TestType from thousandeyes_sdk.streaming.models.unauthorized_error import UnauthorizedError diff --git a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/__init__.py b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/__init__.py index 888a5f23..594bbedf 100644 --- a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/__init__.py +++ b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/__init__.py @@ -23,6 +23,8 @@ from thousandeyes_sdk.streaming.models.data_model_version import DataModelVersio from thousandeyes_sdk.streaming.models.endpoint_type import EndpointType from thousandeyes_sdk.streaming.models.exporter_config import ExporterConfig from thousandeyes_sdk.streaming.models.exporter_config_splunk_hec import ExporterConfigSplunkHec +from thousandeyes_sdk.streaming.models.filters import Filters +from thousandeyes_sdk.streaming.models.filters_test_types import FiltersTestTypes from thousandeyes_sdk.streaming.models.get_stream_response import GetStreamResponse from thousandeyes_sdk.streaming.models.put_stream import PutStream from thousandeyes_sdk.streaming.models.stream import Stream @@ -34,4 +36,5 @@ from thousandeyes_sdk.streaming.models.tag_match import TagMatch from thousandeyes_sdk.streaming.models.tag_match_object_type import TagMatchObjectType from thousandeyes_sdk.streaming.models.test_match import TestMatch from thousandeyes_sdk.streaming.models.test_match_domain import TestMatchDomain +from thousandeyes_sdk.streaming.models.test_type import TestType from thousandeyes_sdk.streaming.models.unauthorized_error import UnauthorizedError diff --git a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/create_stream_response.py b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/create_stream_response.py index 6c34311e..46c7a9cf 100644 --- a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/create_stream_response.py +++ b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/create_stream_response.py @@ -22,6 +22,7 @@ from thousandeyes_sdk.streaming.models.audit_operation import AuditOperation from thousandeyes_sdk.streaming.models.data_model_version import DataModelVersion from thousandeyes_sdk.streaming.models.endpoint_type import EndpointType from thousandeyes_sdk.streaming.models.exporter_config import ExporterConfig +from thousandeyes_sdk.streaming.models.filters import Filters from thousandeyes_sdk.streaming.models.stream_links import StreamLinks from thousandeyes_sdk.streaming.models.stream_type import StreamType from thousandeyes_sdk.streaming.models.tag_match import TagMatch @@ -43,9 +44,10 @@ class CreateStreamResponse(BaseModel): custom_headers: Optional[Dict[str, StrictStr]] = Field(default=None, description="Custom headers. **Note**: When using the `splunk-hec` `type`, the `customHeaders` must contain just one element with the key `token` and the value of the *Splunk HEC Token*.", alias="customHeaders") tag_match: Optional[List[TagMatch]] = Field(default=None, description="A collection of tags that determine what tests are included in the data stream. These tag values are also included as attributes in the data stream metrics.", alias="tagMatch") test_match: Optional[List[TestMatch]] = Field(default=None, description="A collection of tests to be included in the data stream.", alias="testMatch") + filters: Optional[Filters] = None exporter_config: Optional[ExporterConfig] = Field(default=None, alias="exporterConfig") audit_operation: Optional[AuditOperation] = Field(default=None, alias="auditOperation") - __properties: ClassVar[List[str]] = ["id", "enabled", "_links", "type", "endpointType", "streamEndpointUrl", "dataModelVersion", "customHeaders", "tagMatch", "testMatch", "exporterConfig", "auditOperation"] + __properties: ClassVar[List[str]] = ["id", "enabled", "_links", "type", "endpointType", "streamEndpointUrl", "dataModelVersion", "customHeaders", "tagMatch", "testMatch", "filters", "exporterConfig", "auditOperation"] model_config = ConfigDict( populate_by_name=True, @@ -106,6 +108,9 @@ class CreateStreamResponse(BaseModel): if _item: _items.append(_item.to_dict()) _dict['testMatch'] = _items + # override the default output from pydantic by calling `to_dict()` of filters + if self.filters: + _dict['filters'] = self.filters.to_dict() # override the default output from pydantic by calling `to_dict()` of exporter_config if self.exporter_config: _dict['exporterConfig'] = self.exporter_config.to_dict() @@ -134,6 +139,7 @@ class CreateStreamResponse(BaseModel): "customHeaders": obj.get("customHeaders"), "tagMatch": [TagMatch.from_dict(_item) for _item in obj["tagMatch"]] if obj.get("tagMatch") is not None else None, "testMatch": [TestMatch.from_dict(_item) for _item in obj["testMatch"]] if obj.get("testMatch") is not None else None, + "filters": Filters.from_dict(obj["filters"]) if obj.get("filters") is not None else None, "exporterConfig": ExporterConfig.from_dict(obj["exporterConfig"]) if obj.get("exporterConfig") is not None else None, "auditOperation": AuditOperation.from_dict(obj["auditOperation"]) if obj.get("auditOperation") is not None else None }) diff --git a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/filters.py b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/filters.py new file mode 100644 index 00000000..b54b8967 --- /dev/null +++ b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/filters.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + ThousandEyes for OpenTelemetry API + + ThousandEyes for OpenTelemetry provides machine-to-machine integration between ThousandEyes and its customers. It allows you to export ThousandEyes telemetry data in OTel format, which is widely used in the industry. With ThousandEyes for OTel, you can leverage frameworks widely used in the observability domain - such as Splunk, Grafana, and Honeycomb - to capture and analyze ThousandEyes data. Any client that supports OTel can use ThousandEyes for OpenTelemetry. ThousandEyes for OTel is made up of the following components: * Data streaming APIs that you can use to configure and enable your ThousandEyes tests with OTel-compatible streams, in particular to configure how ThousandEyes telemetry data is exported to client integrations. * A set of streaming pipelines called _collectors_ that actively fetch ThousandEyes network test data, enrich the data with some additional detail, filter, and push the data to the customer-configured endpoints, depending on what you configure via the public APIs. * Third-party OTel collectors that receive, transform, filter, and export different metrics to client applications such as AppD, or any other OTel-capable client configuration. For more information about ThousandEyes for OpenTelemetry, see the [documentation](https://docs.thousandeyes.com/product-documentation/api/opentelemetry). + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from thousandeyes_sdk.streaming.models.filters_test_types import FiltersTestTypes +from typing import Optional, Set +from typing_extensions import Self + +class Filters(BaseModel): + """ + Provides the ability to filter data points based on the specified test types. + """ # noqa: E501 + test_types: Optional[FiltersTestTypes] = Field(default=None, alias="testTypes") + __properties: ClassVar[List[str]] = ["testTypes"] + + 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 Filters from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of test_types + if self.test_types: + _dict['testTypes'] = self.test_types.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Filters from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "testTypes": FiltersTestTypes.from_dict(obj["testTypes"]) if obj.get("testTypes") is not None else None + }) + return _obj + + diff --git a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/filters_test_types.py b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/filters_test_types.py new file mode 100644 index 00000000..b53c0e9a --- /dev/null +++ b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/filters_test_types.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + ThousandEyes for OpenTelemetry API + + ThousandEyes for OpenTelemetry provides machine-to-machine integration between ThousandEyes and its customers. It allows you to export ThousandEyes telemetry data in OTel format, which is widely used in the industry. With ThousandEyes for OTel, you can leverage frameworks widely used in the observability domain - such as Splunk, Grafana, and Honeycomb - to capture and analyze ThousandEyes data. Any client that supports OTel can use ThousandEyes for OpenTelemetry. ThousandEyes for OTel is made up of the following components: * Data streaming APIs that you can use to configure and enable your ThousandEyes tests with OTel-compatible streams, in particular to configure how ThousandEyes telemetry data is exported to client integrations. * A set of streaming pipelines called _collectors_ that actively fetch ThousandEyes network test data, enrich the data with some additional detail, filter, and push the data to the customer-configured endpoints, depending on what you configure via the public APIs. * Third-party OTel collectors that receive, transform, filter, and export different metrics to client applications such as AppD, or any other OTel-capable client configuration. For more information about ThousandEyes for OpenTelemetry, see the [documentation](https://docs.thousandeyes.com/product-documentation/api/opentelemetry). + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from thousandeyes_sdk.streaming.models.test_type import TestType +from typing import Optional, Set +from typing_extensions import Self + +class FiltersTestTypes(BaseModel): + """ + Test types that can be used for filtering data points. + """ # noqa: E501 + values: Optional[List[TestType]] = Field(default=None, description="A list of test types to filter data points.") + __properties: ClassVar[List[str]] = ["values"] + + 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 FiltersTestTypes from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FiltersTestTypes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "values": obj.get("values") + }) + return _obj + + diff --git a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/get_stream_response.py b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/get_stream_response.py index 7a604f29..f0b3eeb0 100644 --- a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/get_stream_response.py +++ b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/get_stream_response.py @@ -22,6 +22,7 @@ from thousandeyes_sdk.streaming.models.audit_operation_with_update import AuditO from thousandeyes_sdk.streaming.models.data_model_version import DataModelVersion from thousandeyes_sdk.streaming.models.endpoint_type import EndpointType from thousandeyes_sdk.streaming.models.exporter_config import ExporterConfig +from thousandeyes_sdk.streaming.models.filters import Filters from thousandeyes_sdk.streaming.models.stream_links import StreamLinks from thousandeyes_sdk.streaming.models.stream_type import StreamType from thousandeyes_sdk.streaming.models.tag_match import TagMatch @@ -43,9 +44,10 @@ class GetStreamResponse(BaseModel): custom_headers: Optional[Dict[str, StrictStr]] = Field(default=None, description="Custom headers. **Note**: When using the `splunk-hec` `type`, the `customHeaders` must contain just one element with the key `token` and the value of the *Splunk HEC Token*.", alias="customHeaders") tag_match: Optional[List[TagMatch]] = Field(default=None, description="A collection of tags that determine what tests are included in the data stream. These tag values are also included as attributes in the data stream metrics.", alias="tagMatch") test_match: Optional[List[TestMatch]] = Field(default=None, description="A collection of tests to be included in the data stream.", alias="testMatch") + filters: Optional[Filters] = None exporter_config: Optional[ExporterConfig] = Field(default=None, alias="exporterConfig") audit_operation: Optional[AuditOperationWithUpdate] = Field(default=None, alias="auditOperation") - __properties: ClassVar[List[str]] = ["id", "enabled", "_links", "type", "endpointType", "streamEndpointUrl", "dataModelVersion", "customHeaders", "tagMatch", "testMatch", "exporterConfig", "auditOperation"] + __properties: ClassVar[List[str]] = ["id", "enabled", "_links", "type", "endpointType", "streamEndpointUrl", "dataModelVersion", "customHeaders", "tagMatch", "testMatch", "filters", "exporterConfig", "auditOperation"] model_config = ConfigDict( populate_by_name=True, @@ -106,6 +108,9 @@ class GetStreamResponse(BaseModel): if _item: _items.append(_item.to_dict()) _dict['testMatch'] = _items + # override the default output from pydantic by calling `to_dict()` of filters + if self.filters: + _dict['filters'] = self.filters.to_dict() # override the default output from pydantic by calling `to_dict()` of exporter_config if self.exporter_config: _dict['exporterConfig'] = self.exporter_config.to_dict() @@ -134,6 +139,7 @@ class GetStreamResponse(BaseModel): "customHeaders": obj.get("customHeaders"), "tagMatch": [TagMatch.from_dict(_item) for _item in obj["tagMatch"]] if obj.get("tagMatch") is not None else None, "testMatch": [TestMatch.from_dict(_item) for _item in obj["testMatch"]] if obj.get("testMatch") is not None else None, + "filters": Filters.from_dict(obj["filters"]) if obj.get("filters") is not None else None, "exporterConfig": ExporterConfig.from_dict(obj["exporterConfig"]) if obj.get("exporterConfig") is not None else None, "auditOperation": AuditOperationWithUpdate.from_dict(obj["auditOperation"]) if obj.get("auditOperation") is not None else None }) diff --git a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/put_stream.py b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/put_stream.py index 57c23648..05caaa31 100644 --- a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/put_stream.py +++ b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/put_stream.py @@ -19,6 +19,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from thousandeyes_sdk.streaming.models.exporter_config import ExporterConfig +from thousandeyes_sdk.streaming.models.filters import Filters from thousandeyes_sdk.streaming.models.tag_match import TagMatch from thousandeyes_sdk.streaming.models.test_match import TestMatch from typing import Optional, Set @@ -32,8 +33,9 @@ class PutStream(BaseModel): tag_match: Optional[List[TagMatch]] = Field(default=None, description="A collection of tags that determine what tests are included in the data stream. These tag values are also included as attributes in the data stream metrics.", alias="tagMatch") test_match: Optional[List[TestMatch]] = Field(default=None, description="A collection of tests to be included in the data stream.", alias="testMatch") enabled: Optional[StrictBool] = Field(default=None, description="Flag to enable or disable the stream integration.") + filters: Optional[Filters] = None exporter_config: Optional[ExporterConfig] = Field(default=None, alias="exporterConfig") - __properties: ClassVar[List[str]] = ["customHeaders", "tagMatch", "testMatch", "enabled", "exporterConfig"] + __properties: ClassVar[List[str]] = ["customHeaders", "tagMatch", "testMatch", "enabled", "filters", "exporterConfig"] model_config = ConfigDict( populate_by_name=True, @@ -89,6 +91,9 @@ class PutStream(BaseModel): if _item: _items.append(_item.to_dict()) _dict['testMatch'] = _items + # override the default output from pydantic by calling `to_dict()` of filters + if self.filters: + _dict['filters'] = self.filters.to_dict() # override the default output from pydantic by calling `to_dict()` of exporter_config if self.exporter_config: _dict['exporterConfig'] = self.exporter_config.to_dict() @@ -108,6 +113,7 @@ class PutStream(BaseModel): "tagMatch": [TagMatch.from_dict(_item) for _item in obj["tagMatch"]] if obj.get("tagMatch") is not None else None, "testMatch": [TestMatch.from_dict(_item) for _item in obj["testMatch"]] if obj.get("testMatch") is not None else None, "enabled": obj.get("enabled"), + "filters": Filters.from_dict(obj["filters"]) if obj.get("filters") is not None else None, "exporterConfig": ExporterConfig.from_dict(obj["exporterConfig"]) if obj.get("exporterConfig") is not None else None }) return _obj diff --git a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/stream.py b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/stream.py index 41f8b845..79e344e4 100644 --- a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/stream.py +++ b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/stream.py @@ -21,6 +21,7 @@ from typing import Any, ClassVar, Dict, List, Optional from thousandeyes_sdk.streaming.models.data_model_version import DataModelVersion from thousandeyes_sdk.streaming.models.endpoint_type import EndpointType from thousandeyes_sdk.streaming.models.exporter_config import ExporterConfig +from thousandeyes_sdk.streaming.models.filters import Filters from thousandeyes_sdk.streaming.models.stream_type import StreamType from thousandeyes_sdk.streaming.models.tag_match import TagMatch from thousandeyes_sdk.streaming.models.test_match import TestMatch @@ -35,12 +36,13 @@ class Stream(BaseModel): tag_match: Optional[List[TagMatch]] = Field(default=None, description="A collection of tags that determine what tests are included in the data stream. These tag values are also included as attributes in the data stream metrics.", alias="tagMatch") test_match: Optional[List[TestMatch]] = Field(default=None, description="A collection of tests to be included in the data stream.", alias="testMatch") enabled: Optional[StrictBool] = Field(default=None, description="Flag to enable or disable the stream integration.") + filters: Optional[Filters] = None exporter_config: Optional[ExporterConfig] = Field(default=None, alias="exporterConfig") type: Optional[StreamType] = None endpoint_type: Optional[EndpointType] = Field(default=None, alias="endpointType") stream_endpoint_url: Optional[StrictStr] = Field(default=None, description="The URL ThousandEyes sends data stream to. For a URL to be valid, it needs to: - Be syntactically correct. - Be reachable. - Use the HTTPS protocol. - When using the `grpc` endpointType, streamEndpointUrl cannot contain paths: - Valid . `grpc` - `https://example.com` - Invalid . `grpc` - `https://example.com/collector`. - Valid . `http` - `https://example.com/collector`. - When using the `http` endpointType, the operation must match the exact final full URL (including the path if there is one) to which the metrics will be sent. Examples below: - `https://api.honeycomb.io:443/v1/metrics` - `https://ingest.eu0.signalfx.com/v2/datapoint/otlp`", alias="streamEndpointUrl") data_model_version: Optional[DataModelVersion] = Field(default=None, alias="dataModelVersion") - __properties: ClassVar[List[str]] = ["customHeaders", "tagMatch", "testMatch", "enabled", "exporterConfig", "type", "endpointType", "streamEndpointUrl", "dataModelVersion"] + __properties: ClassVar[List[str]] = ["customHeaders", "tagMatch", "testMatch", "enabled", "filters", "exporterConfig", "type", "endpointType", "streamEndpointUrl", "dataModelVersion"] model_config = ConfigDict( populate_by_name=True, @@ -96,6 +98,9 @@ class Stream(BaseModel): if _item: _items.append(_item.to_dict()) _dict['testMatch'] = _items + # override the default output from pydantic by calling `to_dict()` of filters + if self.filters: + _dict['filters'] = self.filters.to_dict() # override the default output from pydantic by calling `to_dict()` of exporter_config if self.exporter_config: _dict['exporterConfig'] = self.exporter_config.to_dict() @@ -115,6 +120,7 @@ class Stream(BaseModel): "tagMatch": [TagMatch.from_dict(_item) for _item in obj["tagMatch"]] if obj.get("tagMatch") is not None else None, "testMatch": [TestMatch.from_dict(_item) for _item in obj["testMatch"]] if obj.get("testMatch") is not None else None, "enabled": obj.get("enabled"), + "filters": Filters.from_dict(obj["filters"]) if obj.get("filters") is not None else None, "exporterConfig": ExporterConfig.from_dict(obj["exporterConfig"]) if obj.get("exporterConfig") is not None else None, "type": obj.get("type"), "endpointType": obj.get("endpointType"), diff --git a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/tag_match.py b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/tag_match.py index 82d3792b..7047a8b7 100644 --- a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/tag_match.py +++ b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/tag_match.py @@ -18,7 +18,6 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from thousandeyes_sdk.streaming.models.tag_match_object_type import TagMatchObjectType from typing import Optional, Set from typing_extensions import Self @@ -26,10 +25,9 @@ class TagMatch(BaseModel): """ TagMatch """ # noqa: E501 - object_type: Optional[TagMatchObjectType] = Field(default=None, alias="objectType") key: Optional[StrictStr] = Field(default=None, description="The name of the tag key to match") value: Optional[StrictStr] = Field(default=None, description="The value of the tag to match") - __properties: ClassVar[List[str]] = ["objectType", "key", "value"] + __properties: ClassVar[List[str]] = ["key", "value"] model_config = ConfigDict( populate_by_name=True, @@ -83,7 +81,6 @@ class TagMatch(BaseModel): return cls.model_validate(obj) _obj = cls.model_validate({ - "objectType": obj.get("objectType"), "key": obj.get("key"), "value": obj.get("value") }) diff --git a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/test_type.py b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/test_type.py new file mode 100644 index 00000000..03d0a6b0 --- /dev/null +++ b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/test_type.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + ThousandEyes for OpenTelemetry API + + ThousandEyes for OpenTelemetry provides machine-to-machine integration between ThousandEyes and its customers. It allows you to export ThousandEyes telemetry data in OTel format, which is widely used in the industry. With ThousandEyes for OTel, you can leverage frameworks widely used in the observability domain - such as Splunk, Grafana, and Honeycomb - to capture and analyze ThousandEyes data. Any client that supports OTel can use ThousandEyes for OpenTelemetry. ThousandEyes for OTel is made up of the following components: * Data streaming APIs that you can use to configure and enable your ThousandEyes tests with OTel-compatible streams, in particular to configure how ThousandEyes telemetry data is exported to client integrations. * A set of streaming pipelines called _collectors_ that actively fetch ThousandEyes network test data, enrich the data with some additional detail, filter, and push the data to the customer-configured endpoints, depending on what you configure via the public APIs. * Third-party OTel collectors that receive, transform, filter, and export different metrics to client applications such as AppD, or any other OTel-capable client configuration. For more information about ThousandEyes for OpenTelemetry, see the [documentation](https://docs.thousandeyes.com/product-documentation/api/opentelemetry). + + 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 TestType(str, Enum): + """ + This is a read only value, as test type is implicit in the test creation url. + """ + + """ + allowed enum values + """ + API = 'api' + AGENT_MINUS_TO_MINUS_AGENT = 'agent-to-agent' + AGENT_MINUS_TO_MINUS_SERVER = 'agent-to-server' + BGP = 'bgp' + HTTP_MINUS_SERVER = 'http-server' + PAGE_MINUS_LOAD = 'page-load' + WEB_MINUS_TRANSACTIONS = 'web-transactions' + FTP_MINUS_SERVER = 'ftp-server' + DNS_MINUS_TRACE = 'dns-trace' + DNS_MINUS_SERVER = 'dns-server' + DNSSEC = 'dnssec' + SIP_MINUS_SERVER = 'sip-server' + VOICE = 'voice' + UNKNOWN = 'unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TestType from a JSON string""" + return cls(json.loads(json_str)) + + @classmethod + def _missing_(cls, value): + """Handle unknown values""" + return cls.UNKNOWN + diff --git a/thousandeyes-sdk-streaming/test/test_streaming_api.py b/thousandeyes-sdk-streaming/test/test_streaming_api.py index 51adcd48..5af296e2 100644 --- a/thousandeyes-sdk-streaming/test/test_streaming_api.py +++ b/thousandeyes-sdk-streaming/test/test_streaming_api.py @@ -56,6 +56,11 @@ class TestStreamingApi(unittest.TestCase): "key" : "keyB", "value" : "valueB" } ], + "filters" : { + "testTypes" : { + "values" : [ "agent-to-server", "bgp", "http-server" ] + } + }, "type" : "opentelemetry", "dataModelVersion" : "v2", "customHeaders" : { @@ -71,13 +76,6 @@ class TestStreamingApi(unittest.TestCase): response_body_json = """ { - "testMatch" : [ { - "id" : "1234", - "domain" : "cea" - }, { - "id" : "5678", - "domain" : "endpoint" - } ], "endpointType" : "grpc", "_links" : { "self" : { @@ -93,6 +91,21 @@ class TestStreamingApi(unittest.TestCase): "token" : "d0a91307-be2f-4218-a9f8-71c02d98846b" } }, + "filters" : { + "testTypes" : { + "values" : [ "agent-to-server", "bgp", "http-server" ] + } + }, + "type" : "opentelemetry", + "enabled" : true, + "dataModelVersion" : "v2", + "testMatch" : [ { + "id" : "1234", + "domain" : "cea" + }, { + "id" : "5678", + "domain" : "endpoint" + } ], "tagMatch" : [ { "key" : "keyA", "value" : "valueA" @@ -101,13 +114,10 @@ class TestStreamingApi(unittest.TestCase): "value" : "valueB" } ], "id" : "342ieu09", - "type" : "opentelemetry", "auditOperation" : { "createdDate" : 1679677853573, "createdBy" : 3962 }, - "enabled" : true, - "dataModelVersion" : "v2", "customHeaders" : { "Authorization" : "*****", "Content-Type" : "*****" @@ -127,13 +137,6 @@ class TestStreamingApi(unittest.TestCase): response_body_json = """ { - "testMatch" : [ { - "id" : "1234", - "domain" : "cea" - }, { - "id" : "5678", - "domain" : "endpoint" - } ], "endpointType" : "grpc", "_links" : { "self" : { @@ -149,6 +152,21 @@ class TestStreamingApi(unittest.TestCase): "token" : "d0a91307-be2f-4218-a9f8-71c02d98846b" } }, + "filters" : { + "testTypes" : { + "values" : [ "agent-to-server", "bgp", "http-server" ] + } + }, + "type" : "opentelemetry", + "enabled" : true, + "dataModelVersion" : "v2", + "testMatch" : [ { + "id" : "1234", + "domain" : "cea" + }, { + "id" : "5678", + "domain" : "endpoint" + } ], "tagMatch" : [ { "key" : "keyA", "value" : "valueA" @@ -157,15 +175,12 @@ class TestStreamingApi(unittest.TestCase): "value" : "valueB" } ], "id" : "342ieu09", - "type" : "opentelemetry", "auditOperation" : { "createdDate" : 1679677853573, "updatedBy" : 3962, "createdBy" : 3962, "updatedDate" : 1679677853573 }, - "enabled" : true, - "dataModelVersion" : "v2", "customHeaders" : { "Authorization" : "*****", "Content-Type" : "*****" @@ -181,13 +196,6 @@ class TestStreamingApi(unittest.TestCase): response_body_json = """ [ { - "testMatch" : [ { - "id" : "1234", - "domain" : "cea" - }, { - "id" : "5678", - "domain" : "endpoint" - } ], "endpointType" : "grpc", "_links" : { "self" : { @@ -203,6 +211,21 @@ class TestStreamingApi(unittest.TestCase): "token" : "d0a91307-be2f-4218-a9f8-71c02d98846b" } }, + "filters" : { + "testTypes" : { + "values" : [ "agent-to-server", "bgp", "http-server" ] + } + }, + "type" : "opentelemetry", + "enabled" : true, + "dataModelVersion" : "v2", + "testMatch" : [ { + "id" : "1234", + "domain" : "cea" + }, { + "id" : "5678", + "domain" : "endpoint" + } ], "tagMatch" : [ { "key" : "keyA", "value" : "valueA" @@ -211,27 +234,17 @@ class TestStreamingApi(unittest.TestCase): "value" : "valueB" } ], "id" : "342ieu09", - "type" : "opentelemetry", "auditOperation" : { "createdDate" : 1679677853573, "updatedBy" : 3962, "createdBy" : 3962, "updatedDate" : 1679677853573 }, - "enabled" : true, - "dataModelVersion" : "v2", "customHeaders" : { "Authorization" : "*****", "Content-Type" : "*****" } }, { - "testMatch" : [ { - "id" : "1234", - "domain" : "cea" - }, { - "id" : "5678", - "domain" : "endpoint" - } ], "endpointType" : "grpc", "_links" : { "self" : { @@ -247,6 +260,21 @@ class TestStreamingApi(unittest.TestCase): "token" : "d0a91307-be2f-4218-a9f8-71c02d98846b" } }, + "filters" : { + "testTypes" : { + "values" : [ "agent-to-server", "bgp", "http-server" ] + } + }, + "type" : "opentelemetry", + "enabled" : true, + "dataModelVersion" : "v2", + "testMatch" : [ { + "id" : "1234", + "domain" : "cea" + }, { + "id" : "5678", + "domain" : "endpoint" + } ], "tagMatch" : [ { "key" : "keyA", "value" : "valueA" @@ -255,15 +283,12 @@ class TestStreamingApi(unittest.TestCase): "value" : "valueB" } ], "id" : "342ieu09", - "type" : "opentelemetry", "auditOperation" : { "createdDate" : 1679677853573, "updatedBy" : 3962, "createdBy" : 3962, "updatedDate" : 1679677853573 }, - "enabled" : true, - "dataModelVersion" : "v2", "customHeaders" : { "Authorization" : "*****", "Content-Type" : "*****" @@ -303,6 +328,11 @@ class TestStreamingApi(unittest.TestCase): "key" : "keyB", "value" : "valueB" } ], + "filters" : { + "testTypes" : { + "values" : [ "agent-to-server", "bgp", "http-server" ] + } + }, "customHeaders" : { "Authorization" : "*****", "Content-Type" : "*****" @@ -316,13 +346,6 @@ class TestStreamingApi(unittest.TestCase): response_body_json = """ { - "testMatch" : [ { - "id" : "1234", - "domain" : "cea" - }, { - "id" : "5678", - "domain" : "endpoint" - } ], "endpointType" : "grpc", "_links" : { "self" : { @@ -338,6 +361,21 @@ class TestStreamingApi(unittest.TestCase): "token" : "d0a91307-be2f-4218-a9f8-71c02d98846b" } }, + "filters" : { + "testTypes" : { + "values" : [ "agent-to-server", "bgp", "http-server" ] + } + }, + "type" : "opentelemetry", + "enabled" : true, + "dataModelVersion" : "v2", + "testMatch" : [ { + "id" : "1234", + "domain" : "cea" + }, { + "id" : "5678", + "domain" : "endpoint" + } ], "tagMatch" : [ { "key" : "keyA", "value" : "valueA" @@ -346,15 +384,12 @@ class TestStreamingApi(unittest.TestCase): "value" : "valueB" } ], "id" : "342ieu09", - "type" : "opentelemetry", "auditOperation" : { "createdDate" : 1679677853573, "updatedBy" : 3962, "createdBy" : 3962, "updatedDate" : 1679677853573 }, - "enabled" : true, - "dataModelVersion" : "v2", "customHeaders" : { "Authorization" : "*****", "Content-Type" : "*****" diff --git a/thousandeyes-sdk-tags/README.md b/thousandeyes-sdk-tags/README.md index c27505d6..579cc7bd 100644 --- a/thousandeyes-sdk-tags/README.md +++ b/thousandeyes-sdk-tags/README.md @@ -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.20 +- API version: 7.0.21 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator @@ -95,7 +95,9 @@ with thousandeyes_sdk.core.ApiClient(configuration) as api_client: try: # Assign tag to multiple objects - api_instance.assign_tag(id, tag_assignment, aid=aid) + api_response = api_instance.assign_tag(id, tag_assignment, aid=aid) + print("The response of TagAssignmentApi->assign_tag:\n") + pprint(api_response) except ApiException as e: print("Exception when calling TagAssignmentApi->assign_tag: %s\n" % e) diff --git a/thousandeyes-sdk-tags/docs/TagAssignmentApi.md b/thousandeyes-sdk-tags/docs/TagAssignmentApi.md index 3461ff52..bdc16b3c 100644 --- a/thousandeyes-sdk-tags/docs/TagAssignmentApi.md +++ b/thousandeyes-sdk-tags/docs/TagAssignmentApi.md @@ -11,7 +11,7 @@ Method | HTTP request | Description # **assign_tag** -> assign_tag(id, tag_assignment, aid=aid) +> BulkTagAssignment assign_tag(id, tag_assignment, aid=aid) Assign tag to multiple objects @@ -23,6 +23,7 @@ Assigns a tag to one or more objects. This operation has cumulative behavior: Th ```python import thousandeyes_sdk.tags +from thousandeyes_sdk.tags.models.bulk_tag_assignment import BulkTagAssignment from thousandeyes_sdk.tags.models.tag_assignment import TagAssignment from thousandeyes_sdk.tags.rest import ApiException from pprint import pprint @@ -53,7 +54,9 @@ with thousandeyes_sdk.tags.ApiClient(configuration) as api_client: try: # Assign tag to multiple objects - api_instance.assign_tag(id, tag_assignment, aid=aid) + api_response = api_instance.assign_tag(id, tag_assignment, aid=aid) + print("The response of TagAssignmentApi->assign_tag:\n") + pprint(api_response) except Exception as e: print("Exception when calling TagAssignmentApi->assign_tag: %s\n" % e) ``` @@ -71,7 +74,7 @@ Name | Type | Description | Notes ### Return type -void (empty response body) +[**BulkTagAssignment**](BulkTagAssignment.md) ### Authorization @@ -96,7 +99,7 @@ void (empty response body) [[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) # **assign_tags** -> assign_tags(bulk_tag_assignments, aid=aid) +> BulkTagAssignments assign_tags(bulk_tag_assignments, aid=aid) Assign multiple tags to multiple objects @@ -137,7 +140,9 @@ with thousandeyes_sdk.tags.ApiClient(configuration) as api_client: try: # Assign multiple tags to multiple objects - api_instance.assign_tags(bulk_tag_assignments, aid=aid) + api_response = api_instance.assign_tags(bulk_tag_assignments, aid=aid) + print("The response of TagAssignmentApi->assign_tags:\n") + pprint(api_response) except Exception as e: print("Exception when calling TagAssignmentApi->assign_tags: %s\n" % e) ``` @@ -154,7 +159,7 @@ Name | Type | Description | Notes ### Return type -void (empty response body) +[**BulkTagAssignments**](BulkTagAssignments.md) ### Authorization @@ -264,7 +269,7 @@ void (empty response body) [[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) # **unassign_tags** -> unassign_tags(bulk_tag_assignments, aid=aid) +> BulkTagAssignments unassign_tags(bulk_tag_assignments, aid=aid) Remove multiple tags from multiple objects @@ -305,7 +310,9 @@ with thousandeyes_sdk.tags.ApiClient(configuration) as api_client: try: # Remove multiple tags from multiple objects - api_instance.unassign_tags(bulk_tag_assignments, aid=aid) + api_response = api_instance.unassign_tags(bulk_tag_assignments, aid=aid) + print("The response of TagAssignmentApi->unassign_tags:\n") + pprint(api_response) except Exception as e: print("Exception when calling TagAssignmentApi->unassign_tags: %s\n" % e) ``` @@ -322,7 +329,7 @@ Name | Type | Description | Notes ### Return type -void (empty response body) +[**BulkTagAssignments**](BulkTagAssignments.md) ### Authorization diff --git a/thousandeyes-sdk-tags/docs/TagsApi.md b/thousandeyes-sdk-tags/docs/TagsApi.md index fd93fb2a..9b213e56 100644 --- a/thousandeyes-sdk-tags/docs/TagsApi.md +++ b/thousandeyes-sdk-tags/docs/TagsApi.md @@ -13,7 +13,7 @@ Method | HTTP request | Description # **create_tag** -> create_tag(aid=aid, tag_info=tag_info) +> TagInfo create_tag(aid=aid, tag_info=tag_info) Create tag @@ -54,7 +54,9 @@ with thousandeyes_sdk.tags.ApiClient(configuration) as api_client: try: # Create tag - api_instance.create_tag(aid=aid, tag_info=tag_info) + api_response = api_instance.create_tag(aid=aid, tag_info=tag_info) + print("The response of TagsApi->create_tag:\n") + pprint(api_response) except Exception as e: print("Exception when calling TagsApi->create_tag: %s\n" % e) ``` @@ -71,7 +73,7 @@ Name | Type | Description | Notes ### Return type -void (empty response body) +[**TagInfo**](TagInfo.md) ### Authorization @@ -95,7 +97,7 @@ void (empty response body) [[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) # **create_tags** -> create_tags(aid=aid, bulk_tag_response=bulk_tag_response) +> BulkTagResponse create_tags(aid=aid, bulk_tag_response=bulk_tag_response) Create multiple tags @@ -136,7 +138,9 @@ with thousandeyes_sdk.tags.ApiClient(configuration) as api_client: try: # Create multiple tags - api_instance.create_tags(aid=aid, bulk_tag_response=bulk_tag_response) + api_response = api_instance.create_tags(aid=aid, bulk_tag_response=bulk_tag_response) + print("The response of TagsApi->create_tags:\n") + pprint(api_response) except Exception as e: print("Exception when calling TagsApi->create_tags: %s\n" % e) ``` @@ -153,7 +157,7 @@ Name | Type | Description | Notes ### Return type -void (empty response body) +[**BulkTagResponse**](BulkTagResponse.md) ### Authorization @@ -258,7 +262,7 @@ void (empty response body) [[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_tag** -> get_tag(id, aid=aid, expand=expand) +> Tag get_tag(id, aid=aid, expand=expand) Retrieve tag @@ -271,6 +275,7 @@ Retrieves a tag using its ID. ```python import thousandeyes_sdk.tags from thousandeyes_sdk.tags.models.expand_tags_options import ExpandTagsOptions +from thousandeyes_sdk.tags.models.tag import Tag from thousandeyes_sdk.tags.rest import ApiException from pprint import pprint @@ -300,7 +305,9 @@ with thousandeyes_sdk.tags.ApiClient(configuration) as api_client: try: # Retrieve tag - api_instance.get_tag(id, aid=aid, expand=expand) + api_response = api_instance.get_tag(id, aid=aid, expand=expand) + print("The response of TagsApi->get_tag:\n") + pprint(api_response) except Exception as e: print("Exception when calling TagsApi->get_tag: %s\n" % e) ``` @@ -318,7 +325,7 @@ Name | Type | Description | Notes ### Return type -void (empty response body) +[**Tag**](Tag.md) ### Authorization @@ -343,7 +350,7 @@ void (empty response body) [[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_tags** -> get_tags(aid=aid, expand=expand) +> Tags get_tags(aid=aid, expand=expand) List tags @@ -356,6 +363,7 @@ This operation returns a list of tags in the specified account group (`aid`). ```python import thousandeyes_sdk.tags from thousandeyes_sdk.tags.models.expand_tags_options import ExpandTagsOptions +from thousandeyes_sdk.tags.models.tags import Tags from thousandeyes_sdk.tags.rest import ApiException from pprint import pprint @@ -384,7 +392,9 @@ with thousandeyes_sdk.tags.ApiClient(configuration) as api_client: try: # List tags - api_instance.get_tags(aid=aid, expand=expand) + api_response = api_instance.get_tags(aid=aid, expand=expand) + print("The response of TagsApi->get_tags:\n") + pprint(api_response) except Exception as e: print("Exception when calling TagsApi->get_tags: %s\n" % e) ``` @@ -401,7 +411,7 @@ Name | Type | Description | Notes ### Return type -void (empty response body) +[**Tags**](Tags.md) ### Authorization @@ -426,7 +436,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **update_tag** -> update_tag(id, aid=aid, tag_info=tag_info) +> TagInfo update_tag(id, aid=aid, tag_info=tag_info) Update tag @@ -468,7 +478,9 @@ with thousandeyes_sdk.tags.ApiClient(configuration) as api_client: try: # Update tag - api_instance.update_tag(id, aid=aid, tag_info=tag_info) + api_response = api_instance.update_tag(id, aid=aid, tag_info=tag_info) + print("The response of TagsApi->update_tag:\n") + pprint(api_response) except Exception as e: print("Exception when calling TagsApi->update_tag: %s\n" % e) ``` @@ -486,7 +498,7 @@ Name | Type | Description | Notes ### Return type -void (empty response body) +[**TagInfo**](TagInfo.md) ### Authorization diff --git a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/api/tag_assignment_api.py b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/api/tag_assignment_api.py index dfe4c33d..dc1c4c29 100644 --- a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/api/tag_assignment_api.py +++ b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/api/tag_assignment_api.py @@ -21,6 +21,7 @@ import thousandeyes_sdk.tags.models from pydantic import Field, StrictStr from typing import Optional from typing_extensions import Annotated +from thousandeyes_sdk.tags.models.bulk_tag_assignment import BulkTagAssignment from thousandeyes_sdk.tags.models.bulk_tag_assignments import BulkTagAssignments from thousandeyes_sdk.tags.models.tag_assignment import TagAssignment @@ -61,7 +62,7 @@ class TagAssignmentApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: + ) -> BulkTagAssignment: """Assign tag to multiple objects Assigns a tag to one or more objects. This operation has cumulative behavior: The tag is assigned to the specified objects, and the previous assignments persist. No unassignment takes place. @@ -105,7 +106,7 @@ class TagAssignmentApi: ) _response_types_map: Dict[str, Optional[str]] = { - '207': None, + '207': "BulkTagAssignment", '401': "UnauthorizedError", '403': "Error", '404': "Error", @@ -142,7 +143,7 @@ class TagAssignmentApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: + ) -> ApiResponse[BulkTagAssignment]: """Assign tag to multiple objects Assigns a tag to one or more objects. This operation has cumulative behavior: The tag is assigned to the specified objects, and the previous assignments persist. No unassignment takes place. @@ -186,7 +187,7 @@ class TagAssignmentApi: ) _response_types_map: Dict[str, Optional[str]] = { - '207': None, + '207': "BulkTagAssignment", '401': "UnauthorizedError", '403': "Error", '404': "Error", @@ -267,7 +268,7 @@ class TagAssignmentApi: ) _response_types_map: Dict[str, Optional[str]] = { - '207': None, + '207': "BulkTagAssignment", '401': "UnauthorizedError", '403': "Error", '404': "Error", @@ -381,7 +382,7 @@ class TagAssignmentApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: + ) -> BulkTagAssignments: """Assign multiple tags to multiple objects Assigns the specified tags to the specified objects. This operation has cumulative behavior: The tags are assigned to the specified objects, and the previous assignments persist. No unassignment takes place. @@ -422,7 +423,7 @@ class TagAssignmentApi: ) _response_types_map: Dict[str, Optional[str]] = { - '207': None, + '207': "BulkTagAssignments", '401': "UnauthorizedError", '403': "Error", '404': "Error", @@ -458,7 +459,7 @@ class TagAssignmentApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: + ) -> ApiResponse[BulkTagAssignments]: """Assign multiple tags to multiple objects Assigns the specified tags to the specified objects. This operation has cumulative behavior: The tags are assigned to the specified objects, and the previous assignments persist. No unassignment takes place. @@ -499,7 +500,7 @@ class TagAssignmentApi: ) _response_types_map: Dict[str, Optional[str]] = { - '207': None, + '207': "BulkTagAssignments", '401': "UnauthorizedError", '403': "Error", '404': "Error", @@ -576,7 +577,7 @@ class TagAssignmentApi: ) _response_types_map: Dict[str, Optional[str]] = { - '207': None, + '207': "BulkTagAssignments", '401': "UnauthorizedError", '403': "Error", '404': "Error", @@ -1008,7 +1009,7 @@ class TagAssignmentApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: + ) -> BulkTagAssignments: """Remove multiple tags from multiple objects Removes the specified tags from one or more objects. @@ -1049,7 +1050,7 @@ class TagAssignmentApi: ) _response_types_map: Dict[str, Optional[str]] = { - '207': None, + '207': "BulkTagAssignments", '401': "UnauthorizedError", '403': "Error", '404': "Error", @@ -1085,7 +1086,7 @@ class TagAssignmentApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: + ) -> ApiResponse[BulkTagAssignments]: """Remove multiple tags from multiple objects Removes the specified tags from one or more objects. @@ -1126,7 +1127,7 @@ class TagAssignmentApi: ) _response_types_map: Dict[str, Optional[str]] = { - '207': None, + '207': "BulkTagAssignments", '401': "UnauthorizedError", '403': "Error", '404': "Error", @@ -1203,7 +1204,7 @@ class TagAssignmentApi: ) _response_types_map: Dict[str, Optional[str]] = { - '207': None, + '207': "BulkTagAssignments", '401': "UnauthorizedError", '403': "Error", '404': "Error", diff --git a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/api/tags_api.py b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/api/tags_api.py index 38ddb0b7..96c8ead6 100644 --- a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/api/tags_api.py +++ b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/api/tags_api.py @@ -23,7 +23,9 @@ from typing import List, Optional from typing_extensions import Annotated from thousandeyes_sdk.tags.models.bulk_tag_response import BulkTagResponse from thousandeyes_sdk.tags.models.expand_tags_options import ExpandTagsOptions +from thousandeyes_sdk.tags.models.tag import Tag from thousandeyes_sdk.tags.models.tag_info import TagInfo +from thousandeyes_sdk.tags.models.tags import Tags from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse @@ -61,7 +63,7 @@ class TagsApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: + ) -> TagInfo: """Create tag Creates a new tag. @@ -102,7 +104,7 @@ class TagsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, + '201': "TagInfo", '400': "ValidationError", '401': "UnauthorizedError", '409': None, @@ -137,7 +139,7 @@ class TagsApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: + ) -> ApiResponse[TagInfo]: """Create tag Creates a new tag. @@ -178,7 +180,7 @@ class TagsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, + '201': "TagInfo", '400': "ValidationError", '401': "UnauthorizedError", '409': None, @@ -254,7 +256,7 @@ class TagsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, + '201': "TagInfo", '400': "ValidationError", '401': "UnauthorizedError", '409': None, @@ -364,7 +366,7 @@ class TagsApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: + ) -> BulkTagResponse: """Create multiple tags Creates multiple tags. Note the response includes a `statuses` array. This array provides status information for each tag object, indexed 1:1 with the `tags` array. @@ -405,7 +407,7 @@ class TagsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '207': None, + '207': "BulkTagResponse", '400': "ValidationError", '401': "UnauthorizedError", '500': "ApiError", @@ -439,7 +441,7 @@ class TagsApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: + ) -> ApiResponse[BulkTagResponse]: """Create multiple tags Creates multiple tags. Note the response includes a `statuses` array. This array provides status information for each tag object, indexed 1:1 with the `tags` array. @@ -480,7 +482,7 @@ class TagsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '207': None, + '207': "BulkTagResponse", '400': "ValidationError", '401': "UnauthorizedError", '500': "ApiError", @@ -555,7 +557,7 @@ class TagsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '207': None, + '207': "BulkTagResponse", '400': "ValidationError", '401': "UnauthorizedError", '500': "ApiError", @@ -958,7 +960,7 @@ class TagsApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: + ) -> Tag: """Retrieve tag Retrieves a tag using its ID. @@ -1002,7 +1004,7 @@ class TagsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, + '200': "Tag", '401': "UnauthorizedError", '403': "Error", '404': "Error", @@ -1039,7 +1041,7 @@ class TagsApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: + ) -> ApiResponse[Tag]: """Retrieve tag Retrieves a tag using its ID. @@ -1083,7 +1085,7 @@ class TagsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, + '200': "Tag", '401': "UnauthorizedError", '403': "Error", '404': "Error", @@ -1164,7 +1166,7 @@ class TagsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, + '200': "Tag", '401': "UnauthorizedError", '403': "Error", '404': "Error", @@ -1268,7 +1270,7 @@ class TagsApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: + ) -> Tags: """List tags This operation returns a list of tags in the specified account group (`aid`). @@ -1309,7 +1311,7 @@ class TagsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, + '200': "Tags", '401': "UnauthorizedError", '403': "Error", '404': "Error", @@ -1345,7 +1347,7 @@ class TagsApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: + ) -> ApiResponse[Tags]: """List tags This operation returns a list of tags in the specified account group (`aid`). @@ -1386,7 +1388,7 @@ class TagsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, + '200': "Tags", '401': "UnauthorizedError", '403': "Error", '404': "Error", @@ -1463,7 +1465,7 @@ class TagsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, + '200': "Tags", '401': "UnauthorizedError", '403': "Error", '404': "Error", @@ -1565,7 +1567,7 @@ class TagsApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: + ) -> TagInfo: """Update tag Updates a tag. @@ -1609,7 +1611,7 @@ class TagsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, + '200': "TagInfo", '401': "UnauthorizedError", '403': "Error", '404': "Error", @@ -1646,7 +1648,7 @@ class TagsApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: + ) -> ApiResponse[TagInfo]: """Update tag Updates a tag. @@ -1690,7 +1692,7 @@ class TagsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, + '200': "TagInfo", '401': "UnauthorizedError", '403': "Error", '404': "Error", @@ -1771,7 +1773,7 @@ class TagsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, + '200': "TagInfo", '401': "UnauthorizedError", '403': "Error", '404': "Error", diff --git a/thousandeyes-sdk-tags/test/test_tag_assignment_api.py b/thousandeyes-sdk-tags/test/test_tag_assignment_api.py index 2d82a8b3..c28c2477 100644 --- a/thousandeyes-sdk-tags/test/test_tag_assignment_api.py +++ b/thousandeyes-sdk-tags/test/test_tag_assignment_api.py @@ -45,6 +45,21 @@ class TestTagAssignmentApi(unittest.TestCase): request_from_json = thousandeyes_sdk.tags.models.TagAssignment.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ + { + "assignments" : [ { + "id" : "123", + "type" : "test" + }, { + "id" : "123", + "type" : "test" + } ], + "tagId" : "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tags.models.BulkTagAssignment.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) def test_assign_tags_models_validation(self) -> None: """Test case for assign_tags request and response models""" @@ -75,6 +90,32 @@ class TestTagAssignmentApi(unittest.TestCase): request_from_json = thousandeyes_sdk.tags.models.BulkTagAssignments.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ + { + "tags" : [ { + "assignments" : [ { + "id" : "123", + "type" : "test" + }, { + "id" : "123", + "type" : "test" + } ], + "tagId" : "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" + }, { + "assignments" : [ { + "id" : "123", + "type" : "test" + }, { + "id" : "123", + "type" : "test" + } ], + "tagId" : "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tags.models.BulkTagAssignments.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) def test_unassign_tag_models_validation(self) -> None: """Test case for unassign_tag request and response models""" @@ -123,6 +164,32 @@ class TestTagAssignmentApi(unittest.TestCase): request_from_json = thousandeyes_sdk.tags.models.BulkTagAssignments.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ + { + "tags" : [ { + "assignments" : [ { + "id" : "123", + "type" : "test" + }, { + "id" : "123", + "type" : "test" + } ], + "tagId" : "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" + }, { + "assignments" : [ { + "id" : "123", + "type" : "test" + }, { + "id" : "123", + "type" : "test" + } ], + "tagId" : "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tags.models.BulkTagAssignments.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) if __name__ == '__main__': diff --git a/thousandeyes-sdk-tags/test/test_tags_api.py b/thousandeyes-sdk-tags/test/test_tags_api.py index 6ba8d8a4..9cece6b9 100644 --- a/thousandeyes-sdk-tags/test/test_tags_api.py +++ b/thousandeyes-sdk-tags/test/test_tags_api.py @@ -56,6 +56,31 @@ class TestTagsApi(unittest.TestCase): request_from_json = thousandeyes_sdk.tags.models.TagInfo.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ + { + "accessType" : "all", + "assignments" : [ { + "id" : "123", + "type" : "test" + }, { + "id" : "123", + "type" : "test" + } ], + "color" : "#FF0000", + "icon" : "icon", + "description" : "To tag assets in San Francisco", + "legacyId" : 0.8008281904610115, + "id" : "5aeab5d5-0d34-4d44-a7ac-fb440185295c", + "aid" : 1234, + "value" : "sfo", + "key" : "branch", + "createDate" : "2022-03-01T23:31:11Z", + "objectType" : "test" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tags.models.TagInfo.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) def test_create_tags_models_validation(self) -> None: """Test case for create_tags request and response models""" @@ -181,6 +206,127 @@ class TestTagsApi(unittest.TestCase): request_from_json = thousandeyes_sdk.tags.models.BulkTagResponse.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ + { + "errors" : [ { + "tag" : { + "key" : { + "accessType" : "all", + "assignments" : [ { + "id" : "123", + "type" : "test" + }, { + "id" : "123", + "type" : "test" + } ], + "color" : "#FF0000", + "icon" : "icon", + "description" : "To tag assets in San Francisco", + "legacyId" : 0.8008281904610115, + "id" : "5aeab5d5-0d34-4d44-a7ac-fb440185295c", + "aid" : 1234, + "value" : "sfo", + "key" : "branch", + "createDate" : "2022-03-01T23:31:11Z", + "objectType" : "test" + } + }, + "message" : "Object successfully created", + "responseCode" : 200 + }, { + "tag" : { + "key" : { + "accessType" : "all", + "assignments" : [ { + "id" : "123", + "type" : "test" + }, { + "id" : "123", + "type" : "test" + } ], + "color" : "#FF0000", + "icon" : "icon", + "description" : "To tag assets in San Francisco", + "legacyId" : 0.8008281904610115, + "id" : "5aeab5d5-0d34-4d44-a7ac-fb440185295c", + "aid" : 1234, + "value" : "sfo", + "key" : "branch", + "createDate" : "2022-03-01T23:31:11Z", + "objectType" : "test" + } + }, + "message" : "Object successfully created", + "responseCode" : 200 + } ], + "tags" : [ { + "assignments" : [ { + "id" : "123", + "type" : "test" + }, { + "id" : "123", + "type" : "test" + } ], + "color" : "#FF0000", + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "icon" : "icon", + "description" : "To tag assets in San Francisco", + "objectType" : "test", + "accessType" : "all", + "legacyId" : 0.8008281904610115, + "id" : "5aeab5d5-0d34-4d44-a7ac-fb440185295c", + "aid" : 1234, + "value" : "sfo", + "key" : "branch", + "createDate" : "2022-03-01T23:31:11Z" + }, { + "assignments" : [ { + "id" : "123", + "type" : "test" + }, { + "id" : "123", + "type" : "test" + } ], + "color" : "#FF0000", + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "icon" : "icon", + "description" : "To tag assets in San Francisco", + "objectType" : "test", + "accessType" : "all", + "legacyId" : 0.8008281904610115, + "id" : "5aeab5d5-0d34-4d44-a7ac-fb440185295c", + "aid" : 1234, + "value" : "sfo", + "key" : "branch", + "createDate" : "2022-03-01T23:31:11Z" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tags.models.BulkTagResponse.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) def test_delete_tag_models_validation(self) -> None: """Test case for delete_tag request and response models""" @@ -189,10 +335,129 @@ class TestTagsApi(unittest.TestCase): def test_get_tag_models_validation(self) -> None: """Test case for get_tag request and response models""" + response_body_json = """ + { + "assignments" : [ { + "id" : "123", + "type" : "test" + }, { + "id" : "123", + "type" : "test" + } ], + "color" : "#FF0000", + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "icon" : "icon", + "description" : "To tag assets in San Francisco", + "objectType" : "test", + "accessType" : "all", + "legacyId" : 0.8008281904610115, + "id" : "5aeab5d5-0d34-4d44-a7ac-fb440185295c", + "aid" : 1234, + "value" : "sfo", + "key" : "branch", + "createDate" : "2022-03-01T23:31:11Z" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tags.models.Tag.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) def test_get_tags_models_validation(self) -> None: """Test case for get_tags request and response models""" + response_body_json = """ + { + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "tags" : [ { + "assignments" : [ { + "id" : "123", + "type" : "test" + }, { + "id" : "123", + "type" : "test" + } ], + "color" : "#FF0000", + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "icon" : "icon", + "description" : "To tag assets in San Francisco", + "objectType" : "test", + "accessType" : "all", + "legacyId" : 0.8008281904610115, + "id" : "5aeab5d5-0d34-4d44-a7ac-fb440185295c", + "aid" : 1234, + "value" : "sfo", + "key" : "branch", + "createDate" : "2022-03-01T23:31:11Z" + }, { + "assignments" : [ { + "id" : "123", + "type" : "test" + }, { + "id" : "123", + "type" : "test" + } ], + "color" : "#FF0000", + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "icon" : "icon", + "description" : "To tag assets in San Francisco", + "objectType" : "test", + "accessType" : "all", + "legacyId" : 0.8008281904610115, + "id" : "5aeab5d5-0d34-4d44-a7ac-fb440185295c", + "aid" : 1234, + "value" : "sfo", + "key" : "branch", + "createDate" : "2022-03-01T23:31:11Z" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tags.models.Tags.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) def test_update_tag_models_validation(self) -> None: """Test case for update_tag request and response models""" @@ -222,6 +487,31 @@ class TestTagsApi(unittest.TestCase): request_from_json = thousandeyes_sdk.tags.models.TagInfo.from_json(request_body_json) assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + response_body_json = """ + { + "accessType" : "all", + "assignments" : [ { + "id" : "123", + "type" : "test" + }, { + "id" : "123", + "type" : "test" + } ], + "color" : "#FF0000", + "icon" : "icon", + "description" : "To tag assets in San Francisco", + "legacyId" : 0.8008281904610115, + "id" : "5aeab5d5-0d34-4d44-a7ac-fb440185295c", + "aid" : 1234, + "value" : "sfo", + "key" : "branch", + "createDate" : "2022-03-01T23:31:11Z", + "objectType" : "test" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tags.models.TagInfo.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) if __name__ == '__main__': diff --git a/thousandeyes-sdk-test-results/README.md b/thousandeyes-sdk-test-results/README.md index 3269ea2a..1d7496fa 100644 --- a/thousandeyes-sdk-test-results/README.md +++ b/thousandeyes-sdk-test-results/README.md @@ -3,7 +3,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.20 +- API version: 7.0.21 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-tests/README.md b/thousandeyes-sdk-tests/README.md index 4adb9a2d..28661ac1 100644 --- a/thousandeyes-sdk-tests/README.md +++ b/thousandeyes-sdk-tests/README.md @@ -4,7 +4,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.20 +- API version: 7.0.21 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-usage/README.md b/thousandeyes-sdk-usage/README.md index a4061e39..30cfc492 100644 --- a/thousandeyes-sdk-usage/README.md +++ b/thousandeyes-sdk-usage/README.md @@ -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.20 +- API version: 7.0.21 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator