From f2b295ba852b921bb09f5fb864f22381232e47f5 Mon Sep 17 00:00:00 2001 From: API Team Date: Thu, 20 Aug 2026 14:18:12 +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-connectors/README.md | 2 +- thousandeyes-sdk-credentials/README.md | 2 +- .../.openapi-generator/FILES | 44 + thousandeyes-sdk-dashboards/README.md | 27 +- .../docs/ApiDashboard.md | 1 + .../docs/CloneDashboardRefreshRate.md | 12 + .../docs/CloneDashboardRequest.md | 42 + thousandeyes-sdk-dashboards/docs/Dashboard.md | 1 + .../docs/DashboardSchedule.md | 40 + .../DashboardScheduleAfterEndCondition.md | 30 + .../docs/DashboardScheduleCronSpec.md | 34 + .../docs/DashboardScheduleCustomCronSpec.md | 30 + .../docs/DashboardScheduleCustomRepeat.md | 31 + .../docs/DashboardScheduleCustomRepeatNot.md | 29 + .../docs/DashboardScheduleCustomRepeatType.md | 11 + .../docs/DashboardScheduleCustomRepeatUnit.md | 11 + .../docs/DashboardScheduleDataSource.md | 30 + .../docs/DashboardScheduleDateEndCondition.md | 30 + .../docs/DashboardScheduleEndCondition.md | 31 + .../DashboardScheduleNeverEndCondition.md | 29 + .../DashboardScheduleNonCustomCronSpec.md | 29 + .../docs/DashboardScheduleNonCustomRepeat.md | 11 + ...hboardScheduleNonWeeklyCustomRepeatUnit.md | 11 + .../DashboardScheduleOneTimeRepeatType.md | 11 + .../docs/DashboardScheduleRepeat.md | 12 + .../docs/DashboardScheduleRequest.md | 39 + .../docs/DashboardScheduleTimespan.md | 31 + .../docs/DashboardScheduleTimespanPeriod.md | 11 + .../docs/DashboardsApi.md | 266 +++ .../thousandeyes_sdk/dashboards/__init__.py | 22 + .../dashboards/api/dashboards_api.py | 1880 +++++++++++---- .../dashboards/models/__init__.py | 22 + .../dashboards/models/api_dashboard.py | 10 +- .../models/clone_dashboard_refresh_rate.py | 46 + .../models/clone_dashboard_request.py | 121 + .../dashboards/models/dashboard.py | 10 +- .../dashboards/models/dashboard_schedule.py | 123 + .../dashboard_schedule_after_end_condition.py | 97 + .../models/dashboard_schedule_cron_spec.py | 140 ++ .../dashboard_schedule_custom_cron_spec.py | 94 + .../dashboard_schedule_custom_repeat.py | 93 + .../dashboard_schedule_custom_repeat_not.py | 88 + .../dashboard_schedule_custom_repeat_type.py | 40 + .../dashboard_schedule_custom_repeat_unit.py | 42 + .../models/dashboard_schedule_data_source.py | 88 + .../dashboard_schedule_date_end_condition.py | 97 + .../dashboard_schedule_end_condition.py | 157 ++ .../dashboard_schedule_never_end_condition.py | 95 + ...dashboard_schedule_non_custom_cron_spec.py | 88 + .../dashboard_schedule_non_custom_repeat.py | 46 + ..._schedule_non_weekly_custom_repeat_unit.py | 41 + ...dashboard_schedule_one_time_repeat_type.py | 40 + .../models/dashboard_schedule_repeat.py | 47 + .../models/dashboard_schedule_request.py | 118 + .../models/dashboard_schedule_timespan.py | 91 + .../dashboard_schedule_timespan_period.py | 42 + .../test/mock_manifest.py | 1393 ++++++++--- .../test/test_dashboard_snapshots_api.py | 3 + ...est_dashboard_snapshots_api_integration.py | 3 + .../test/test_dashboards_api.py | 382 +++ .../test/test_dashboards_api_integration.py | 2057 ++++++++++++++--- thousandeyes-sdk-emulation/README.md | 2 +- thousandeyes-sdk-endpoint-agents/README.md | 2 +- .../README.md | 2 +- thousandeyes-sdk-endpoint-labels/README.md | 2 +- .../README.md | 2 +- .../docs/HttpEndpointTestResults.md | 2 +- .../docs/NetworkEndpointTestResults.md | 2 +- .../docs/PathVisDetailEndpointTestResults.md | 2 +- .../docs/PathVisEndpointTestResults.md | 2 +- .../models/http_endpoint_test_results.py | 2 +- .../models/network_endpoint_test_results.py | 2 +- .../path_vis_detail_endpoint_test_results.py | 2 +- .../models/path_vis_endpoint_test_results.py | 2 +- .../test/mock_manifest.py | 211 +- ...ver_endpoint_scheduled_test_results_api.py | 61 +- ..._scheduled_test_results_api_integration.py | 61 +- ...ork_endpoint_scheduled_test_results_api.py | 150 +- ..._scheduled_test_results_api_integration.py | 150 +- thousandeyes-sdk-endpoint-tests/README.md | 2 +- thousandeyes-sdk-event-detection/README.md | 2 +- .../.openapi-generator/FILES | 4 + thousandeyes-sdk-instant-tests/README.md | 4 +- .../docs/AgentToAgentInstantTestResponse.md | 2 +- .../docs/AgentToServerInstantTestResponse.md | 2 +- .../docs/ApiInstantTestResponse.md | 2 +- .../docs/DnsSecInstantTestResponse.md | 2 +- .../docs/DnsServerInstantTestResponse.md | 2 +- .../docs/DnsTraceInstantTestResponse.md | 2 +- .../docs/FtpServerInstantTestResponse.md | 2 +- .../docs/HttpServerInstantTestResponse.md | 2 +- .../docs/PageLoadInstantTestResponse.md | 2 +- .../docs/SipServerInstantTestResponse.md | 2 +- .../docs/TestAgentResponse.md | 42 + .../docs/TestAgentResponseProperties.md | 29 + .../docs/VoiceInstantTestResponse.md | 2 +- .../docs/WebTransactionInstantTestResponse.md | 2 +- .../instant_tests/__init__.py | 2 + .../instant_tests/models/__init__.py | 2 + .../agent_to_agent_instant_test_response.py | 6 +- .../agent_to_server_instant_test_response.py | 6 +- .../models/api_instant_test_response.py | 6 +- .../models/dns_sec_instant_test_response.py | 6 +- .../dns_server_instant_test_response.py | 6 +- .../models/dns_trace_instant_test_response.py | 6 +- .../ftp_server_instant_test_response.py | 6 +- .../http_server_instant_test_response.py | 6 +- .../models/page_load_instant_test_response.py | 6 +- .../sip_server_instant_test_response.py | 6 +- .../models/test_agent_response.py | 140 ++ .../models/test_agent_response_properties.py | 89 + .../models/voice_instant_test_response.py | 6 +- .../web_transaction_instant_test_response.py | 6 +- .../test/mock_manifest.py | 24 + .../test_agent_to_agent_instant_tests_api.py | 2 + ..._to_agent_instant_tests_api_integration.py | 2 + .../test_agent_to_server_instant_tests_api.py | 2 + ...to_server_instant_tests_api_integration.py | 2 + .../test/test_api_instant_tests_api.py | 2 + .../test_api_instant_tests_api_integration.py | 2 + .../test/test_dns_server_instant_tests_api.py | 2 + ...ns_server_instant_tests_api_integration.py | 2 + .../test/test_dns_trace_instant_tests_api.py | 2 + ...dns_trace_instant_tests_api_integration.py | 2 + .../test/test_dnssec_instant_tests_api.py | 2 + ...st_dnssec_instant_tests_api_integration.py | 2 + .../test/test_ftp_server_instant_tests_api.py | 2 + ...tp_server_instant_tests_api_integration.py | 2 + .../test_http_page_load_instant_tests_api.py | 2 + ...page_load_instant_tests_api_integration.py | 2 + .../test_http_server_instant_tests_api.py | 2 + ...tp_server_instant_tests_api_integration.py | 2 + .../test/test_sip_server_instant_tests_api.py | 2 + ...ip_server_instant_tests_api_integration.py | 2 + .../test/test_voice_instant_tests_api.py | 2 + ...est_voice_instant_tests_api_integration.py | 2 + .../test_web_transaction_instant_tests_api.py | 2 + ...ansaction_instant_tests_api_integration.py | 2 + thousandeyes-sdk-internet-insights/README.md | 2 +- thousandeyes-sdk-snapshots/README.md | 2 +- thousandeyes-sdk-streaming/README.md | 2 +- .../docs/CreateStreamResponse.md | 1 + .../docs/GetStreamResponse.md | 1 + thousandeyes-sdk-streaming/docs/PutStream.md | 1 + thousandeyes-sdk-streaming/docs/Stream.md | 1 + .../docs/StreamingApi.md | 1 + .../streaming/api/streaming_api.py | 3 + .../models/create_stream_response.py | 5 +- .../streaming/models/get_stream_response.py | 5 +- .../streaming/models/put_stream.py | 5 +- .../streaming/models/stream.py | 5 +- .../test/mock_manifest.py | 7 + .../test/test_streaming_api.py | 7 + .../test/test_streaming_api_integration.py | 14 + thousandeyes-sdk-tags/README.md | 2 +- thousandeyes-sdk-tags/docs/Tag.md | 2 +- .../docs/TagBulkCreateError.md | 4 +- thousandeyes-sdk-tags/docs/TagInfo.md | 2 +- thousandeyes-sdk-tags/docs/TagsApi.md | 8 +- .../src/thousandeyes_sdk/tags/api/tags_api.py | 24 +- .../src/thousandeyes_sdk/tags/models/tag.py | 2 +- .../tags/models/tag_bulk_create_error.py | 4 +- .../thousandeyes_sdk/tags/models/tag_info.py | 2 +- thousandeyes-sdk-tags/test/mock_manifest.py | 42 +- thousandeyes-sdk-tags/test/test_tags_api.py | 16 +- .../test/test_tags_api_integration.py | 327 ++- thousandeyes-sdk-test-results/README.md | 2 +- .../docs/ConsoleLogs.md | 2 +- .../test_results/models/console_logs.py | 4 +- .../test/mock_manifest.py | 8 +- .../test_web_transactions_test_results_api.py | 8 +- ...ansactions_test_results_api_integration.py | 8 +- .../.openapi-generator/FILES | 4 + thousandeyes-sdk-tests/README.md | 4 +- .../docs/AgentToAgentTestResponse.md | 2 +- .../docs/AgentToServerTestResponse.md | 2 +- .../docs/ApiTestResponse.md | 2 +- .../docs/DnsSecTestResponse.md | 2 +- .../docs/DnsServerTestResponse.md | 2 +- .../docs/DnsTraceTestResponse.md | 2 +- .../docs/FtpServerTestResponse.md | 2 +- .../docs/HttpServerTestResponse.md | 2 +- .../docs/PageLoadTestResponse.md | 2 +- .../docs/SipServerTestResponse.md | 2 +- .../docs/TestAgentResponse.md | 42 + .../docs/TestAgentResponseProperties.md | 29 + .../docs/VoiceTestResponse.md | 2 +- .../docs/WebTransactionTestResponse.md | 2 +- .../src/thousandeyes_sdk/tests/__init__.py | 2 + .../thousandeyes_sdk/tests/models/__init__.py | 2 + .../models/agent_to_agent_test_response.py | 6 +- .../models/agent_to_server_test_response.py | 6 +- .../tests/models/api_test_response.py | 6 +- .../tests/models/dns_sec_test_response.py | 6 +- .../tests/models/dns_server_test_response.py | 6 +- .../tests/models/dns_trace_test_response.py | 6 +- .../tests/models/ftp_server_test_response.py | 6 +- .../tests/models/http_server_test_response.py | 6 +- .../tests/models/page_load_test_response.py | 6 +- .../tests/models/sip_server_test_response.py | 6 +- .../tests/models/test_agent_response.py | 140 ++ .../models/test_agent_response_properties.py | 89 + .../tests/models/voice_test_response.py | 6 +- .../models/web_transaction_test_response.py | 6 +- thousandeyes-sdk-tests/test/mock_manifest.py | 72 + .../test/test_agent_to_agent_tests_api.py | 6 + ...st_agent_to_agent_tests_api_integration.py | 6 + .../test/test_agent_to_server_tests_api.py | 6 + ...t_agent_to_server_tests_api_integration.py | 6 + .../test/test_api_tests_api.py | 6 + .../test/test_api_tests_api_integration.py | 6 + .../test/test_dns_server_tests_api.py | 6 + .../test_dns_server_tests_api_integration.py | 6 + .../test/test_dns_trace_tests_api.py | 6 + .../test_dns_trace_tests_api_integration.py | 6 + .../test/test_dnssec_tests_api.py | 6 + .../test/test_dnssec_tests_api_integration.py | 6 + .../test/test_ftp_server_tests_api.py | 6 + .../test_ftp_server_tests_api_integration.py | 6 + .../test/test_http_server_tests_api.py | 6 + .../test_http_server_tests_api_integration.py | 6 + .../test/test_page_load_tests_api.py | 6 + .../test_page_load_tests_api_integration.py | 6 + .../test/test_sip_server_tests_api.py | 6 + .../test_sip_server_tests_api_integration.py | 6 + .../test/test_voice_tests_api.py | 6 + .../test/test_voice_tests_api_integration.py | 6 + .../test/test_web_transaction_tests_api.py | 6 + ...t_web_transaction_tests_api_integration.py | 6 + thousandeyes-sdk-usage/README.md | 2 +- 234 files changed, 8881 insertions(+), 1929 deletions(-) create mode 100644 thousandeyes-sdk-dashboards/docs/CloneDashboardRefreshRate.md create mode 100644 thousandeyes-sdk-dashboards/docs/CloneDashboardRequest.md create mode 100644 thousandeyes-sdk-dashboards/docs/DashboardSchedule.md create mode 100644 thousandeyes-sdk-dashboards/docs/DashboardScheduleAfterEndCondition.md create mode 100644 thousandeyes-sdk-dashboards/docs/DashboardScheduleCronSpec.md create mode 100644 thousandeyes-sdk-dashboards/docs/DashboardScheduleCustomCronSpec.md create mode 100644 thousandeyes-sdk-dashboards/docs/DashboardScheduleCustomRepeat.md create mode 100644 thousandeyes-sdk-dashboards/docs/DashboardScheduleCustomRepeatNot.md create mode 100644 thousandeyes-sdk-dashboards/docs/DashboardScheduleCustomRepeatType.md create mode 100644 thousandeyes-sdk-dashboards/docs/DashboardScheduleCustomRepeatUnit.md create mode 100644 thousandeyes-sdk-dashboards/docs/DashboardScheduleDataSource.md create mode 100644 thousandeyes-sdk-dashboards/docs/DashboardScheduleDateEndCondition.md create mode 100644 thousandeyes-sdk-dashboards/docs/DashboardScheduleEndCondition.md create mode 100644 thousandeyes-sdk-dashboards/docs/DashboardScheduleNeverEndCondition.md create mode 100644 thousandeyes-sdk-dashboards/docs/DashboardScheduleNonCustomCronSpec.md create mode 100644 thousandeyes-sdk-dashboards/docs/DashboardScheduleNonCustomRepeat.md create mode 100644 thousandeyes-sdk-dashboards/docs/DashboardScheduleNonWeeklyCustomRepeatUnit.md create mode 100644 thousandeyes-sdk-dashboards/docs/DashboardScheduleOneTimeRepeatType.md create mode 100644 thousandeyes-sdk-dashboards/docs/DashboardScheduleRepeat.md create mode 100644 thousandeyes-sdk-dashboards/docs/DashboardScheduleRequest.md create mode 100644 thousandeyes-sdk-dashboards/docs/DashboardScheduleTimespan.md create mode 100644 thousandeyes-sdk-dashboards/docs/DashboardScheduleTimespanPeriod.md create mode 100644 thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/clone_dashboard_refresh_rate.py create mode 100644 thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/clone_dashboard_request.py create mode 100644 thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule.py create mode 100644 thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_after_end_condition.py create mode 100644 thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_cron_spec.py create mode 100644 thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_custom_cron_spec.py create mode 100644 thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_custom_repeat.py create mode 100644 thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_custom_repeat_not.py create mode 100644 thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_custom_repeat_type.py create mode 100644 thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_custom_repeat_unit.py create mode 100644 thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_data_source.py create mode 100644 thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_date_end_condition.py create mode 100644 thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_end_condition.py create mode 100644 thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_never_end_condition.py create mode 100644 thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_non_custom_cron_spec.py create mode 100644 thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_non_custom_repeat.py create mode 100644 thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_non_weekly_custom_repeat_unit.py create mode 100644 thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_one_time_repeat_type.py create mode 100644 thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_repeat.py create mode 100644 thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_request.py create mode 100644 thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_timespan.py create mode 100644 thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_timespan_period.py create mode 100644 thousandeyes-sdk-instant-tests/docs/TestAgentResponse.md create mode 100644 thousandeyes-sdk-instant-tests/docs/TestAgentResponseProperties.md create mode 100644 thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_agent_response.py create mode 100644 thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_agent_response_properties.py create mode 100644 thousandeyes-sdk-tests/docs/TestAgentResponse.md create mode 100644 thousandeyes-sdk-tests/docs/TestAgentResponseProperties.md create mode 100644 thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_agent_response.py create mode 100644 thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_agent_response_properties.py diff --git a/thousandeyes-sdk-administrative/README.md b/thousandeyes-sdk-administrative/README.md index 65b6cf4fd..33d0d913d 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.99 +- API version: 7.0.101 - 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 1f8153c56..4ece1d08c 100644 --- a/thousandeyes-sdk-agents/README.md +++ b/thousandeyes-sdk-agents/README.md @@ -5,7 +5,7 @@ Manage Cloud and Enterprise Agents available to your account in ThousandEyes. This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.99 +- API version: 7.0.101 - 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 f30993571..2ff0c4b48 100644 --- a/thousandeyes-sdk-alerts/README.md +++ b/thousandeyes-sdk-alerts/README.md @@ -14,7 +14,7 @@ For more information about the alerts, see [Alerts](https://docs.thousandeyes.co This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.99 +- API version: 7.0.101 - 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 01b478937..81040fc1b 100644 --- a/thousandeyes-sdk-bgp-monitors/README.md +++ b/thousandeyes-sdk-bgp-monitors/README.md @@ -10,7 +10,7 @@ For more information about monitors, see [Inside-Out BGP Visibility](https://doc This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.99 +- API version: 7.0.101 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-connectors/README.md b/thousandeyes-sdk-connectors/README.md index 1ef0202e6..d36017447 100644 --- a/thousandeyes-sdk-connectors/README.md +++ b/thousandeyes-sdk-connectors/README.md @@ -6,7 +6,7 @@ Manage connectors and operations. This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.99 +- API version: 7.0.101 - 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 5a3437f87..15784d1fa 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.99 +- API version: 7.0.101 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-dashboards/.openapi-generator/FILES b/thousandeyes-sdk-dashboards/.openapi-generator/FILES index 40eb33604..7b77a1519 100644 --- a/thousandeyes-sdk-dashboards/.openapi-generator/FILES +++ b/thousandeyes-sdk-dashboards/.openapi-generator/FILES @@ -69,6 +69,8 @@ docs/AppAndSelfLinks.md docs/AswRepeat.md docs/AswRepeatUnit.md docs/BoxAndWhiskersDatasource.md +docs/CloneDashboardRefreshRate.md +docs/CloneDashboardRequest.md docs/ColorGridDatasource.md docs/Dashboard.md docs/DashboardGlobalFilterId.md @@ -79,6 +81,26 @@ docs/DashboardLinks.md docs/DashboardMetric.md docs/DashboardMetricDirection.md docs/DashboardOrder.md +docs/DashboardSchedule.md +docs/DashboardScheduleAfterEndCondition.md +docs/DashboardScheduleCronSpec.md +docs/DashboardScheduleCustomCronSpec.md +docs/DashboardScheduleCustomRepeat.md +docs/DashboardScheduleCustomRepeatNot.md +docs/DashboardScheduleCustomRepeatType.md +docs/DashboardScheduleCustomRepeatUnit.md +docs/DashboardScheduleDataSource.md +docs/DashboardScheduleDateEndCondition.md +docs/DashboardScheduleEndCondition.md +docs/DashboardScheduleNeverEndCondition.md +docs/DashboardScheduleNonCustomCronSpec.md +docs/DashboardScheduleNonCustomRepeat.md +docs/DashboardScheduleNonWeeklyCustomRepeatUnit.md +docs/DashboardScheduleOneTimeRepeatType.md +docs/DashboardScheduleRepeat.md +docs/DashboardScheduleRequest.md +docs/DashboardScheduleTimespan.md +docs/DashboardScheduleTimespanPeriod.md docs/DashboardSnapshotResponse.md docs/DashboardSnapshotsApi.md docs/DashboardSnapshotsPage.md @@ -201,6 +223,8 @@ src/thousandeyes_sdk/dashboards/models/app_and_self_links.py src/thousandeyes_sdk/dashboards/models/asw_repeat.py src/thousandeyes_sdk/dashboards/models/asw_repeat_unit.py src/thousandeyes_sdk/dashboards/models/box_and_whiskers_datasource.py +src/thousandeyes_sdk/dashboards/models/clone_dashboard_refresh_rate.py +src/thousandeyes_sdk/dashboards/models/clone_dashboard_request.py src/thousandeyes_sdk/dashboards/models/color_grid_datasource.py src/thousandeyes_sdk/dashboards/models/dashboard.py src/thousandeyes_sdk/dashboards/models/dashboard_global_filter_id.py @@ -211,6 +235,26 @@ src/thousandeyes_sdk/dashboards/models/dashboard_links.py src/thousandeyes_sdk/dashboards/models/dashboard_metric.py src/thousandeyes_sdk/dashboards/models/dashboard_metric_direction.py src/thousandeyes_sdk/dashboards/models/dashboard_order.py +src/thousandeyes_sdk/dashboards/models/dashboard_schedule.py +src/thousandeyes_sdk/dashboards/models/dashboard_schedule_after_end_condition.py +src/thousandeyes_sdk/dashboards/models/dashboard_schedule_cron_spec.py +src/thousandeyes_sdk/dashboards/models/dashboard_schedule_custom_cron_spec.py +src/thousandeyes_sdk/dashboards/models/dashboard_schedule_custom_repeat.py +src/thousandeyes_sdk/dashboards/models/dashboard_schedule_custom_repeat_not.py +src/thousandeyes_sdk/dashboards/models/dashboard_schedule_custom_repeat_type.py +src/thousandeyes_sdk/dashboards/models/dashboard_schedule_custom_repeat_unit.py +src/thousandeyes_sdk/dashboards/models/dashboard_schedule_data_source.py +src/thousandeyes_sdk/dashboards/models/dashboard_schedule_date_end_condition.py +src/thousandeyes_sdk/dashboards/models/dashboard_schedule_end_condition.py +src/thousandeyes_sdk/dashboards/models/dashboard_schedule_never_end_condition.py +src/thousandeyes_sdk/dashboards/models/dashboard_schedule_non_custom_cron_spec.py +src/thousandeyes_sdk/dashboards/models/dashboard_schedule_non_custom_repeat.py +src/thousandeyes_sdk/dashboards/models/dashboard_schedule_non_weekly_custom_repeat_unit.py +src/thousandeyes_sdk/dashboards/models/dashboard_schedule_one_time_repeat_type.py +src/thousandeyes_sdk/dashboards/models/dashboard_schedule_repeat.py +src/thousandeyes_sdk/dashboards/models/dashboard_schedule_request.py +src/thousandeyes_sdk/dashboards/models/dashboard_schedule_timespan.py +src/thousandeyes_sdk/dashboards/models/dashboard_schedule_timespan_period.py src/thousandeyes_sdk/dashboards/models/dashboard_snapshot_response.py src/thousandeyes_sdk/dashboards/models/dashboard_snapshots_page.py src/thousandeyes_sdk/dashboards/models/default_timespan.py diff --git a/thousandeyes-sdk-dashboards/README.md b/thousandeyes-sdk-dashboards/README.md index 7f74b4540..e7036501f 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.99 +- API version: 7.0.101 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator @@ -101,14 +101,17 @@ Class | Method | HTTP request | Description *DashboardSnapshotsApi* | [**get_dashboard_snapshot_widget_data**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardSnapshotsApi.md#get_dashboard_snapshot_widget_data) | **GET** /dashboard-snapshots/{snapshotId}/widgets/{widgetId} | Retrieve dashboard snapshot data *DashboardSnapshotsApi* | [**get_dashboard_snapshots**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardSnapshotsApi.md#get_dashboard_snapshots) | **GET** /dashboard-snapshots | List dashboard snapshots *DashboardSnapshotsApi* | [**update_dashboard_snapshot_expiration_date**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardSnapshotsApi.md#update_dashboard_snapshot_expiration_date) | **PATCH** /dashboard-snapshots/{snapshotId} | Update snapshot expiration +*DashboardsApi* | [**clone_dashboard**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardsApi.md#clone_dashboard) | **POST** /dashboards/{dashboardId}/clone | Clone dashboard *DashboardsApi* | [**create_dashboard**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardsApi.md#create_dashboard) | **POST** /dashboards | Create dashboard *DashboardsApi* | [**delete_dashboard**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardsApi.md#delete_dashboard) | **DELETE** /dashboards/{dashboardId} | Delete dashboard +*DashboardsApi* | [**delete_dashboard_schedule**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardsApi.md#delete_dashboard_schedule) | **DELETE** /dashboards/{dashboardId}/actions/schedule | Delete dashboard snapshot schedule *DashboardsApi* | [**get_dashboard**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardsApi.md#get_dashboard) | **GET** /dashboards/{dashboardId} | Retrieve dashboard *DashboardsApi* | [**get_dashboard_widget_data**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardsApi.md#get_dashboard_widget_data) | **GET** /dashboards/{dashboardId}/widgets/{widgetId} | Retrieve dashboard widget data *DashboardsApi* | [**get_dashboards**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardsApi.md#get_dashboards) | **GET** /dashboards | List dashboards *DashboardsApi* | [**get_individual_card_data**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardsApi.md#get_individual_card_data) | **GET** /dashboards/{dashboardId}/widgets/{widgetId}/cards/{cardId} | Retrieve individual card data from numbers widget *DashboardsApi* | [**get_individual_column_data**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardsApi.md#get_individual_column_data) | **GET** /dashboards/{dashboardId}/widgets/{widgetId}/columns/{columnId} | Retrieve individual column data from multi-metric table widget *DashboardsApi* | [**update_dashboard**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardsApi.md#update_dashboard) | **PUT** /dashboards/{dashboardId} | Update dashboard +*DashboardsApi* | [**update_dashboard_schedule**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardsApi.md#update_dashboard_schedule) | **PUT** /dashboards/{dashboardId}/actions/schedule | Create or update dashboard snapshot schedule *DashboardsFiltersApi* | [**create_dashboard_filter**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardsFiltersApi.md#create_dashboard_filter) | **POST** /dashboards/filters | Create dashboard filter *DashboardsFiltersApi* | [**delete_dashboard_filter**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardsFiltersApi.md#delete_dashboard_filter) | **DELETE** /dashboards/filters/{id} | Delete dashboard filter *DashboardsFiltersApi* | [**get_dashboard_filter**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardsFiltersApi.md#get_dashboard_filter) | **GET** /dashboards/filters/{id} | Get dashboard filter @@ -186,6 +189,8 @@ Class | Method | HTTP request | Description - [AswRepeat](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/AswRepeat.md) - [AswRepeatUnit](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/AswRepeatUnit.md) - [BoxAndWhiskersDatasource](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/BoxAndWhiskersDatasource.md) + - [CloneDashboardRefreshRate](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/CloneDashboardRefreshRate.md) + - [CloneDashboardRequest](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/CloneDashboardRequest.md) - [ColorGridDatasource](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/ColorGridDatasource.md) - [Dashboard](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/Dashboard.md) - [DashboardGlobalFilterId](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardGlobalFilterId.md) @@ -196,6 +201,26 @@ Class | Method | HTTP request | Description - [DashboardMetric](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardMetric.md) - [DashboardMetricDirection](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardMetricDirection.md) - [DashboardOrder](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardOrder.md) + - [DashboardSchedule](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardSchedule.md) + - [DashboardScheduleAfterEndCondition](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardScheduleAfterEndCondition.md) + - [DashboardScheduleCronSpec](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardScheduleCronSpec.md) + - [DashboardScheduleCustomCronSpec](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardScheduleCustomCronSpec.md) + - [DashboardScheduleCustomRepeat](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardScheduleCustomRepeat.md) + - [DashboardScheduleCustomRepeatNot](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardScheduleCustomRepeatNot.md) + - [DashboardScheduleCustomRepeatType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardScheduleCustomRepeatType.md) + - [DashboardScheduleCustomRepeatUnit](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardScheduleCustomRepeatUnit.md) + - [DashboardScheduleDataSource](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardScheduleDataSource.md) + - [DashboardScheduleDateEndCondition](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardScheduleDateEndCondition.md) + - [DashboardScheduleEndCondition](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardScheduleEndCondition.md) + - [DashboardScheduleNeverEndCondition](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardScheduleNeverEndCondition.md) + - [DashboardScheduleNonCustomCronSpec](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardScheduleNonCustomCronSpec.md) + - [DashboardScheduleNonCustomRepeat](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardScheduleNonCustomRepeat.md) + - [DashboardScheduleNonWeeklyCustomRepeatUnit](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardScheduleNonWeeklyCustomRepeatUnit.md) + - [DashboardScheduleOneTimeRepeatType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardScheduleOneTimeRepeatType.md) + - [DashboardScheduleRepeat](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardScheduleRepeat.md) + - [DashboardScheduleRequest](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardScheduleRequest.md) + - [DashboardScheduleTimespan](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardScheduleTimespan.md) + - [DashboardScheduleTimespanPeriod](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardScheduleTimespanPeriod.md) - [DashboardSnapshotResponse](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardSnapshotResponse.md) - [DashboardSnapshotsPage](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DashboardSnapshotsPage.md) - [DefaultTimespan](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-dashboards/docs/DefaultTimespan.md) diff --git a/thousandeyes-sdk-dashboards/docs/ApiDashboard.md b/thousandeyes-sdk-dashboards/docs/ApiDashboard.md index 0cb055f50..964c408aa 100644 --- a/thousandeyes-sdk-dashboards/docs/ApiDashboard.md +++ b/thousandeyes-sdk-dashboards/docs/ApiDashboard.md @@ -30,6 +30,7 @@ Name | Type | Description | Notes **is_global_override** | **bool** | When set to `true`, the defaultTimespan is used and overrides the widget's timespan. If set to `false`, the the widget's timespan is used. | [optional] **is_migrated_report** | **bool** | True if this dashboard was previously a report. | [optional] [readonly] **layout** | [**DashboardLayout**](DashboardLayout.md) | | [optional] +**schedule** | [**DashboardSchedule**](DashboardSchedule.md) | | [optional] [readonly] **refresh_rate** | [**RefreshRate**](RefreshRate.md) | | [optional] **links** | [**DashboardLinks**](DashboardLinks.md) | | [optional] diff --git a/thousandeyes-sdk-dashboards/docs/CloneDashboardRefreshRate.md b/thousandeyes-sdk-dashboards/docs/CloneDashboardRefreshRate.md new file mode 100644 index 000000000..7cfeb04d1 --- /dev/null +++ b/thousandeyes-sdk-dashboards/docs/CloneDashboardRefreshRate.md @@ -0,0 +1,12 @@ +# CloneDashboardRefreshRate + +Auto-refresh interval for the cloned dashboard. If omitted, the clone inherits the source dashboard's refresh rate. + +## 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-dashboards/docs/CloneDashboardRequest.md b/thousandeyes-sdk-dashboards/docs/CloneDashboardRequest.md new file mode 100644 index 000000000..719286cde --- /dev/null +++ b/thousandeyes-sdk-dashboards/docs/CloneDashboardRequest.md @@ -0,0 +1,42 @@ +# CloneDashboardRequest + +Optional values that override settings inherited from the source dashboard. Omit the request body or send an empty object (`{}`) to clone the dashboard without overrides. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | Title of the cloned dashboard. If omitted, the API generates a unique title. | [optional] +**tag_ids** | **List[str]** | Dashboard tag identifiers. An empty array clears tags from the clone; omission preserves the source dashboard's tags. | [optional] +**description** | **str** | Description for the cloned dashboard. | [optional] +**layout** | [**DashboardLayout**](DashboardLayout.md) | | [optional] +**default_timespan** | [**DefaultTimespan**](DefaultTimespan.md) | | [optional] +**is_global_override** | **bool** | If `true`, the dashboard time range overrides local widget time settings. | [optional] +**refresh_rate** | [**CloneDashboardRefreshRate**](CloneDashboardRefreshRate.md) | | [optional] +**global_filter_id** | **str** | Global filter applied to the cloned dashboard. If omitted, the source dashboard's filter is preserved when cloning within the same account group. When cloning across account groups, the filter is cleared. | [optional] +**shared_account_ids** | **List[str]** | Account group IDs with which to share the cloned dashboard. An empty array limits sharing to current account group. Omission does not share with other account groups. The `isPrivate` setting controls visibility within the current account group. Cannot be used together with `isSharedWithAllAccountGroups=true` | [optional] +**is_shared_with_all_account_groups** | **bool** | When `true`, shares the cloned dashboard with all account groups available to the user. Cannot be used together with `sharedAccountIds`. | [optional] +**is_private** | **bool** | When `true`, only the creator can view the cloned dashboard. Combining this property with `sharedAccountIds` or `isSharedWithAllAccountGroups=true` returns `400 Bad Request`. Defaults to `false`. | [optional] [default to False] +**is_default_for_user** | **bool** | When `true`, sets the cloned dashboard as the current user's default dashboard. | [optional] +**is_default_for_account** | **bool** | When `true`, sets the cloned dashboard as the current account group's default dashboard. | [optional] + +## Example + +```python +from thousandeyes_sdk.dashboards.models.clone_dashboard_request import CloneDashboardRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CloneDashboardRequest from a JSON string +clone_dashboard_request_instance = CloneDashboardRequest.from_json(json) +# print the JSON string representation of the object +print(CloneDashboardRequest.to_json()) + +# convert the object into a dict +clone_dashboard_request_dict = clone_dashboard_request_instance.to_dict() +# create an instance of CloneDashboardRequest from a dict +clone_dashboard_request_from_dict = CloneDashboardRequest.from_dict(clone_dashboard_request_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-dashboards/docs/Dashboard.md b/thousandeyes-sdk-dashboards/docs/Dashboard.md index 8d3723a95..eaf43248c 100644 --- a/thousandeyes-sdk-dashboards/docs/Dashboard.md +++ b/thousandeyes-sdk-dashboards/docs/Dashboard.md @@ -23,6 +23,7 @@ Name | Type | Description | Notes **is_global_override** | **bool** | When set to `true`, the defaultTimespan is used and overrides the widget's timespan. If set to `false`, the the widget's timespan is used. | [optional] **is_migrated_report** | **bool** | True if this dashboard was previously a report. | [optional] [readonly] **layout** | [**DashboardLayout**](DashboardLayout.md) | | [optional] +**schedule** | [**DashboardSchedule**](DashboardSchedule.md) | | [optional] [readonly] **refresh_rate** | [**RefreshRate**](RefreshRate.md) | | [optional] **links** | [**DashboardLinks**](DashboardLinks.md) | | [optional] diff --git a/thousandeyes-sdk-dashboards/docs/DashboardSchedule.md b/thousandeyes-sdk-dashboards/docs/DashboardSchedule.md new file mode 100644 index 000000000..fa21abba3 --- /dev/null +++ b/thousandeyes-sdk-dashboards/docs/DashboardSchedule.md @@ -0,0 +1,40 @@ +# DashboardSchedule + +Snapshot schedule for a dashboard. A `repeat` value of `NONE` represents a one-time schedule. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cron_spec** | [**DashboardScheduleCronSpec**](DashboardScheduleCronSpec.md) | | +**data_source** | [**DashboardScheduleDataSource**](DashboardScheduleDataSource.md) | | +**data_timespan** | [**DashboardScheduleTimespan**](DashboardScheduleTimespan.md) | | +**flag_enabled** | **bool** | When `true`, the schedule is active and snapshots are generated according to `cronSpec`. | +**flag_locked** | **bool** | When `true`, the schedule configuration is locked and cannot be edited through the web application. | [optional] +**flag_auto_share** | **bool** | When `true`, generated snapshots are automatically shared with schedule recipients. | [optional] +**flag_is_include_pii_user_data** | **bool** | When `true`, generated snapshots include personally identifiable user data when permitted by account policy. | [optional] +**flag_attach_pdf_to_email** | **bool** | When `true`, a PDF attachment is included in snapshot notification emails. | [optional] +**recipients** | **List[str]** | Email addresses of active dashboard account users who receive snapshot notifications. | [optional] +**expires_after** | **int** | Snapshot retention period in seconds. Allowed range is 24 hours to 5 years. | [optional] +**next_date** | **datetime** | UTC date of the next scheduled snapshot run. Computed by the server. | [optional] [readonly] + +## Example + +```python +from thousandeyes_sdk.dashboards.models.dashboard_schedule import DashboardSchedule + +# TODO update the JSON string below +json = "{}" +# create an instance of DashboardSchedule from a JSON string +dashboard_schedule_instance = DashboardSchedule.from_json(json) +# print the JSON string representation of the object +print(DashboardSchedule.to_json()) + +# convert the object into a dict +dashboard_schedule_dict = dashboard_schedule_instance.to_dict() +# create an instance of DashboardSchedule from a dict +dashboard_schedule_from_dict = DashboardSchedule.from_dict(dashboard_schedule_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-dashboards/docs/DashboardScheduleAfterEndCondition.md b/thousandeyes-sdk-dashboards/docs/DashboardScheduleAfterEndCondition.md new file mode 100644 index 000000000..6404c0658 --- /dev/null +++ b/thousandeyes-sdk-dashboards/docs/DashboardScheduleAfterEndCondition.md @@ -0,0 +1,30 @@ +# DashboardScheduleAfterEndCondition + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**end_condition_type** | **str** | Identifies a schedule that ends after a number of occurrences. | +**value** | **int** | Number of schedule occurrences after which the recurrence ends. | + +## Example + +```python +from thousandeyes_sdk.dashboards.models.dashboard_schedule_after_end_condition import DashboardScheduleAfterEndCondition + +# TODO update the JSON string below +json = "{}" +# create an instance of DashboardScheduleAfterEndCondition from a JSON string +dashboard_schedule_after_end_condition_instance = DashboardScheduleAfterEndCondition.from_json(json) +# print the JSON string representation of the object +print(DashboardScheduleAfterEndCondition.to_json()) + +# convert the object into a dict +dashboard_schedule_after_end_condition_dict = dashboard_schedule_after_end_condition_instance.to_dict() +# create an instance of DashboardScheduleAfterEndCondition from a dict +dashboard_schedule_after_end_condition_from_dict = DashboardScheduleAfterEndCondition.from_dict(dashboard_schedule_after_end_condition_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-dashboards/docs/DashboardScheduleCronSpec.md b/thousandeyes-sdk-dashboards/docs/DashboardScheduleCronSpec.md new file mode 100644 index 000000000..6e910bbc9 --- /dev/null +++ b/thousandeyes-sdk-dashboards/docs/DashboardScheduleCronSpec.md @@ -0,0 +1,34 @@ +# DashboardScheduleCronSpec + +Cron-style recurrence specification for a dashboard snapshot schedule. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_time** | **int** | Schedule start time as a Unix timestamp in seconds. | +**zone_code** | **str** | An IANA time zone identifier used to interpret `startTime` and recurrence. For example, `America/Los_Angeles`. | +**repeat** | [**DashboardScheduleRepeat**](DashboardScheduleRepeat.md) | | +**end_repeat** | [**DashboardScheduleEndCondition**](DashboardScheduleEndCondition.md) | | [optional] +**custom_repeat** | [**DashboardScheduleCustomRepeat**](DashboardScheduleCustomRepeat.md) | | + +## Example + +```python +from thousandeyes_sdk.dashboards.models.dashboard_schedule_cron_spec import DashboardScheduleCronSpec + +# TODO update the JSON string below +json = "{}" +# create an instance of DashboardScheduleCronSpec from a JSON string +dashboard_schedule_cron_spec_instance = DashboardScheduleCronSpec.from_json(json) +# print the JSON string representation of the object +print(DashboardScheduleCronSpec.to_json()) + +# convert the object into a dict +dashboard_schedule_cron_spec_dict = dashboard_schedule_cron_spec_instance.to_dict() +# create an instance of DashboardScheduleCronSpec from a dict +dashboard_schedule_cron_spec_from_dict = DashboardScheduleCronSpec.from_dict(dashboard_schedule_cron_spec_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-dashboards/docs/DashboardScheduleCustomCronSpec.md b/thousandeyes-sdk-dashboards/docs/DashboardScheduleCustomCronSpec.md new file mode 100644 index 000000000..9ba99b246 --- /dev/null +++ b/thousandeyes-sdk-dashboards/docs/DashboardScheduleCustomCronSpec.md @@ -0,0 +1,30 @@ +# DashboardScheduleCustomCronSpec + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**repeat** | [**DashboardScheduleCustomRepeatType**](DashboardScheduleCustomRepeatType.md) | | [optional] +**custom_repeat** | [**DashboardScheduleCustomRepeat**](DashboardScheduleCustomRepeat.md) | | + +## Example + +```python +from thousandeyes_sdk.dashboards.models.dashboard_schedule_custom_cron_spec import DashboardScheduleCustomCronSpec + +# TODO update the JSON string below +json = "{}" +# create an instance of DashboardScheduleCustomCronSpec from a JSON string +dashboard_schedule_custom_cron_spec_instance = DashboardScheduleCustomCronSpec.from_json(json) +# print the JSON string representation of the object +print(DashboardScheduleCustomCronSpec.to_json()) + +# convert the object into a dict +dashboard_schedule_custom_cron_spec_dict = dashboard_schedule_custom_cron_spec_instance.to_dict() +# create an instance of DashboardScheduleCustomCronSpec from a dict +dashboard_schedule_custom_cron_spec_from_dict = DashboardScheduleCustomCronSpec.from_dict(dashboard_schedule_custom_cron_spec_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-dashboards/docs/DashboardScheduleCustomRepeat.md b/thousandeyes-sdk-dashboards/docs/DashboardScheduleCustomRepeat.md new file mode 100644 index 000000000..1e76cdbbb --- /dev/null +++ b/thousandeyes-sdk-dashboards/docs/DashboardScheduleCustomRepeat.md @@ -0,0 +1,31 @@ +# DashboardScheduleCustomRepeat + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**repeat_every** | **int** | Interval count for custom recurrence. | +**days_of_week** | **List[int]** | Days of the week for custom weekly recurrence (`1` = Monday through `7` = Sunday). | [optional] +**repeat_unit** | [**DashboardScheduleCustomRepeatUnit**](DashboardScheduleCustomRepeatUnit.md) | | + +## Example + +```python +from thousandeyes_sdk.dashboards.models.dashboard_schedule_custom_repeat import DashboardScheduleCustomRepeat + +# TODO update the JSON string below +json = "{}" +# create an instance of DashboardScheduleCustomRepeat from a JSON string +dashboard_schedule_custom_repeat_instance = DashboardScheduleCustomRepeat.from_json(json) +# print the JSON string representation of the object +print(DashboardScheduleCustomRepeat.to_json()) + +# convert the object into a dict +dashboard_schedule_custom_repeat_dict = dashboard_schedule_custom_repeat_instance.to_dict() +# create an instance of DashboardScheduleCustomRepeat from a dict +dashboard_schedule_custom_repeat_from_dict = DashboardScheduleCustomRepeat.from_dict(dashboard_schedule_custom_repeat_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-dashboards/docs/DashboardScheduleCustomRepeatNot.md b/thousandeyes-sdk-dashboards/docs/DashboardScheduleCustomRepeatNot.md new file mode 100644 index 000000000..f2278780e --- /dev/null +++ b/thousandeyes-sdk-dashboards/docs/DashboardScheduleCustomRepeatNot.md @@ -0,0 +1,29 @@ +# DashboardScheduleCustomRepeatNot + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**repeat_unit** | [**DashboardScheduleNonWeeklyCustomRepeatUnit**](DashboardScheduleNonWeeklyCustomRepeatUnit.md) | | [optional] + +## Example + +```python +from thousandeyes_sdk.dashboards.models.dashboard_schedule_custom_repeat_not import DashboardScheduleCustomRepeatNot + +# TODO update the JSON string below +json = "{}" +# create an instance of DashboardScheduleCustomRepeatNot from a JSON string +dashboard_schedule_custom_repeat_not_instance = DashboardScheduleCustomRepeatNot.from_json(json) +# print the JSON string representation of the object +print(DashboardScheduleCustomRepeatNot.to_json()) + +# convert the object into a dict +dashboard_schedule_custom_repeat_not_dict = dashboard_schedule_custom_repeat_not_instance.to_dict() +# create an instance of DashboardScheduleCustomRepeatNot from a dict +dashboard_schedule_custom_repeat_not_from_dict = DashboardScheduleCustomRepeatNot.from_dict(dashboard_schedule_custom_repeat_not_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-dashboards/docs/DashboardScheduleCustomRepeatType.md b/thousandeyes-sdk-dashboards/docs/DashboardScheduleCustomRepeatType.md new file mode 100644 index 000000000..dd8f85b7b --- /dev/null +++ b/thousandeyes-sdk-dashboards/docs/DashboardScheduleCustomRepeatType.md @@ -0,0 +1,11 @@ +# DashboardScheduleCustomRepeatType + + +## 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-dashboards/docs/DashboardScheduleCustomRepeatUnit.md b/thousandeyes-sdk-dashboards/docs/DashboardScheduleCustomRepeatUnit.md new file mode 100644 index 000000000..7b1d64262 --- /dev/null +++ b/thousandeyes-sdk-dashboards/docs/DashboardScheduleCustomRepeatUnit.md @@ -0,0 +1,11 @@ +# DashboardScheduleCustomRepeatUnit + + +## 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-dashboards/docs/DashboardScheduleDataSource.md b/thousandeyes-sdk-dashboards/docs/DashboardScheduleDataSource.md new file mode 100644 index 000000000..8e70b66b4 --- /dev/null +++ b/thousandeyes-sdk-dashboards/docs/DashboardScheduleDataSource.md @@ -0,0 +1,30 @@ +# DashboardScheduleDataSource + +Naming configuration for snapshots generated by the schedule. The required `dataTimespan` property on the schedule controls the snapshot data range. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name assigned to snapshots generated by the schedule. | + +## Example + +```python +from thousandeyes_sdk.dashboards.models.dashboard_schedule_data_source import DashboardScheduleDataSource + +# TODO update the JSON string below +json = "{}" +# create an instance of DashboardScheduleDataSource from a JSON string +dashboard_schedule_data_source_instance = DashboardScheduleDataSource.from_json(json) +# print the JSON string representation of the object +print(DashboardScheduleDataSource.to_json()) + +# convert the object into a dict +dashboard_schedule_data_source_dict = dashboard_schedule_data_source_instance.to_dict() +# create an instance of DashboardScheduleDataSource from a dict +dashboard_schedule_data_source_from_dict = DashboardScheduleDataSource.from_dict(dashboard_schedule_data_source_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-dashboards/docs/DashboardScheduleDateEndCondition.md b/thousandeyes-sdk-dashboards/docs/DashboardScheduleDateEndCondition.md new file mode 100644 index 000000000..69eaa035e --- /dev/null +++ b/thousandeyes-sdk-dashboards/docs/DashboardScheduleDateEndCondition.md @@ -0,0 +1,30 @@ +# DashboardScheduleDateEndCondition + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**end_condition_type** | **str** | Identifies a schedule that ends on a specified date. | +**value** | **int** | Unix timestamp in seconds when the recurrence ends. | + +## Example + +```python +from thousandeyes_sdk.dashboards.models.dashboard_schedule_date_end_condition import DashboardScheduleDateEndCondition + +# TODO update the JSON string below +json = "{}" +# create an instance of DashboardScheduleDateEndCondition from a JSON string +dashboard_schedule_date_end_condition_instance = DashboardScheduleDateEndCondition.from_json(json) +# print the JSON string representation of the object +print(DashboardScheduleDateEndCondition.to_json()) + +# convert the object into a dict +dashboard_schedule_date_end_condition_dict = dashboard_schedule_date_end_condition_instance.to_dict() +# create an instance of DashboardScheduleDateEndCondition from a dict +dashboard_schedule_date_end_condition_from_dict = DashboardScheduleDateEndCondition.from_dict(dashboard_schedule_date_end_condition_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-dashboards/docs/DashboardScheduleEndCondition.md b/thousandeyes-sdk-dashboards/docs/DashboardScheduleEndCondition.md new file mode 100644 index 000000000..0b7d3da6e --- /dev/null +++ b/thousandeyes-sdk-dashboards/docs/DashboardScheduleEndCondition.md @@ -0,0 +1,31 @@ +# DashboardScheduleEndCondition + +Condition that determines when the recurring schedule ends. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**end_condition_type** | **str** | Identifies a schedule that ends on a specified date. | +**value** | **int** | Unix timestamp in seconds when the recurrence ends. | + +## Example + +```python +from thousandeyes_sdk.dashboards.models.dashboard_schedule_end_condition import DashboardScheduleEndCondition + +# TODO update the JSON string below +json = "{}" +# create an instance of DashboardScheduleEndCondition from a JSON string +dashboard_schedule_end_condition_instance = DashboardScheduleEndCondition.from_json(json) +# print the JSON string representation of the object +print(DashboardScheduleEndCondition.to_json()) + +# convert the object into a dict +dashboard_schedule_end_condition_dict = dashboard_schedule_end_condition_instance.to_dict() +# create an instance of DashboardScheduleEndCondition from a dict +dashboard_schedule_end_condition_from_dict = DashboardScheduleEndCondition.from_dict(dashboard_schedule_end_condition_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-dashboards/docs/DashboardScheduleNeverEndCondition.md b/thousandeyes-sdk-dashboards/docs/DashboardScheduleNeverEndCondition.md new file mode 100644 index 000000000..b489c14dd --- /dev/null +++ b/thousandeyes-sdk-dashboards/docs/DashboardScheduleNeverEndCondition.md @@ -0,0 +1,29 @@ +# DashboardScheduleNeverEndCondition + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**end_condition_type** | **str** | Identifies a schedule that never ends. | + +## Example + +```python +from thousandeyes_sdk.dashboards.models.dashboard_schedule_never_end_condition import DashboardScheduleNeverEndCondition + +# TODO update the JSON string below +json = "{}" +# create an instance of DashboardScheduleNeverEndCondition from a JSON string +dashboard_schedule_never_end_condition_instance = DashboardScheduleNeverEndCondition.from_json(json) +# print the JSON string representation of the object +print(DashboardScheduleNeverEndCondition.to_json()) + +# convert the object into a dict +dashboard_schedule_never_end_condition_dict = dashboard_schedule_never_end_condition_instance.to_dict() +# create an instance of DashboardScheduleNeverEndCondition from a dict +dashboard_schedule_never_end_condition_from_dict = DashboardScheduleNeverEndCondition.from_dict(dashboard_schedule_never_end_condition_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-dashboards/docs/DashboardScheduleNonCustomCronSpec.md b/thousandeyes-sdk-dashboards/docs/DashboardScheduleNonCustomCronSpec.md new file mode 100644 index 000000000..1a2a0ecc7 --- /dev/null +++ b/thousandeyes-sdk-dashboards/docs/DashboardScheduleNonCustomCronSpec.md @@ -0,0 +1,29 @@ +# DashboardScheduleNonCustomCronSpec + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**repeat** | [**DashboardScheduleNonCustomRepeat**](DashboardScheduleNonCustomRepeat.md) | | [optional] + +## Example + +```python +from thousandeyes_sdk.dashboards.models.dashboard_schedule_non_custom_cron_spec import DashboardScheduleNonCustomCronSpec + +# TODO update the JSON string below +json = "{}" +# create an instance of DashboardScheduleNonCustomCronSpec from a JSON string +dashboard_schedule_non_custom_cron_spec_instance = DashboardScheduleNonCustomCronSpec.from_json(json) +# print the JSON string representation of the object +print(DashboardScheduleNonCustomCronSpec.to_json()) + +# convert the object into a dict +dashboard_schedule_non_custom_cron_spec_dict = dashboard_schedule_non_custom_cron_spec_instance.to_dict() +# create an instance of DashboardScheduleNonCustomCronSpec from a dict +dashboard_schedule_non_custom_cron_spec_from_dict = DashboardScheduleNonCustomCronSpec.from_dict(dashboard_schedule_non_custom_cron_spec_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-dashboards/docs/DashboardScheduleNonCustomRepeat.md b/thousandeyes-sdk-dashboards/docs/DashboardScheduleNonCustomRepeat.md new file mode 100644 index 000000000..7d2b6e1b9 --- /dev/null +++ b/thousandeyes-sdk-dashboards/docs/DashboardScheduleNonCustomRepeat.md @@ -0,0 +1,11 @@ +# DashboardScheduleNonCustomRepeat + + +## 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-dashboards/docs/DashboardScheduleNonWeeklyCustomRepeatUnit.md b/thousandeyes-sdk-dashboards/docs/DashboardScheduleNonWeeklyCustomRepeatUnit.md new file mode 100644 index 000000000..31622e666 --- /dev/null +++ b/thousandeyes-sdk-dashboards/docs/DashboardScheduleNonWeeklyCustomRepeatUnit.md @@ -0,0 +1,11 @@ +# DashboardScheduleNonWeeklyCustomRepeatUnit + + +## 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-dashboards/docs/DashboardScheduleOneTimeRepeatType.md b/thousandeyes-sdk-dashboards/docs/DashboardScheduleOneTimeRepeatType.md new file mode 100644 index 000000000..1dd06c0f8 --- /dev/null +++ b/thousandeyes-sdk-dashboards/docs/DashboardScheduleOneTimeRepeatType.md @@ -0,0 +1,11 @@ +# DashboardScheduleOneTimeRepeatType + + +## 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-dashboards/docs/DashboardScheduleRepeat.md b/thousandeyes-sdk-dashboards/docs/DashboardScheduleRepeat.md new file mode 100644 index 000000000..72a7451ea --- /dev/null +++ b/thousandeyes-sdk-dashboards/docs/DashboardScheduleRepeat.md @@ -0,0 +1,12 @@ +# DashboardScheduleRepeat + +Schedule repetition pattern. Use `NONE` to generate one snapshot at `startTime`. + +## 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-dashboards/docs/DashboardScheduleRequest.md b/thousandeyes-sdk-dashboards/docs/DashboardScheduleRequest.md new file mode 100644 index 000000000..128670d43 --- /dev/null +++ b/thousandeyes-sdk-dashboards/docs/DashboardScheduleRequest.md @@ -0,0 +1,39 @@ +# DashboardScheduleRequest + +Snapshot schedule configuration for create or update requests. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cron_spec** | [**DashboardScheduleCronSpec**](DashboardScheduleCronSpec.md) | | +**data_source** | [**DashboardScheduleDataSource**](DashboardScheduleDataSource.md) | | +**data_timespan** | [**DashboardScheduleTimespan**](DashboardScheduleTimespan.md) | | +**flag_enabled** | **bool** | When `true`, the schedule is active and snapshots are generated according to `cronSpec`. | +**flag_locked** | **bool** | When `true`, the schedule configuration is locked and cannot be edited through the web application. | [optional] +**flag_auto_share** | **bool** | When `true`, generated snapshots are automatically shared with schedule recipients. | [optional] +**flag_is_include_pii_user_data** | **bool** | When `true`, generated snapshots include personally identifiable user data when permitted by account policy. | [optional] +**flag_attach_pdf_to_email** | **bool** | When `true`, a PDF attachment is included in snapshot notification emails. | [optional] +**recipients** | **List[str]** | Email addresses of active dashboard account users who receive snapshot notifications. Unknown or duplicate addresses are rejected. | [optional] +**expires_after** | **int** | Snapshot retention period in seconds. Allowed range is 24 hours to 5 years. Defaults to 5 years when omitted. | [optional] [default to 157680000] + +## Example + +```python +from thousandeyes_sdk.dashboards.models.dashboard_schedule_request import DashboardScheduleRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of DashboardScheduleRequest from a JSON string +dashboard_schedule_request_instance = DashboardScheduleRequest.from_json(json) +# print the JSON string representation of the object +print(DashboardScheduleRequest.to_json()) + +# convert the object into a dict +dashboard_schedule_request_dict = dashboard_schedule_request_instance.to_dict() +# create an instance of DashboardScheduleRequest from a dict +dashboard_schedule_request_from_dict = DashboardScheduleRequest.from_dict(dashboard_schedule_request_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-dashboards/docs/DashboardScheduleTimespan.md b/thousandeyes-sdk-dashboards/docs/DashboardScheduleTimespan.md new file mode 100644 index 000000000..2375f0055 --- /dev/null +++ b/thousandeyes-sdk-dashboards/docs/DashboardScheduleTimespan.md @@ -0,0 +1,31 @@ +# DashboardScheduleTimespan + +Amount of historical data to include in each scheduled snapshot. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**n** | **int** | Number of time units in the snapshot data range. | +**period** | [**DashboardScheduleTimespanPeriod**](DashboardScheduleTimespanPeriod.md) | | + +## Example + +```python +from thousandeyes_sdk.dashboards.models.dashboard_schedule_timespan import DashboardScheduleTimespan + +# TODO update the JSON string below +json = "{}" +# create an instance of DashboardScheduleTimespan from a JSON string +dashboard_schedule_timespan_instance = DashboardScheduleTimespan.from_json(json) +# print the JSON string representation of the object +print(DashboardScheduleTimespan.to_json()) + +# convert the object into a dict +dashboard_schedule_timespan_dict = dashboard_schedule_timespan_instance.to_dict() +# create an instance of DashboardScheduleTimespan from a dict +dashboard_schedule_timespan_from_dict = DashboardScheduleTimespan.from_dict(dashboard_schedule_timespan_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-dashboards/docs/DashboardScheduleTimespanPeriod.md b/thousandeyes-sdk-dashboards/docs/DashboardScheduleTimespanPeriod.md new file mode 100644 index 000000000..1730d47ae --- /dev/null +++ b/thousandeyes-sdk-dashboards/docs/DashboardScheduleTimespanPeriod.md @@ -0,0 +1,11 @@ +# DashboardScheduleTimespanPeriod + + +## 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-dashboards/docs/DashboardsApi.md b/thousandeyes-sdk-dashboards/docs/DashboardsApi.md index f06df03b8..07b2900f4 100644 --- a/thousandeyes-sdk-dashboards/docs/DashboardsApi.md +++ b/thousandeyes-sdk-dashboards/docs/DashboardsApi.md @@ -4,16 +4,108 @@ All URIs are relative to *https://api.thousandeyes.com/v7* Method | HTTP request | Description ------------- | ------------- | ------------- +[**clone_dashboard**](DashboardsApi.md#clone_dashboard) | **POST** /dashboards/{dashboardId}/clone | Clone dashboard [**create_dashboard**](DashboardsApi.md#create_dashboard) | **POST** /dashboards | Create dashboard [**delete_dashboard**](DashboardsApi.md#delete_dashboard) | **DELETE** /dashboards/{dashboardId} | Delete dashboard +[**delete_dashboard_schedule**](DashboardsApi.md#delete_dashboard_schedule) | **DELETE** /dashboards/{dashboardId}/actions/schedule | Delete dashboard snapshot schedule [**get_dashboard**](DashboardsApi.md#get_dashboard) | **GET** /dashboards/{dashboardId} | Retrieve dashboard [**get_dashboard_widget_data**](DashboardsApi.md#get_dashboard_widget_data) | **GET** /dashboards/{dashboardId}/widgets/{widgetId} | Retrieve dashboard widget data [**get_dashboards**](DashboardsApi.md#get_dashboards) | **GET** /dashboards | List dashboards [**get_individual_card_data**](DashboardsApi.md#get_individual_card_data) | **GET** /dashboards/{dashboardId}/widgets/{widgetId}/cards/{cardId} | Retrieve individual card data from numbers widget [**get_individual_column_data**](DashboardsApi.md#get_individual_column_data) | **GET** /dashboards/{dashboardId}/widgets/{widgetId}/columns/{columnId} | Retrieve individual column data from multi-metric table widget [**update_dashboard**](DashboardsApi.md#update_dashboard) | **PUT** /dashboards/{dashboardId} | Update dashboard +[**update_dashboard_schedule**](DashboardsApi.md#update_dashboard_schedule) | **PUT** /dashboards/{dashboardId}/actions/schedule | Create or update dashboard snapshot schedule +# **clone_dashboard** +> Dashboard clone_dashboard(dashboard_id, aid=aid, clone_dashboard_request=clone_dashboard_request) + +Clone dashboard + +Creates a dashboard by cloning an existing dashboard. By default, the clone inherits the source dashboard's widgets, layout, default timespan, tags, and other supported settings. Values provided in the request override the corresponding source dashboard settings. Sharing settings are not inherited. If `title` is omitted, the API generates a unique title for the clone. **Note**: * Users with the `Edit dashboard templates for all users in account group` permission (Account Admin) can clone any dashboard they can view. * Users with the `Edit own dashboard templates` permission (Regular User) can clone dashboards they can view. The current user owns the cloned dashboard. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.dashboards +from thousandeyes_sdk.dashboards.models.clone_dashboard_request import CloneDashboardRequest +from thousandeyes_sdk.dashboards.models.dashboard import Dashboard +from thousandeyes_sdk.dashboards.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com/v7 +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.core.Configuration( + host = "https://api.thousandeyes.com/v7" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = thousandeyes_sdk.core.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.core.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.dashboards.DashboardsApi(api_client) + dashboard_id = '646f4d2ce3c99b0536c3821e' # str | A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. + aid = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional) + clone_dashboard_request = thousandeyes_sdk.dashboards.CloneDashboardRequest() # CloneDashboardRequest | Optional overrides for the cloned dashboard. (optional) + + try: + # Clone dashboard + api_response = api_instance.clone_dashboard(dashboard_id, aid=aid, clone_dashboard_request=clone_dashboard_request) + print("The response of DashboardsApi->clone_dashboard:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DashboardsApi->clone_dashboard: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **dashboard_id** | **str**| A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. | + **aid** | **str**| A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional] + **clone_dashboard_request** | [**CloneDashboardRequest**](CloneDashboardRequest.md)| Optional overrides for the cloned dashboard. | [optional] + +### Return type + +[**Dashboard**](Dashboard.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Dashboard cloned successfully. | * Location -
| +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | +**404** | Not found | - | +**429** | Exhausted rate limit for the organization | - | +**500** | Internal server error | - | + +[[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_dashboard** > Dashboard create_dashboard(dashboard, aid=aid) @@ -183,6 +275,90 @@ 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) +# **delete_dashboard_schedule** +> delete_dashboard_schedule(dashboard_id, aid=aid) + +Delete dashboard snapshot schedule + +Removes the snapshot schedule from a dashboard. Existing snapshots are not deleted. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.dashboards +from thousandeyes_sdk.dashboards.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com/v7 +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.core.Configuration( + host = "https://api.thousandeyes.com/v7" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = thousandeyes_sdk.core.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.core.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.dashboards.DashboardsApi(api_client) + dashboard_id = '646f4d2ce3c99b0536c3821e' # str | A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. + aid = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional) + + try: + # Delete dashboard snapshot schedule + api_instance.delete_dashboard_schedule(dashboard_id, aid=aid) + except Exception as e: + print("Exception when calling DashboardsApi->delete_dashboard_schedule: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **dashboard_id** | **str**| A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. | + **aid** | **str**| A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/problem+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No content | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | +**404** | Not found | - | +**409** | The dashboard changed while the schedule operation was being applied. | - | +**429** | Exhausted rate limit for the organization | - | +**500** | Internal server error | - | + +[[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_dashboard** > ApiDashboard get_dashboard(dashboard_id, aid=aid) @@ -736,3 +912,93 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **update_dashboard_schedule** +> ApiDashboard update_dashboard_schedule(dashboard_id, dashboard_schedule_request, aid=aid) + +Create or update dashboard snapshot schedule + +Creates or replaces the snapshot schedule for a dashboard. Set `repeat` to `NONE` to generate one snapshot at `startTime`. Other `repeat` values create recurring snapshots. Schedule settings control when snapshots are generated, the data time range included in each snapshot, and email delivery options. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.dashboards +from thousandeyes_sdk.dashboards.models.api_dashboard import ApiDashboard +from thousandeyes_sdk.dashboards.models.dashboard_schedule_request import DashboardScheduleRequest +from thousandeyes_sdk.dashboards.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com/v7 +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.core.Configuration( + host = "https://api.thousandeyes.com/v7" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: BearerAuth +configuration = thousandeyes_sdk.core.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.core.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.dashboards.DashboardsApi(api_client) + dashboard_id = '646f4d2ce3c99b0536c3821e' # str | A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. + dashboard_schedule_request = thousandeyes_sdk.dashboards.DashboardScheduleRequest() # DashboardScheduleRequest | Snapshot schedule configuration. + aid = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional) + + try: + # Create or update dashboard snapshot schedule + api_response = api_instance.update_dashboard_schedule(dashboard_id, dashboard_schedule_request, aid=aid) + print("The response of DashboardsApi->update_dashboard_schedule:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DashboardsApi->update_dashboard_schedule: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **dashboard_id** | **str**| A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. | + **dashboard_schedule_request** | [**DashboardScheduleRequest**](DashboardScheduleRequest.md)| Snapshot schedule configuration. | + **aid** | **str**| A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional] + +### Return type + +[**ApiDashboard**](ApiDashboard.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | +**404** | Not found | - | +**409** | The dashboard changed while the schedule operation was being applied. | - | +**429** | Exhausted rate limit for the organization | - | +**500** | Internal server error | - | + +[[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) + diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/__init__.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/__init__.py index 816871205..1e86fee40 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/__init__.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/__init__.py @@ -88,6 +88,8 @@ from thousandeyes_sdk.dashboards.models.asw_repeat import AswRepeat from thousandeyes_sdk.dashboards.models.asw_repeat_unit import AswRepeatUnit from thousandeyes_sdk.dashboards.models.box_and_whiskers_datasource import BoxAndWhiskersDatasource +from thousandeyes_sdk.dashboards.models.clone_dashboard_refresh_rate import CloneDashboardRefreshRate +from thousandeyes_sdk.dashboards.models.clone_dashboard_request import CloneDashboardRequest from thousandeyes_sdk.dashboards.models.color_grid_datasource import ColorGridDatasource from thousandeyes_sdk.dashboards.models.dashboard import Dashboard from thousandeyes_sdk.dashboards.models.dashboard_global_filter_id import DashboardGlobalFilterId @@ -98,6 +100,26 @@ from thousandeyes_sdk.dashboards.models.dashboard_metric import DashboardMetric from thousandeyes_sdk.dashboards.models.dashboard_metric_direction import DashboardMetricDirection from thousandeyes_sdk.dashboards.models.dashboard_order import DashboardOrder +from thousandeyes_sdk.dashboards.models.dashboard_schedule import DashboardSchedule +from thousandeyes_sdk.dashboards.models.dashboard_schedule_after_end_condition import DashboardScheduleAfterEndCondition +from thousandeyes_sdk.dashboards.models.dashboard_schedule_cron_spec import DashboardScheduleCronSpec +from thousandeyes_sdk.dashboards.models.dashboard_schedule_custom_cron_spec import DashboardScheduleCustomCronSpec +from thousandeyes_sdk.dashboards.models.dashboard_schedule_custom_repeat import DashboardScheduleCustomRepeat +from thousandeyes_sdk.dashboards.models.dashboard_schedule_custom_repeat_not import DashboardScheduleCustomRepeatNot +from thousandeyes_sdk.dashboards.models.dashboard_schedule_custom_repeat_type import DashboardScheduleCustomRepeatType +from thousandeyes_sdk.dashboards.models.dashboard_schedule_custom_repeat_unit import DashboardScheduleCustomRepeatUnit +from thousandeyes_sdk.dashboards.models.dashboard_schedule_data_source import DashboardScheduleDataSource +from thousandeyes_sdk.dashboards.models.dashboard_schedule_date_end_condition import DashboardScheduleDateEndCondition +from thousandeyes_sdk.dashboards.models.dashboard_schedule_end_condition import DashboardScheduleEndCondition +from thousandeyes_sdk.dashboards.models.dashboard_schedule_never_end_condition import DashboardScheduleNeverEndCondition +from thousandeyes_sdk.dashboards.models.dashboard_schedule_non_custom_cron_spec import DashboardScheduleNonCustomCronSpec +from thousandeyes_sdk.dashboards.models.dashboard_schedule_non_custom_repeat import DashboardScheduleNonCustomRepeat +from thousandeyes_sdk.dashboards.models.dashboard_schedule_non_weekly_custom_repeat_unit import DashboardScheduleNonWeeklyCustomRepeatUnit +from thousandeyes_sdk.dashboards.models.dashboard_schedule_one_time_repeat_type import DashboardScheduleOneTimeRepeatType +from thousandeyes_sdk.dashboards.models.dashboard_schedule_repeat import DashboardScheduleRepeat +from thousandeyes_sdk.dashboards.models.dashboard_schedule_request import DashboardScheduleRequest +from thousandeyes_sdk.dashboards.models.dashboard_schedule_timespan import DashboardScheduleTimespan +from thousandeyes_sdk.dashboards.models.dashboard_schedule_timespan_period import DashboardScheduleTimespanPeriod from thousandeyes_sdk.dashboards.models.dashboard_snapshot_response import DashboardSnapshotResponse from thousandeyes_sdk.dashboards.models.dashboard_snapshots_page import DashboardSnapshotsPage from thousandeyes_sdk.dashboards.models.default_timespan import DefaultTimespan diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/api/dashboards_api.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/api/dashboards_api.py index 1d88776e2..52510ad99 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/api/dashboards_api.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/api/dashboards_api.py @@ -26,8 +26,10 @@ from thousandeyes_sdk.dashboards.models.api_multi_metric_column_data import ApiMultiMetricColumnData from thousandeyes_sdk.dashboards.models.api_numbers_card_data import ApiNumbersCardData from thousandeyes_sdk.dashboards.models.api_widget_data_response import ApiWidgetDataResponse +from thousandeyes_sdk.dashboards.models.clone_dashboard_request import CloneDashboardRequest from thousandeyes_sdk.dashboards.models.dashboard import Dashboard from thousandeyes_sdk.dashboards.models.dashboard_order import DashboardOrder +from thousandeyes_sdk.dashboards.models.dashboard_schedule_request import DashboardScheduleRequest from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.core.api_response import ApiResponse @@ -50,10 +52,11 @@ def __init__(self, api_client=None) -> None: @validate_call - def create_dashboard( + def clone_dashboard( self, - dashboard: Annotated[Dashboard, Field(description="Request body schema to create a dashboard.")], + dashboard_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint.")], aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + clone_dashboard_request: Annotated[Optional[CloneDashboardRequest], Field(description="Optional overrides for the cloned dashboard.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -67,14 +70,16 @@ def create_dashboard( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> Dashboard: - """Create dashboard + """Clone dashboard - Creates a new dashboard in your account group. To create a dashboard, you must have one of the following permissions: * `Edit dashboard templates for all users in account group` permission (Account Admin). * `Edit own dashboard templates` permission (Regular User). + Creates a dashboard by cloning an existing dashboard. By default, the clone inherits the source dashboard's widgets, layout, default timespan, tags, and other supported settings. Values provided in the request override the corresponding source dashboard settings. Sharing settings are not inherited. If `title` is omitted, the API generates a unique title for the clone. **Note**: * Users with the `Edit dashboard templates for all users in account group` permission (Account Admin) can clone any dashboard they can view. * Users with the `Edit own dashboard templates` permission (Regular User) can clone dashboards they can view. The current user owns the cloned dashboard. - :param dashboard: Request body schema to create a dashboard. (required) - :type dashboard: Dashboard + :param dashboard_id: A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. (required) + :type dashboard_id: str :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. :type aid: str + :param clone_dashboard_request: Optional overrides for the cloned dashboard. + :type clone_dashboard_request: CloneDashboardRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -97,9 +102,10 @@ def create_dashboard( :return: Returns the result object. """ # noqa: E501 - _param = self._create_dashboard_serialize( - dashboard=dashboard, + _param = self._clone_dashboard_serialize( + dashboard_id=dashboard_id, aid=aid, + clone_dashboard_request=clone_dashboard_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -128,10 +134,11 @@ def create_dashboard( @validate_call - def create_dashboard_with_http_info( + def clone_dashboard_with_http_info( self, - dashboard: Annotated[Dashboard, Field(description="Request body schema to create a dashboard.")], + dashboard_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint.")], aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + clone_dashboard_request: Annotated[Optional[CloneDashboardRequest], Field(description="Optional overrides for the cloned dashboard.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -145,14 +152,16 @@ def create_dashboard_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[Dashboard]: - """Create dashboard + """Clone dashboard - Creates a new dashboard in your account group. To create a dashboard, you must have one of the following permissions: * `Edit dashboard templates for all users in account group` permission (Account Admin). * `Edit own dashboard templates` permission (Regular User). + Creates a dashboard by cloning an existing dashboard. By default, the clone inherits the source dashboard's widgets, layout, default timespan, tags, and other supported settings. Values provided in the request override the corresponding source dashboard settings. Sharing settings are not inherited. If `title` is omitted, the API generates a unique title for the clone. **Note**: * Users with the `Edit dashboard templates for all users in account group` permission (Account Admin) can clone any dashboard they can view. * Users with the `Edit own dashboard templates` permission (Regular User) can clone dashboards they can view. The current user owns the cloned dashboard. - :param dashboard: Request body schema to create a dashboard. (required) - :type dashboard: Dashboard + :param dashboard_id: A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. (required) + :type dashboard_id: str :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. :type aid: str + :param clone_dashboard_request: Optional overrides for the cloned dashboard. + :type clone_dashboard_request: CloneDashboardRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -175,9 +184,10 @@ def create_dashboard_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._create_dashboard_serialize( - dashboard=dashboard, + _param = self._clone_dashboard_serialize( + dashboard_id=dashboard_id, aid=aid, + clone_dashboard_request=clone_dashboard_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -206,10 +216,11 @@ def create_dashboard_with_http_info( @validate_call - def create_dashboard_without_preload_content( + def clone_dashboard_without_preload_content( self, - dashboard: Annotated[Dashboard, Field(description="Request body schema to create a dashboard.")], + dashboard_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint.")], aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + clone_dashboard_request: Annotated[Optional[CloneDashboardRequest], Field(description="Optional overrides for the cloned dashboard.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -223,14 +234,16 @@ def create_dashboard_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create dashboard + """Clone dashboard - Creates a new dashboard in your account group. To create a dashboard, you must have one of the following permissions: * `Edit dashboard templates for all users in account group` permission (Account Admin). * `Edit own dashboard templates` permission (Regular User). + Creates a dashboard by cloning an existing dashboard. By default, the clone inherits the source dashboard's widgets, layout, default timespan, tags, and other supported settings. Values provided in the request override the corresponding source dashboard settings. Sharing settings are not inherited. If `title` is omitted, the API generates a unique title for the clone. **Note**: * Users with the `Edit dashboard templates for all users in account group` permission (Account Admin) can clone any dashboard they can view. * Users with the `Edit own dashboard templates` permission (Regular User) can clone dashboards they can view. The current user owns the cloned dashboard. - :param dashboard: Request body schema to create a dashboard. (required) - :type dashboard: Dashboard + :param dashboard_id: A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. (required) + :type dashboard_id: str :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. :type aid: str + :param clone_dashboard_request: Optional overrides for the cloned dashboard. + :type clone_dashboard_request: CloneDashboardRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -253,9 +266,10 @@ def create_dashboard_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._create_dashboard_serialize( - dashboard=dashboard, + _param = self._clone_dashboard_serialize( + dashboard_id=dashboard_id, aid=aid, + clone_dashboard_request=clone_dashboard_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -278,10 +292,11 @@ def create_dashboard_without_preload_content( return response_data.response - def _create_dashboard_serialize( + def _clone_dashboard_serialize( self, - dashboard, + dashboard_id, aid, + clone_dashboard_request, _request_auth, _content_type, _headers, @@ -301,6 +316,8 @@ def _create_dashboard_serialize( _body_params: Optional[bytes] = None # process the path parameters + if dashboard_id is not None: + _path_params['dashboardId'] = dashboard_id # process the query parameters if aid is not None: @@ -309,8 +326,8 @@ def _create_dashboard_serialize( # process the header parameters # process the form parameters # process the body parameter - if dashboard is not None: - _body_params = dashboard + if clone_dashboard_request is not None: + _body_params = clone_dashboard_request # set the HTTP header `Accept` @@ -343,7 +360,7 @@ def _create_dashboard_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/dashboards', + resource_path='/dashboards/{dashboardId}/clone', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -360,9 +377,9 @@ def _create_dashboard_serialize( @validate_call - def delete_dashboard( + def create_dashboard( self, - dashboard_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint.")], + dashboard: Annotated[Dashboard, Field(description="Request body schema to create a dashboard.")], aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, _request_timeout: Union[ None, @@ -376,13 +393,13 @@ def delete_dashboard( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Delete dashboard + ) -> Dashboard: + """Create dashboard - Deletes a dashboard using the `dashboardId` provided in the request. **Note**: * Users with the `Edit dashboard templates for all users in account group` permission (Account Admin) can delete any dashboard. * Users with the `Edit own dashboard templates` permission (Regular User) can only delete the dashboards they have created themselves. + Creates a new dashboard in your account group. To create a dashboard, you must have one of the following permissions: * `Edit dashboard templates for all users in account group` permission (Account Admin). * `Edit own dashboard templates` permission (Regular User). - :param dashboard_id: A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. (required) - :type dashboard_id: str + :param dashboard: Request body schema to create a dashboard. (required) + :type dashboard: Dashboard :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. :type aid: str :param _request_timeout: timeout setting for this request. If one @@ -407,8 +424,8 @@ def delete_dashboard( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_dashboard_serialize( - dashboard_id=dashboard_id, + _param = self._create_dashboard_serialize( + dashboard=dashboard, aid=aid, _request_auth=_request_auth, _content_type=_content_type, @@ -417,7 +434,7 @@ def delete_dashboard( ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + '201': "Dashboard", '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", @@ -438,9 +455,9 @@ def delete_dashboard( @validate_call - def delete_dashboard_with_http_info( + def create_dashboard_with_http_info( self, - dashboard_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint.")], + dashboard: Annotated[Dashboard, Field(description="Request body schema to create a dashboard.")], aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, _request_timeout: Union[ None, @@ -454,13 +471,13 @@ def delete_dashboard_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Delete dashboard + ) -> ApiResponse[Dashboard]: + """Create dashboard - Deletes a dashboard using the `dashboardId` provided in the request. **Note**: * Users with the `Edit dashboard templates for all users in account group` permission (Account Admin) can delete any dashboard. * Users with the `Edit own dashboard templates` permission (Regular User) can only delete the dashboards they have created themselves. + Creates a new dashboard in your account group. To create a dashboard, you must have one of the following permissions: * `Edit dashboard templates for all users in account group` permission (Account Admin). * `Edit own dashboard templates` permission (Regular User). - :param dashboard_id: A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. (required) - :type dashboard_id: str + :param dashboard: Request body schema to create a dashboard. (required) + :type dashboard: Dashboard :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. :type aid: str :param _request_timeout: timeout setting for this request. If one @@ -485,8 +502,8 @@ def delete_dashboard_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_dashboard_serialize( - dashboard_id=dashboard_id, + _param = self._create_dashboard_serialize( + dashboard=dashboard, aid=aid, _request_auth=_request_auth, _content_type=_content_type, @@ -495,7 +512,7 @@ def delete_dashboard_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + '201': "Dashboard", '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", @@ -516,9 +533,9 @@ def delete_dashboard_with_http_info( @validate_call - def delete_dashboard_without_preload_content( + def create_dashboard_without_preload_content( self, - dashboard_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint.")], + dashboard: Annotated[Dashboard, Field(description="Request body schema to create a dashboard.")], aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, _request_timeout: Union[ None, @@ -533,12 +550,12 @@ def delete_dashboard_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Delete dashboard + """Create dashboard - Deletes a dashboard using the `dashboardId` provided in the request. **Note**: * Users with the `Edit dashboard templates for all users in account group` permission (Account Admin) can delete any dashboard. * Users with the `Edit own dashboard templates` permission (Regular User) can only delete the dashboards they have created themselves. + Creates a new dashboard in your account group. To create a dashboard, you must have one of the following permissions: * `Edit dashboard templates for all users in account group` permission (Account Admin). * `Edit own dashboard templates` permission (Regular User). - :param dashboard_id: A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. (required) - :type dashboard_id: str + :param dashboard: Request body schema to create a dashboard. (required) + :type dashboard: Dashboard :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. :type aid: str :param _request_timeout: timeout setting for this request. If one @@ -563,8 +580,8 @@ def delete_dashboard_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_dashboard_serialize( - dashboard_id=dashboard_id, + _param = self._create_dashboard_serialize( + dashboard=dashboard, aid=aid, _request_auth=_request_auth, _content_type=_content_type, @@ -573,7 +590,7 @@ def delete_dashboard_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, + '201': "Dashboard", '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", @@ -588,9 +605,9 @@ def delete_dashboard_without_preload_content( return response_data.response - def _delete_dashboard_serialize( + def _create_dashboard_serialize( self, - dashboard_id, + dashboard, aid, _request_auth, _content_type, @@ -611,8 +628,6 @@ def _delete_dashboard_serialize( _body_params: Optional[bytes] = None # process the path parameters - if dashboard_id is not None: - _path_params['dashboardId'] = dashboard_id # process the query parameters if aid is not None: @@ -621,16 +636,32 @@ def _delete_dashboard_serialize( # process the header parameters # process the form parameters # process the body parameter + if dashboard is not None: + _body_params = dashboard # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ + 'application/hal+json', 'application/json', 'application/problem+json' ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -638,8 +669,8 @@ def _delete_dashboard_serialize( ] return self.api_client.param_serialize( - method='DELETE', - resource_path='/dashboards/{dashboardId}', + method='POST', + resource_path='/dashboards', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -656,7 +687,7 @@ def _delete_dashboard_serialize( @validate_call - def get_dashboard( + def delete_dashboard( self, dashboard_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint.")], aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, @@ -672,10 +703,10 @@ def get_dashboard( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiDashboard: - """Retrieve dashboard + ) -> None: + """Delete dashboard - Returns a list of widgets within a dashboard, along with the dashboard's metadata. + Deletes a dashboard using the `dashboardId` provided in the request. **Note**: * Users with the `Edit dashboard templates for all users in account group` permission (Account Admin) can delete any dashboard. * Users with the `Edit own dashboard templates` permission (Regular User) can only delete the dashboards they have created themselves. :param dashboard_id: A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. (required) :type dashboard_id: str @@ -703,7 +734,7 @@ def get_dashboard( :return: Returns the result object. """ # noqa: E501 - _param = self._get_dashboard_serialize( + _param = self._delete_dashboard_serialize( dashboard_id=dashboard_id, aid=aid, _request_auth=_request_auth, @@ -713,7 +744,7 @@ def get_dashboard( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiDashboard", + '204': None, '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", @@ -734,7 +765,7 @@ def get_dashboard( @validate_call - def get_dashboard_with_http_info( + def delete_dashboard_with_http_info( self, dashboard_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint.")], aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, @@ -750,10 +781,10 @@ def get_dashboard_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ApiDashboard]: - """Retrieve dashboard + ) -> ApiResponse[None]: + """Delete dashboard - Returns a list of widgets within a dashboard, along with the dashboard's metadata. + Deletes a dashboard using the `dashboardId` provided in the request. **Note**: * Users with the `Edit dashboard templates for all users in account group` permission (Account Admin) can delete any dashboard. * Users with the `Edit own dashboard templates` permission (Regular User) can only delete the dashboards they have created themselves. :param dashboard_id: A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. (required) :type dashboard_id: str @@ -781,7 +812,7 @@ def get_dashboard_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_dashboard_serialize( + _param = self._delete_dashboard_serialize( dashboard_id=dashboard_id, aid=aid, _request_auth=_request_auth, @@ -791,7 +822,7 @@ def get_dashboard_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiDashboard", + '204': None, '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", @@ -812,7 +843,7 @@ def get_dashboard_with_http_info( @validate_call - def get_dashboard_without_preload_content( + def delete_dashboard_without_preload_content( self, dashboard_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint.")], aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, @@ -829,9 +860,9 @@ def get_dashboard_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Retrieve dashboard + """Delete dashboard - Returns a list of widgets within a dashboard, along with the dashboard's metadata. + Deletes a dashboard using the `dashboardId` provided in the request. **Note**: * Users with the `Edit dashboard templates for all users in account group` permission (Account Admin) can delete any dashboard. * Users with the `Edit own dashboard templates` permission (Regular User) can only delete the dashboards they have created themselves. :param dashboard_id: A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. (required) :type dashboard_id: str @@ -859,7 +890,7 @@ def get_dashboard_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_dashboard_serialize( + _param = self._delete_dashboard_serialize( dashboard_id=dashboard_id, aid=aid, _request_auth=_request_auth, @@ -869,7 +900,7 @@ def get_dashboard_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiDashboard", + '204': None, '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", @@ -884,7 +915,7 @@ def get_dashboard_without_preload_content( return response_data.response - def _get_dashboard_serialize( + def _delete_dashboard_serialize( self, dashboard_id, aid, @@ -922,7 +953,6 @@ def _get_dashboard_serialize( # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ - 'application/hal+json', 'application/json', 'application/problem+json' ] @@ -935,7 +965,7 @@ def _get_dashboard_serialize( ] return self.api_client.param_serialize( - method='GET', + method='DELETE', resource_path='/dashboards/{dashboardId}', path_params=_path_params, query_params=_query_params, @@ -953,18 +983,10 @@ def _get_dashboard_serialize( @validate_call - def get_dashboard_widget_data( + def delete_dashboard_schedule( self, dashboard_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint.")], - widget_id: Annotated[StrictStr, Field(description="A Identifier for a widget.")], aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, - window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None, - start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, - end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, - max: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Optionally specify the maximum number of objects to retrieve. This only applies to the **Alert List** and **Test Table** Widgets. * The default for the **Alert List** widget is set by its limitBy configuration. * The default value for the **Test Table** widget is 10.")] = None, - cursor: Annotated[Optional[StrictStr], Field(description="An optional pagination cursor. This parameter should not not be used directly. Instead, use the `_links` returned by the API. This feature is only available in the **Test Table** widget.")] = None, - sort: Annotated[Optional[StrictStr], Field(description="Optional sorting parameter with attributes listed comma-separated. This only applies to the **Alert List** and **Test Table** Widgets. * For the **Alert List** widget, you can sort by `alertStatus` or `startTime`. The default is `alertStatus`. * For the **Test Table** widget, you can sort by `alertStatus`, `testName`, or `testType`. The sequence might vary from the web application. The default sort attribute is `alertStatus`.")] = None, - order: Annotated[Optional[DashboardOrder], Field(description="Optional sorting order parameter that accepts either `asc` (ascending) or `desc` (descending) values. This only applies to the **Alert List** and **Test Table** Widgets.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -977,31 +999,15 @@ def get_dashboard_widget_data( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiWidgetDataResponse: - """Retrieve dashboard widget data + ) -> None: + """Delete dashboard snapshot schedule - Returns the raw data displayed within a widget in the dashboard. + Removes the snapshot schedule from a dashboard. Existing snapshots are not deleted. :param dashboard_id: A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. (required) :type dashboard_id: str - :param widget_id: A Identifier for a widget. (required) - :type widget_id: str :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. :type aid: str - :param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. - :type window: str - :param start_date: Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. - :type start_date: datetime - :param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. - :type end_date: datetime - :param max: Optionally specify the maximum number of objects to retrieve. This only applies to the **Alert List** and **Test Table** Widgets. * The default for the **Alert List** widget is set by its limitBy configuration. * The default value for the **Test Table** widget is 10. - :type max: float - :param cursor: An optional pagination cursor. This parameter should not not be used directly. Instead, use the `_links` returned by the API. This feature is only available in the **Test Table** widget. - :type cursor: str - :param sort: Optional sorting parameter with attributes listed comma-separated. This only applies to the **Alert List** and **Test Table** Widgets. * For the **Alert List** widget, you can sort by `alertStatus` or `startTime`. The default is `alertStatus`. * For the **Test Table** widget, you can sort by `alertStatus`, `testName`, or `testType`. The sequence might vary from the web application. The default sort attribute is `alertStatus`. - :type sort: str - :param order: Optional sorting order parameter that accepts either `asc` (ascending) or `desc` (descending) values. This only applies to the **Alert List** and **Test Table** Widgets. - :type order: DashboardOrder :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1024,17 +1030,9 @@ def get_dashboard_widget_data( :return: Returns the result object. """ # noqa: E501 - _param = self._get_dashboard_widget_data_serialize( + _param = self._delete_dashboard_schedule_serialize( dashboard_id=dashboard_id, - widget_id=widget_id, aid=aid, - window=window, - start_date=start_date, - end_date=end_date, - max=max, - cursor=cursor, - sort=sort, - order=order, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1042,11 +1040,12 @@ def get_dashboard_widget_data( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiWidgetDataResponse", + '204': None, '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", + '409': "Error", '429': "Error", '500': "Error", } @@ -1063,18 +1062,10 @@ def get_dashboard_widget_data( @validate_call - def get_dashboard_widget_data_with_http_info( + def delete_dashboard_schedule_with_http_info( self, dashboard_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint.")], - widget_id: Annotated[StrictStr, Field(description="A Identifier for a widget.")], aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, - window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None, - start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, - end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, - max: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Optionally specify the maximum number of objects to retrieve. This only applies to the **Alert List** and **Test Table** Widgets. * The default for the **Alert List** widget is set by its limitBy configuration. * The default value for the **Test Table** widget is 10.")] = None, - cursor: Annotated[Optional[StrictStr], Field(description="An optional pagination cursor. This parameter should not not be used directly. Instead, use the `_links` returned by the API. This feature is only available in the **Test Table** widget.")] = None, - sort: Annotated[Optional[StrictStr], Field(description="Optional sorting parameter with attributes listed comma-separated. This only applies to the **Alert List** and **Test Table** Widgets. * For the **Alert List** widget, you can sort by `alertStatus` or `startTime`. The default is `alertStatus`. * For the **Test Table** widget, you can sort by `alertStatus`, `testName`, or `testType`. The sequence might vary from the web application. The default sort attribute is `alertStatus`.")] = None, - order: Annotated[Optional[DashboardOrder], Field(description="Optional sorting order parameter that accepts either `asc` (ascending) or `desc` (descending) values. This only applies to the **Alert List** and **Test Table** Widgets.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1087,31 +1078,15 @@ def get_dashboard_widget_data_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ApiWidgetDataResponse]: - """Retrieve dashboard widget data + ) -> ApiResponse[None]: + """Delete dashboard snapshot schedule - Returns the raw data displayed within a widget in the dashboard. + Removes the snapshot schedule from a dashboard. Existing snapshots are not deleted. :param dashboard_id: A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. (required) :type dashboard_id: str - :param widget_id: A Identifier for a widget. (required) - :type widget_id: str :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. :type aid: str - :param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. - :type window: str - :param start_date: Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. - :type start_date: datetime - :param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. - :type end_date: datetime - :param max: Optionally specify the maximum number of objects to retrieve. This only applies to the **Alert List** and **Test Table** Widgets. * The default for the **Alert List** widget is set by its limitBy configuration. * The default value for the **Test Table** widget is 10. - :type max: float - :param cursor: An optional pagination cursor. This parameter should not not be used directly. Instead, use the `_links` returned by the API. This feature is only available in the **Test Table** widget. - :type cursor: str - :param sort: Optional sorting parameter with attributes listed comma-separated. This only applies to the **Alert List** and **Test Table** Widgets. * For the **Alert List** widget, you can sort by `alertStatus` or `startTime`. The default is `alertStatus`. * For the **Test Table** widget, you can sort by `alertStatus`, `testName`, or `testType`. The sequence might vary from the web application. The default sort attribute is `alertStatus`. - :type sort: str - :param order: Optional sorting order parameter that accepts either `asc` (ascending) or `desc` (descending) values. This only applies to the **Alert List** and **Test Table** Widgets. - :type order: DashboardOrder :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1134,17 +1109,9 @@ def get_dashboard_widget_data_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_dashboard_widget_data_serialize( + _param = self._delete_dashboard_schedule_serialize( dashboard_id=dashboard_id, - widget_id=widget_id, aid=aid, - window=window, - start_date=start_date, - end_date=end_date, - max=max, - cursor=cursor, - sort=sort, - order=order, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1152,11 +1119,12 @@ def get_dashboard_widget_data_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiWidgetDataResponse", + '204': None, '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", + '409': "Error", '429': "Error", '500': "Error", } @@ -1173,18 +1141,10 @@ def get_dashboard_widget_data_with_http_info( @validate_call - def get_dashboard_widget_data_without_preload_content( + def delete_dashboard_schedule_without_preload_content( self, dashboard_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint.")], - widget_id: Annotated[StrictStr, Field(description="A Identifier for a widget.")], aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, - window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None, - start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, - end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, - max: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Optionally specify the maximum number of objects to retrieve. This only applies to the **Alert List** and **Test Table** Widgets. * The default for the **Alert List** widget is set by its limitBy configuration. * The default value for the **Test Table** widget is 10.")] = None, - cursor: Annotated[Optional[StrictStr], Field(description="An optional pagination cursor. This parameter should not not be used directly. Instead, use the `_links` returned by the API. This feature is only available in the **Test Table** widget.")] = None, - sort: Annotated[Optional[StrictStr], Field(description="Optional sorting parameter with attributes listed comma-separated. This only applies to the **Alert List** and **Test Table** Widgets. * For the **Alert List** widget, you can sort by `alertStatus` or `startTime`. The default is `alertStatus`. * For the **Test Table** widget, you can sort by `alertStatus`, `testName`, or `testType`. The sequence might vary from the web application. The default sort attribute is `alertStatus`.")] = None, - order: Annotated[Optional[DashboardOrder], Field(description="Optional sorting order parameter that accepts either `asc` (ascending) or `desc` (descending) values. This only applies to the **Alert List** and **Test Table** Widgets.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1198,30 +1158,14 @@ def get_dashboard_widget_data_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Retrieve dashboard widget data + """Delete dashboard snapshot schedule - Returns the raw data displayed within a widget in the dashboard. + Removes the snapshot schedule from a dashboard. Existing snapshots are not deleted. :param dashboard_id: A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. (required) :type dashboard_id: str - :param widget_id: A Identifier for a widget. (required) - :type widget_id: str :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. :type aid: str - :param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. - :type window: str - :param start_date: Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. - :type start_date: datetime - :param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. - :type end_date: datetime - :param max: Optionally specify the maximum number of objects to retrieve. This only applies to the **Alert List** and **Test Table** Widgets. * The default for the **Alert List** widget is set by its limitBy configuration. * The default value for the **Test Table** widget is 10. - :type max: float - :param cursor: An optional pagination cursor. This parameter should not not be used directly. Instead, use the `_links` returned by the API. This feature is only available in the **Test Table** widget. - :type cursor: str - :param sort: Optional sorting parameter with attributes listed comma-separated. This only applies to the **Alert List** and **Test Table** Widgets. * For the **Alert List** widget, you can sort by `alertStatus` or `startTime`. The default is `alertStatus`. * For the **Test Table** widget, you can sort by `alertStatus`, `testName`, or `testType`. The sequence might vary from the web application. The default sort attribute is `alertStatus`. - :type sort: str - :param order: Optional sorting order parameter that accepts either `asc` (ascending) or `desc` (descending) values. This only applies to the **Alert List** and **Test Table** Widgets. - :type order: DashboardOrder :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1244,17 +1188,9 @@ def get_dashboard_widget_data_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_dashboard_widget_data_serialize( + _param = self._delete_dashboard_schedule_serialize( dashboard_id=dashboard_id, - widget_id=widget_id, aid=aid, - window=window, - start_date=start_date, - end_date=end_date, - max=max, - cursor=cursor, - sort=sort, - order=order, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1262,11 +1198,12 @@ def get_dashboard_widget_data_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiWidgetDataResponse", + '204': None, '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", + '409': "Error", '429': "Error", '500': "Error", } @@ -1277,18 +1214,10 @@ def get_dashboard_widget_data_without_preload_content( return response_data.response - def _get_dashboard_widget_data_serialize( + def _delete_dashboard_schedule_serialize( self, dashboard_id, - widget_id, aid, - window, - start_date, - end_date, - max, - cursor, - sort, - order, _request_auth, _content_type, _headers, @@ -1310,59 +1239,11 @@ def _get_dashboard_widget_data_serialize( # process the path parameters if dashboard_id is not None: _path_params['dashboardId'] = dashboard_id - if widget_id is not None: - _path_params['widgetId'] = widget_id # process the query parameters if aid is not None: _query_params.append(('aid', aid)) - if window is not None: - - _query_params.append(('window', window)) - - if start_date is not None: - if isinstance(start_date, datetime): - _query_params.append( - ( - 'startDate', - start_date.strftime( - self.api_client.configuration.datetime_format - ) - ) - ) - else: - _query_params.append(('startDate', start_date)) - - if end_date is not None: - if isinstance(end_date, datetime): - _query_params.append( - ( - 'endDate', - end_date.strftime( - self.api_client.configuration.datetime_format - ) - ) - ) - else: - _query_params.append(('endDate', end_date)) - - if max is not None: - - _query_params.append(('max', max)) - - if cursor is not None: - - _query_params.append(('cursor', cursor)) - - if sort is not None: - - _query_params.append(('sort', sort)) - - if order is not None: - - _query_params.append(('order', order.value)) - # process the header parameters # process the form parameters # process the body parameter @@ -1371,7 +1252,6 @@ def _get_dashboard_widget_data_serialize( # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ - 'application/hal+json', 'application/json', 'application/problem+json' ] @@ -1384,8 +1264,8 @@ def _get_dashboard_widget_data_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/dashboards/{dashboardId}/widgets/{widgetId}', + method='DELETE', + resource_path='/dashboards/{dashboardId}/actions/schedule', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1402,8 +1282,9 @@ def _get_dashboard_widget_data_serialize( @validate_call - def get_dashboards( + def get_dashboard( self, + dashboard_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint.")], aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, _request_timeout: Union[ None, @@ -1417,11 +1298,13 @@ def get_dashboards( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[ApiDashboard]: - """List dashboards + ) -> ApiDashboard: + """Retrieve dashboard - Returns a list of dashboards and their settings within your account group. + Returns a list of widgets within a dashboard, along with the dashboard's metadata. + :param dashboard_id: A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. (required) + :type dashboard_id: str :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. :type aid: str :param _request_timeout: timeout setting for this request. If one @@ -1446,7 +1329,8 @@ def get_dashboards( :return: Returns the result object. """ # noqa: E501 - _param = self._get_dashboards_serialize( + _param = self._get_dashboard_serialize( + dashboard_id=dashboard_id, aid=aid, _request_auth=_request_auth, _content_type=_content_type, @@ -1455,7 +1339,7 @@ def get_dashboards( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ApiDashboard]", + '200': "ApiDashboard", '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", @@ -1476,8 +1360,9 @@ def get_dashboards( @validate_call - def get_dashboards_with_http_info( + def get_dashboard_with_http_info( self, + dashboard_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint.")], aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, _request_timeout: Union[ None, @@ -1491,11 +1376,13 @@ def get_dashboards_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[ApiDashboard]]: - """List dashboards + ) -> ApiResponse[ApiDashboard]: + """Retrieve dashboard - Returns a list of dashboards and their settings within your account group. + Returns a list of widgets within a dashboard, along with the dashboard's metadata. + :param dashboard_id: A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. (required) + :type dashboard_id: str :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. :type aid: str :param _request_timeout: timeout setting for this request. If one @@ -1520,7 +1407,8 @@ def get_dashboards_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_dashboards_serialize( + _param = self._get_dashboard_serialize( + dashboard_id=dashboard_id, aid=aid, _request_auth=_request_auth, _content_type=_content_type, @@ -1529,7 +1417,7 @@ def get_dashboards_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ApiDashboard]", + '200': "ApiDashboard", '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", @@ -1550,8 +1438,9 @@ def get_dashboards_with_http_info( @validate_call - def get_dashboards_without_preload_content( + def get_dashboard_without_preload_content( self, + dashboard_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint.")], aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, _request_timeout: Union[ None, @@ -1566,10 +1455,12 @@ def get_dashboards_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List dashboards + """Retrieve dashboard - Returns a list of dashboards and their settings within your account group. + Returns a list of widgets within a dashboard, along with the dashboard's metadata. + :param dashboard_id: A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. (required) + :type dashboard_id: str :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. :type aid: str :param _request_timeout: timeout setting for this request. If one @@ -1594,7 +1485,8 @@ def get_dashboards_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_dashboards_serialize( + _param = self._get_dashboard_serialize( + dashboard_id=dashboard_id, aid=aid, _request_auth=_request_auth, _content_type=_content_type, @@ -1603,7 +1495,7 @@ def get_dashboards_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ApiDashboard]", + '200': "ApiDashboard", '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", @@ -1618,8 +1510,9 @@ def get_dashboards_without_preload_content( return response_data.response - def _get_dashboards_serialize( + def _get_dashboard_serialize( self, + dashboard_id, aid, _request_auth, _content_type, @@ -1640,6 +1533,8 @@ def _get_dashboards_serialize( _body_params: Optional[bytes] = None # process the path parameters + if dashboard_id is not None: + _path_params['dashboardId'] = dashboard_id # process the query parameters if aid is not None: @@ -1667,7 +1562,7 @@ def _get_dashboards_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/dashboards', + resource_path='/dashboards/{dashboardId}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1684,15 +1579,18 @@ def _get_dashboards_serialize( @validate_call - def get_individual_card_data( + def get_dashboard_widget_data( self, dashboard_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint.")], widget_id: Annotated[StrictStr, Field(description="A Identifier for a widget.")], - card_id: Annotated[StrictStr, Field(description="An identifier for a card within the numbers widget.")], aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None, start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + max: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Optionally specify the maximum number of objects to retrieve. This only applies to the **Alert List** and **Test Table** Widgets. * The default for the **Alert List** widget is set by its limitBy configuration. * The default value for the **Test Table** widget is 10.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="An optional pagination cursor. This parameter should not not be used directly. Instead, use the `_links` returned by the API. This feature is only available in the **Test Table** widget.")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Optional sorting parameter with attributes listed comma-separated. This only applies to the **Alert List** and **Test Table** Widgets. * For the **Alert List** widget, you can sort by `alertStatus` or `startTime`. The default is `alertStatus`. * For the **Test Table** widget, you can sort by `alertStatus`, `testName`, or `testType`. The sequence might vary from the web application. The default sort attribute is `alertStatus`.")] = None, + order: Annotated[Optional[DashboardOrder], Field(description="Optional sorting order parameter that accepts either `asc` (ascending) or `desc` (descending) values. This only applies to the **Alert List** and **Test Table** Widgets.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1705,17 +1603,15 @@ def get_individual_card_data( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiNumbersCardData: - """Retrieve individual card data from numbers widget + ) -> ApiWidgetDataResponse: + """Retrieve dashboard widget data - Returns the raw data for an individual card within a numbers widget in the dashboard. + Returns the raw data displayed within a widget in the dashboard. :param dashboard_id: A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. (required) :type dashboard_id: str :param widget_id: A Identifier for a widget. (required) :type widget_id: str - :param card_id: An identifier for a card within the numbers widget. (required) - :type card_id: str :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. :type aid: str :param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. @@ -1724,6 +1620,14 @@ def get_individual_card_data( :type start_date: datetime :param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. :type end_date: datetime + :param max: Optionally specify the maximum number of objects to retrieve. This only applies to the **Alert List** and **Test Table** Widgets. * The default for the **Alert List** widget is set by its limitBy configuration. * The default value for the **Test Table** widget is 10. + :type max: float + :param cursor: An optional pagination cursor. This parameter should not not be used directly. Instead, use the `_links` returned by the API. This feature is only available in the **Test Table** widget. + :type cursor: str + :param sort: Optional sorting parameter with attributes listed comma-separated. This only applies to the **Alert List** and **Test Table** Widgets. * For the **Alert List** widget, you can sort by `alertStatus` or `startTime`. The default is `alertStatus`. * For the **Test Table** widget, you can sort by `alertStatus`, `testName`, or `testType`. The sequence might vary from the web application. The default sort attribute is `alertStatus`. + :type sort: str + :param order: Optional sorting order parameter that accepts either `asc` (ascending) or `desc` (descending) values. This only applies to the **Alert List** and **Test Table** Widgets. + :type order: DashboardOrder :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1746,10 +1650,1128 @@ def get_individual_card_data( :return: Returns the result object. """ # noqa: E501 - _param = self._get_individual_card_data_serialize( + _param = self._get_dashboard_widget_data_serialize( dashboard_id=dashboard_id, widget_id=widget_id, - card_id=card_id, + aid=aid, + window=window, + start_date=start_date, + end_date=end_date, + max=max, + cursor=cursor, + sort=sort, + order=order, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiWidgetDataResponse", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.dashboards.models, + ).data + + + @validate_call + def get_dashboard_widget_data_with_http_info( + self, + dashboard_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint.")], + widget_id: Annotated[StrictStr, Field(description="A Identifier for a widget.")], + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None, + start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + max: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Optionally specify the maximum number of objects to retrieve. This only applies to the **Alert List** and **Test Table** Widgets. * The default for the **Alert List** widget is set by its limitBy configuration. * The default value for the **Test Table** widget is 10.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="An optional pagination cursor. This parameter should not not be used directly. Instead, use the `_links` returned by the API. This feature is only available in the **Test Table** widget.")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Optional sorting parameter with attributes listed comma-separated. This only applies to the **Alert List** and **Test Table** Widgets. * For the **Alert List** widget, you can sort by `alertStatus` or `startTime`. The default is `alertStatus`. * For the **Test Table** widget, you can sort by `alertStatus`, `testName`, or `testType`. The sequence might vary from the web application. The default sort attribute is `alertStatus`.")] = None, + order: Annotated[Optional[DashboardOrder], Field(description="Optional sorting order parameter that accepts either `asc` (ascending) or `desc` (descending) values. This only applies to the **Alert List** and **Test Table** Widgets.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApiWidgetDataResponse]: + """Retrieve dashboard widget data + + Returns the raw data displayed within a widget in the dashboard. + + :param dashboard_id: A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. (required) + :type dashboard_id: str + :param widget_id: A Identifier for a widget. (required) + :type widget_id: str + :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + :type aid: str + :param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. + :type window: str + :param start_date: Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type start_date: datetime + :param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type end_date: datetime + :param max: Optionally specify the maximum number of objects to retrieve. This only applies to the **Alert List** and **Test Table** Widgets. * The default for the **Alert List** widget is set by its limitBy configuration. * The default value for the **Test Table** widget is 10. + :type max: float + :param cursor: An optional pagination cursor. This parameter should not not be used directly. Instead, use the `_links` returned by the API. This feature is only available in the **Test Table** widget. + :type cursor: str + :param sort: Optional sorting parameter with attributes listed comma-separated. This only applies to the **Alert List** and **Test Table** Widgets. * For the **Alert List** widget, you can sort by `alertStatus` or `startTime`. The default is `alertStatus`. * For the **Test Table** widget, you can sort by `alertStatus`, `testName`, or `testType`. The sequence might vary from the web application. The default sort attribute is `alertStatus`. + :type sort: str + :param order: Optional sorting order parameter that accepts either `asc` (ascending) or `desc` (descending) values. This only applies to the **Alert List** and **Test Table** Widgets. + :type order: DashboardOrder + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_dashboard_widget_data_serialize( + dashboard_id=dashboard_id, + widget_id=widget_id, + aid=aid, + window=window, + start_date=start_date, + end_date=end_date, + max=max, + cursor=cursor, + sort=sort, + order=order, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiWidgetDataResponse", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.dashboards.models, + ) + + + @validate_call + def get_dashboard_widget_data_without_preload_content( + self, + dashboard_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint.")], + widget_id: Annotated[StrictStr, Field(description="A Identifier for a widget.")], + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None, + start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + max: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Optionally specify the maximum number of objects to retrieve. This only applies to the **Alert List** and **Test Table** Widgets. * The default for the **Alert List** widget is set by its limitBy configuration. * The default value for the **Test Table** widget is 10.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="An optional pagination cursor. This parameter should not not be used directly. Instead, use the `_links` returned by the API. This feature is only available in the **Test Table** widget.")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Optional sorting parameter with attributes listed comma-separated. This only applies to the **Alert List** and **Test Table** Widgets. * For the **Alert List** widget, you can sort by `alertStatus` or `startTime`. The default is `alertStatus`. * For the **Test Table** widget, you can sort by `alertStatus`, `testName`, or `testType`. The sequence might vary from the web application. The default sort attribute is `alertStatus`.")] = None, + order: Annotated[Optional[DashboardOrder], Field(description="Optional sorting order parameter that accepts either `asc` (ascending) or `desc` (descending) values. This only applies to the **Alert List** and **Test Table** Widgets.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Retrieve dashboard widget data + + Returns the raw data displayed within a widget in the dashboard. + + :param dashboard_id: A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. (required) + :type dashboard_id: str + :param widget_id: A Identifier for a widget. (required) + :type widget_id: str + :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + :type aid: str + :param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. + :type window: str + :param start_date: Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type start_date: datetime + :param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type end_date: datetime + :param max: Optionally specify the maximum number of objects to retrieve. This only applies to the **Alert List** and **Test Table** Widgets. * The default for the **Alert List** widget is set by its limitBy configuration. * The default value for the **Test Table** widget is 10. + :type max: float + :param cursor: An optional pagination cursor. This parameter should not not be used directly. Instead, use the `_links` returned by the API. This feature is only available in the **Test Table** widget. + :type cursor: str + :param sort: Optional sorting parameter with attributes listed comma-separated. This only applies to the **Alert List** and **Test Table** Widgets. * For the **Alert List** widget, you can sort by `alertStatus` or `startTime`. The default is `alertStatus`. * For the **Test Table** widget, you can sort by `alertStatus`, `testName`, or `testType`. The sequence might vary from the web application. The default sort attribute is `alertStatus`. + :type sort: str + :param order: Optional sorting order parameter that accepts either `asc` (ascending) or `desc` (descending) values. This only applies to the **Alert List** and **Test Table** Widgets. + :type order: DashboardOrder + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_dashboard_widget_data_serialize( + dashboard_id=dashboard_id, + widget_id=widget_id, + aid=aid, + window=window, + start_date=start_date, + end_date=end_date, + max=max, + cursor=cursor, + sort=sort, + order=order, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiWidgetDataResponse", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_dashboard_widget_data_serialize( + self, + dashboard_id, + widget_id, + aid, + window, + start_date, + end_date, + max, + cursor, + sort, + order, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if dashboard_id is not None: + _path_params['dashboardId'] = dashboard_id + if widget_id is not None: + _path_params['widgetId'] = widget_id + # process the query parameters + if aid is not None: + + _query_params.append(('aid', aid)) + + if window is not None: + + _query_params.append(('window', window)) + + if start_date is not None: + if isinstance(start_date, datetime): + _query_params.append( + ( + 'startDate', + start_date.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('startDate', start_date)) + + if end_date is not None: + if isinstance(end_date, datetime): + _query_params.append( + ( + 'endDate', + end_date.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('endDate', end_date)) + + if max is not None: + + _query_params.append(('max', max)) + + if cursor is not None: + + _query_params.append(('cursor', cursor)) + + if sort is not None: + + _query_params.append(('sort', sort)) + + if order is not None: + + _query_params.append(('order', order.value)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/hal+json', + 'application/json', + 'application/problem+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/dashboards/{dashboardId}/widgets/{widgetId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_dashboards( + self, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[ApiDashboard]: + """List dashboards + + Returns a list of dashboards and their settings within your account group. + + :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + :type aid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_dashboards_serialize( + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ApiDashboard]", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.dashboards.models, + ).data + + + @validate_call + def get_dashboards_with_http_info( + self, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[ApiDashboard]]: + """List dashboards + + Returns a list of dashboards and their settings within your account group. + + :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + :type aid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_dashboards_serialize( + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ApiDashboard]", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.dashboards.models, + ) + + + @validate_call + def get_dashboards_without_preload_content( + self, + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List dashboards + + Returns a list of dashboards and their settings within your account group. + + :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + :type aid: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_dashboards_serialize( + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[ApiDashboard]", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_dashboards_serialize( + self, + aid, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if aid is not None: + + _query_params.append(('aid', aid)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/hal+json', + 'application/json', + 'application/problem+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/dashboards', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_individual_card_data( + self, + dashboard_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint.")], + widget_id: Annotated[StrictStr, Field(description="A Identifier for a widget.")], + card_id: Annotated[StrictStr, Field(description="An identifier for a card within the numbers widget.")], + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None, + start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiNumbersCardData: + """Retrieve individual card data from numbers widget + + Returns the raw data for an individual card within a numbers widget in the dashboard. + + :param dashboard_id: A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. (required) + :type dashboard_id: str + :param widget_id: A Identifier for a widget. (required) + :type widget_id: str + :param card_id: An identifier for a card within the numbers widget. (required) + :type card_id: str + :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + :type aid: str + :param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. + :type window: str + :param start_date: Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type start_date: datetime + :param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type end_date: datetime + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_individual_card_data_serialize( + dashboard_id=dashboard_id, + widget_id=widget_id, + card_id=card_id, + aid=aid, + window=window, + start_date=start_date, + end_date=end_date, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiNumbersCardData", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.dashboards.models, + ).data + + + @validate_call + def get_individual_card_data_with_http_info( + self, + dashboard_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint.")], + widget_id: Annotated[StrictStr, Field(description="A Identifier for a widget.")], + card_id: Annotated[StrictStr, Field(description="An identifier for a card within the numbers widget.")], + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None, + start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ApiNumbersCardData]: + """Retrieve individual card data from numbers widget + + Returns the raw data for an individual card within a numbers widget in the dashboard. + + :param dashboard_id: A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. (required) + :type dashboard_id: str + :param widget_id: A Identifier for a widget. (required) + :type widget_id: str + :param card_id: An identifier for a card within the numbers widget. (required) + :type card_id: str + :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + :type aid: str + :param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. + :type window: str + :param start_date: Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type start_date: datetime + :param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type end_date: datetime + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_individual_card_data_serialize( + dashboard_id=dashboard_id, + widget_id=widget_id, + card_id=card_id, + aid=aid, + window=window, + start_date=start_date, + end_date=end_date, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiNumbersCardData", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + models=thousandeyes_sdk.dashboards.models, + ) + + + @validate_call + def get_individual_card_data_without_preload_content( + self, + dashboard_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint.")], + widget_id: Annotated[StrictStr, Field(description="A Identifier for a widget.")], + card_id: Annotated[StrictStr, Field(description="An identifier for a card within the numbers widget.")], + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None, + start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Retrieve individual card data from numbers widget + + Returns the raw data for an individual card within a numbers widget in the dashboard. + + :param dashboard_id: A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. (required) + :type dashboard_id: str + :param widget_id: A Identifier for a widget. (required) + :type widget_id: str + :param card_id: An identifier for a card within the numbers widget. (required) + :type card_id: str + :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + :type aid: str + :param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. + :type window: str + :param start_date: Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type start_date: datetime + :param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type end_date: datetime + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_individual_card_data_serialize( + dashboard_id=dashboard_id, + widget_id=widget_id, + card_id=card_id, + aid=aid, + window=window, + start_date=start_date, + end_date=end_date, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiNumbersCardData", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_individual_card_data_serialize( + self, + dashboard_id, + widget_id, + card_id, + aid, + window, + start_date, + end_date, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if dashboard_id is not None: + _path_params['dashboardId'] = dashboard_id + if widget_id is not None: + _path_params['widgetId'] = widget_id + if card_id is not None: + _path_params['cardId'] = card_id + # process the query parameters + if aid is not None: + + _query_params.append(('aid', aid)) + + if window is not None: + + _query_params.append(('window', window)) + + if start_date is not None: + if isinstance(start_date, datetime): + _query_params.append( + ( + 'startDate', + start_date.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('startDate', start_date)) + + if end_date is not None: + if isinstance(end_date, datetime): + _query_params.append( + ( + 'endDate', + end_date.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('endDate', end_date)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/hal+json', + 'application/json', + 'application/problem+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/dashboards/{dashboardId}/widgets/{widgetId}/cards/{cardId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_individual_column_data( + self, + dashboard_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint.")], + widget_id: Annotated[StrictStr, Field(description="A Identifier for a widget.")], + column_id: Annotated[StrictStr, Field(description="An identifier for a column within the multi-metric table widget.")], + aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, + window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None, + start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiMultiMetricColumnData: + """Retrieve individual column data from multi-metric table widget + + Returns the raw data for an individual column within a multi-metric table widget in the dashboard. + + :param dashboard_id: A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. (required) + :type dashboard_id: str + :param widget_id: A Identifier for a widget. (required) + :type widget_id: str + :param column_id: An identifier for a column within the multi-metric table widget. (required) + :type column_id: str + :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. + :type aid: str + :param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. + :type window: str + :param start_date: Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type start_date: datetime + :param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. + :type end_date: datetime + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_individual_column_data_serialize( + dashboard_id=dashboard_id, + widget_id=widget_id, + column_id=column_id, aid=aid, window=window, start_date=start_date, @@ -1761,7 +2783,7 @@ def get_individual_card_data( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiNumbersCardData", + '200': "ApiMultiMetricColumnData", '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", @@ -1782,11 +2804,11 @@ def get_individual_card_data( @validate_call - def get_individual_card_data_with_http_info( + def get_individual_column_data_with_http_info( self, dashboard_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint.")], widget_id: Annotated[StrictStr, Field(description="A Identifier for a widget.")], - card_id: Annotated[StrictStr, Field(description="An identifier for a card within the numbers widget.")], + column_id: Annotated[StrictStr, Field(description="An identifier for a column within the multi-metric table widget.")], aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None, start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, @@ -1803,17 +2825,17 @@ def get_individual_card_data_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ApiNumbersCardData]: - """Retrieve individual card data from numbers widget + ) -> ApiResponse[ApiMultiMetricColumnData]: + """Retrieve individual column data from multi-metric table widget - Returns the raw data for an individual card within a numbers widget in the dashboard. + Returns the raw data for an individual column within a multi-metric table widget in the dashboard. :param dashboard_id: A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. (required) :type dashboard_id: str :param widget_id: A Identifier for a widget. (required) :type widget_id: str - :param card_id: An identifier for a card within the numbers widget. (required) - :type card_id: str + :param column_id: An identifier for a column within the multi-metric table widget. (required) + :type column_id: str :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. :type aid: str :param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. @@ -1844,10 +2866,10 @@ def get_individual_card_data_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_individual_card_data_serialize( + _param = self._get_individual_column_data_serialize( dashboard_id=dashboard_id, widget_id=widget_id, - card_id=card_id, + column_id=column_id, aid=aid, window=window, start_date=start_date, @@ -1859,7 +2881,7 @@ def get_individual_card_data_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiNumbersCardData", + '200': "ApiMultiMetricColumnData", '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", @@ -1880,11 +2902,11 @@ def get_individual_card_data_with_http_info( @validate_call - def get_individual_card_data_without_preload_content( + def get_individual_column_data_without_preload_content( self, dashboard_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint.")], widget_id: Annotated[StrictStr, Field(description="A Identifier for a widget.")], - card_id: Annotated[StrictStr, Field(description="An identifier for a card within the numbers widget.")], + column_id: Annotated[StrictStr, Field(description="An identifier for a column within the multi-metric table widget.")], aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None, start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, @@ -1902,16 +2924,16 @@ def get_individual_card_data_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Retrieve individual card data from numbers widget + """Retrieve individual column data from multi-metric table widget - Returns the raw data for an individual card within a numbers widget in the dashboard. + Returns the raw data for an individual column within a multi-metric table widget in the dashboard. :param dashboard_id: A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. (required) :type dashboard_id: str :param widget_id: A Identifier for a widget. (required) :type widget_id: str - :param card_id: An identifier for a card within the numbers widget. (required) - :type card_id: str + :param column_id: An identifier for a column within the multi-metric table widget. (required) + :type column_id: str :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. :type aid: str :param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. @@ -1942,10 +2964,10 @@ def get_individual_card_data_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_individual_card_data_serialize( + _param = self._get_individual_column_data_serialize( dashboard_id=dashboard_id, widget_id=widget_id, - card_id=card_id, + column_id=column_id, aid=aid, window=window, start_date=start_date, @@ -1957,7 +2979,7 @@ def get_individual_card_data_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiNumbersCardData", + '200': "ApiMultiMetricColumnData", '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", @@ -1972,11 +2994,11 @@ def get_individual_card_data_without_preload_content( return response_data.response - def _get_individual_card_data_serialize( + def _get_individual_column_data_serialize( self, dashboard_id, widget_id, - card_id, + column_id, aid, window, start_date, @@ -2004,8 +3026,8 @@ def _get_individual_card_data_serialize( _path_params['dashboardId'] = dashboard_id if widget_id is not None: _path_params['widgetId'] = widget_id - if card_id is not None: - _path_params['cardId'] = card_id + if column_id is not None: + _path_params['columnId'] = column_id # process the query parameters if aid is not None: @@ -2063,7 +3085,7 @@ def _get_individual_card_data_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/dashboards/{dashboardId}/widgets/{widgetId}/cards/{cardId}', + resource_path='/dashboards/{dashboardId}/widgets/{widgetId}/columns/{columnId}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2080,15 +3102,11 @@ def _get_individual_card_data_serialize( @validate_call - def get_individual_column_data( + def update_dashboard( self, dashboard_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint.")], - widget_id: Annotated[StrictStr, Field(description="A Identifier for a widget.")], - column_id: Annotated[StrictStr, Field(description="An identifier for a column within the multi-metric table widget.")], + dashboard: Annotated[Dashboard, Field(description="Request body schema to update a dashboard.")], aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, - window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None, - start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, - end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2101,25 +3119,17 @@ def get_individual_column_data( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiMultiMetricColumnData: - """Retrieve individual column data from multi-metric table widget + ) -> Dashboard: + """Update dashboard - Returns the raw data for an individual column within a multi-metric table widget in the dashboard. + Updates an existing dashboard in your account group. **Note**: * Users with the `Edit dashboard templates for all users in account group` permission (Account Admin) can update any dashboard. * Users with the `Edit own dashboard templates` permission (Regular User) can only update the dashboards they have created themselves. :param dashboard_id: A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. (required) :type dashboard_id: str - :param widget_id: A Identifier for a widget. (required) - :type widget_id: str - :param column_id: An identifier for a column within the multi-metric table widget. (required) - :type column_id: str + :param dashboard: Request body schema to update a dashboard. (required) + :type dashboard: Dashboard :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. :type aid: str - :param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. - :type window: str - :param start_date: Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. - :type start_date: datetime - :param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. - :type end_date: datetime :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2142,14 +3152,10 @@ def get_individual_column_data( :return: Returns the result object. """ # noqa: E501 - _param = self._get_individual_column_data_serialize( + _param = self._update_dashboard_serialize( dashboard_id=dashboard_id, - widget_id=widget_id, - column_id=column_id, + dashboard=dashboard, aid=aid, - window=window, - start_date=start_date, - end_date=end_date, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2157,7 +3163,7 @@ def get_individual_column_data( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiMultiMetricColumnData", + '200': "Dashboard", '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", @@ -2178,15 +3184,11 @@ def get_individual_column_data( @validate_call - def get_individual_column_data_with_http_info( + def update_dashboard_with_http_info( self, dashboard_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint.")], - widget_id: Annotated[StrictStr, Field(description="A Identifier for a widget.")], - column_id: Annotated[StrictStr, Field(description="An identifier for a column within the multi-metric table widget.")], + dashboard: Annotated[Dashboard, Field(description="Request body schema to update a dashboard.")], aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, - window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None, - start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, - end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2199,25 +3201,17 @@ def get_individual_column_data_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ApiMultiMetricColumnData]: - """Retrieve individual column data from multi-metric table widget + ) -> ApiResponse[Dashboard]: + """Update dashboard - Returns the raw data for an individual column within a multi-metric table widget in the dashboard. + Updates an existing dashboard in your account group. **Note**: * Users with the `Edit dashboard templates for all users in account group` permission (Account Admin) can update any dashboard. * Users with the `Edit own dashboard templates` permission (Regular User) can only update the dashboards they have created themselves. :param dashboard_id: A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. (required) :type dashboard_id: str - :param widget_id: A Identifier for a widget. (required) - :type widget_id: str - :param column_id: An identifier for a column within the multi-metric table widget. (required) - :type column_id: str + :param dashboard: Request body schema to update a dashboard. (required) + :type dashboard: Dashboard :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. :type aid: str - :param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. - :type window: str - :param start_date: Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. - :type start_date: datetime - :param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. - :type end_date: datetime :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2240,14 +3234,10 @@ def get_individual_column_data_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_individual_column_data_serialize( + _param = self._update_dashboard_serialize( dashboard_id=dashboard_id, - widget_id=widget_id, - column_id=column_id, + dashboard=dashboard, aid=aid, - window=window, - start_date=start_date, - end_date=end_date, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2255,7 +3245,7 @@ def get_individual_column_data_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiMultiMetricColumnData", + '200': "Dashboard", '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", @@ -2276,15 +3266,11 @@ def get_individual_column_data_with_http_info( @validate_call - def get_individual_column_data_without_preload_content( + def update_dashboard_without_preload_content( self, dashboard_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint.")], - widget_id: Annotated[StrictStr, Field(description="A Identifier for a widget.")], - column_id: Annotated[StrictStr, Field(description="An identifier for a column within the multi-metric table widget.")], + dashboard: Annotated[Dashboard, Field(description="Request body schema to update a dashboard.")], aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, - window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None, - start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, - end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2298,24 +3284,16 @@ def get_individual_column_data_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Retrieve individual column data from multi-metric table widget + """Update dashboard - Returns the raw data for an individual column within a multi-metric table widget in the dashboard. + Updates an existing dashboard in your account group. **Note**: * Users with the `Edit dashboard templates for all users in account group` permission (Account Admin) can update any dashboard. * Users with the `Edit own dashboard templates` permission (Regular User) can only update the dashboards they have created themselves. :param dashboard_id: A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. (required) :type dashboard_id: str - :param widget_id: A Identifier for a widget. (required) - :type widget_id: str - :param column_id: An identifier for a column within the multi-metric table widget. (required) - :type column_id: str + :param dashboard: Request body schema to update a dashboard. (required) + :type dashboard: Dashboard :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. :type aid: str - :param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. - :type window: str - :param start_date: Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. - :type start_date: datetime - :param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. - :type end_date: datetime :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2338,14 +3316,10 @@ def get_individual_column_data_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_individual_column_data_serialize( + _param = self._update_dashboard_serialize( dashboard_id=dashboard_id, - widget_id=widget_id, - column_id=column_id, + dashboard=dashboard, aid=aid, - window=window, - start_date=start_date, - end_date=end_date, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2353,7 +3327,7 @@ def get_individual_column_data_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiMultiMetricColumnData", + '200': "Dashboard", '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", @@ -2368,15 +3342,11 @@ def get_individual_column_data_without_preload_content( return response_data.response - def _get_individual_column_data_serialize( + def _update_dashboard_serialize( self, dashboard_id, - widget_id, - column_id, + dashboard, aid, - window, - start_date, - end_date, _request_auth, _content_type, _headers, @@ -2398,48 +3368,16 @@ def _get_individual_column_data_serialize( # process the path parameters if dashboard_id is not None: _path_params['dashboardId'] = dashboard_id - if widget_id is not None: - _path_params['widgetId'] = widget_id - if column_id is not None: - _path_params['columnId'] = column_id # process the query parameters if aid is not None: _query_params.append(('aid', aid)) - if window is not None: - - _query_params.append(('window', window)) - - if start_date is not None: - if isinstance(start_date, datetime): - _query_params.append( - ( - 'startDate', - start_date.strftime( - self.api_client.configuration.datetime_format - ) - ) - ) - else: - _query_params.append(('startDate', start_date)) - - if end_date is not None: - if isinstance(end_date, datetime): - _query_params.append( - ( - 'endDate', - end_date.strftime( - self.api_client.configuration.datetime_format - ) - ) - ) - else: - _query_params.append(('endDate', end_date)) - # process the header parameters # process the form parameters # process the body parameter + if dashboard is not None: + _body_params = dashboard # set the HTTP header `Accept` @@ -2451,6 +3389,19 @@ def _get_individual_column_data_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -2458,8 +3409,8 @@ def _get_individual_column_data_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/dashboards/{dashboardId}/widgets/{widgetId}/columns/{columnId}', + method='PUT', + resource_path='/dashboards/{dashboardId}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2476,10 +3427,10 @@ def _get_individual_column_data_serialize( @validate_call - def update_dashboard( + def update_dashboard_schedule( self, dashboard_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint.")], - dashboard: Annotated[Dashboard, Field(description="Request body schema to update a dashboard.")], + dashboard_schedule_request: Annotated[DashboardScheduleRequest, Field(description="Snapshot schedule configuration.")], aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, _request_timeout: Union[ None, @@ -2493,15 +3444,15 @@ def update_dashboard( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Dashboard: - """Update dashboard + ) -> ApiDashboard: + """Create or update dashboard snapshot schedule - Updates an existing dashboard in your account group. **Note**: * Users with the `Edit dashboard templates for all users in account group` permission (Account Admin) can update any dashboard. * Users with the `Edit own dashboard templates` permission (Regular User) can only update the dashboards they have created themselves. + Creates or replaces the snapshot schedule for a dashboard. Set `repeat` to `NONE` to generate one snapshot at `startTime`. Other `repeat` values create recurring snapshots. Schedule settings control when snapshots are generated, the data time range included in each snapshot, and email delivery options. :param dashboard_id: A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. (required) :type dashboard_id: str - :param dashboard: Request body schema to update a dashboard. (required) - :type dashboard: Dashboard + :param dashboard_schedule_request: Snapshot schedule configuration. (required) + :type dashboard_schedule_request: DashboardScheduleRequest :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. :type aid: str :param _request_timeout: timeout setting for this request. If one @@ -2526,9 +3477,9 @@ def update_dashboard( :return: Returns the result object. """ # noqa: E501 - _param = self._update_dashboard_serialize( + _param = self._update_dashboard_schedule_serialize( dashboard_id=dashboard_id, - dashboard=dashboard, + dashboard_schedule_request=dashboard_schedule_request, aid=aid, _request_auth=_request_auth, _content_type=_content_type, @@ -2537,11 +3488,12 @@ def update_dashboard( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Dashboard", + '200': "ApiDashboard", '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", + '409': "Error", '429': "Error", '500': "Error", } @@ -2558,10 +3510,10 @@ def update_dashboard( @validate_call - def update_dashboard_with_http_info( + def update_dashboard_schedule_with_http_info( self, dashboard_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint.")], - dashboard: Annotated[Dashboard, Field(description="Request body schema to update a dashboard.")], + dashboard_schedule_request: Annotated[DashboardScheduleRequest, Field(description="Snapshot schedule configuration.")], aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, _request_timeout: Union[ None, @@ -2575,15 +3527,15 @@ def update_dashboard_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Dashboard]: - """Update dashboard + ) -> ApiResponse[ApiDashboard]: + """Create or update dashboard snapshot schedule - Updates an existing dashboard in your account group. **Note**: * Users with the `Edit dashboard templates for all users in account group` permission (Account Admin) can update any dashboard. * Users with the `Edit own dashboard templates` permission (Regular User) can only update the dashboards they have created themselves. + Creates or replaces the snapshot schedule for a dashboard. Set `repeat` to `NONE` to generate one snapshot at `startTime`. Other `repeat` values create recurring snapshots. Schedule settings control when snapshots are generated, the data time range included in each snapshot, and email delivery options. :param dashboard_id: A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. (required) :type dashboard_id: str - :param dashboard: Request body schema to update a dashboard. (required) - :type dashboard: Dashboard + :param dashboard_schedule_request: Snapshot schedule configuration. (required) + :type dashboard_schedule_request: DashboardScheduleRequest :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. :type aid: str :param _request_timeout: timeout setting for this request. If one @@ -2608,9 +3560,9 @@ def update_dashboard_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._update_dashboard_serialize( + _param = self._update_dashboard_schedule_serialize( dashboard_id=dashboard_id, - dashboard=dashboard, + dashboard_schedule_request=dashboard_schedule_request, aid=aid, _request_auth=_request_auth, _content_type=_content_type, @@ -2619,11 +3571,12 @@ def update_dashboard_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Dashboard", + '200': "ApiDashboard", '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", + '409': "Error", '429': "Error", '500': "Error", } @@ -2640,10 +3593,10 @@ def update_dashboard_with_http_info( @validate_call - def update_dashboard_without_preload_content( + def update_dashboard_schedule_without_preload_content( self, dashboard_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint.")], - dashboard: Annotated[Dashboard, Field(description="Request body schema to update a dashboard.")], + dashboard_schedule_request: Annotated[DashboardScheduleRequest, Field(description="Snapshot schedule configuration.")], aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None, _request_timeout: Union[ None, @@ -2658,14 +3611,14 @@ def update_dashboard_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Update dashboard + """Create or update dashboard snapshot schedule - Updates an existing dashboard in your account group. **Note**: * Users with the `Edit dashboard templates for all users in account group` permission (Account Admin) can update any dashboard. * Users with the `Edit own dashboard templates` permission (Regular User) can only update the dashboards they have created themselves. + Creates or replaces the snapshot schedule for a dashboard. Set `repeat` to `NONE` to generate one snapshot at `startTime`. Other `repeat` values create recurring snapshots. Schedule settings control when snapshots are generated, the data time range included in each snapshot, and email delivery options. :param dashboard_id: A Identifier for a dashboard which can be obtained from the `/dashboards` endpoint. (required) :type dashboard_id: str - :param dashboard: Request body schema to update a dashboard. (required) - :type dashboard: Dashboard + :param dashboard_schedule_request: Snapshot schedule configuration. (required) + :type dashboard_schedule_request: DashboardScheduleRequest :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. :type aid: str :param _request_timeout: timeout setting for this request. If one @@ -2690,9 +3643,9 @@ def update_dashboard_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._update_dashboard_serialize( + _param = self._update_dashboard_schedule_serialize( dashboard_id=dashboard_id, - dashboard=dashboard, + dashboard_schedule_request=dashboard_schedule_request, aid=aid, _request_auth=_request_auth, _content_type=_content_type, @@ -2701,11 +3654,12 @@ def update_dashboard_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Dashboard", + '200': "ApiDashboard", '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", '404': "Error", + '409': "Error", '429': "Error", '500': "Error", } @@ -2716,10 +3670,10 @@ def update_dashboard_without_preload_content( return response_data.response - def _update_dashboard_serialize( + def _update_dashboard_schedule_serialize( self, dashboard_id, - dashboard, + dashboard_schedule_request, aid, _request_auth, _content_type, @@ -2750,8 +3704,8 @@ def _update_dashboard_serialize( # process the header parameters # process the form parameters # process the body parameter - if dashboard is not None: - _body_params = dashboard + if dashboard_schedule_request is not None: + _body_params = dashboard_schedule_request # set the HTTP header `Accept` @@ -2784,7 +3738,7 @@ def _update_dashboard_serialize( return self.api_client.param_serialize( method='PUT', - resource_path='/dashboards/{dashboardId}', + resource_path='/dashboards/{dashboardId}/actions/schedule', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/__init__.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/__init__.py index b2cf18d81..640b865d2 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/__init__.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/__init__.py @@ -81,6 +81,8 @@ from thousandeyes_sdk.dashboards.models.asw_repeat import AswRepeat from thousandeyes_sdk.dashboards.models.asw_repeat_unit import AswRepeatUnit from thousandeyes_sdk.dashboards.models.box_and_whiskers_datasource import BoxAndWhiskersDatasource +from thousandeyes_sdk.dashboards.models.clone_dashboard_refresh_rate import CloneDashboardRefreshRate +from thousandeyes_sdk.dashboards.models.clone_dashboard_request import CloneDashboardRequest from thousandeyes_sdk.dashboards.models.color_grid_datasource import ColorGridDatasource from thousandeyes_sdk.dashboards.models.dashboard import Dashboard from thousandeyes_sdk.dashboards.models.dashboard_global_filter_id import DashboardGlobalFilterId @@ -91,6 +93,26 @@ from thousandeyes_sdk.dashboards.models.dashboard_metric import DashboardMetric from thousandeyes_sdk.dashboards.models.dashboard_metric_direction import DashboardMetricDirection from thousandeyes_sdk.dashboards.models.dashboard_order import DashboardOrder +from thousandeyes_sdk.dashboards.models.dashboard_schedule import DashboardSchedule +from thousandeyes_sdk.dashboards.models.dashboard_schedule_after_end_condition import DashboardScheduleAfterEndCondition +from thousandeyes_sdk.dashboards.models.dashboard_schedule_cron_spec import DashboardScheduleCronSpec +from thousandeyes_sdk.dashboards.models.dashboard_schedule_custom_cron_spec import DashboardScheduleCustomCronSpec +from thousandeyes_sdk.dashboards.models.dashboard_schedule_custom_repeat import DashboardScheduleCustomRepeat +from thousandeyes_sdk.dashboards.models.dashboard_schedule_custom_repeat_not import DashboardScheduleCustomRepeatNot +from thousandeyes_sdk.dashboards.models.dashboard_schedule_custom_repeat_type import DashboardScheduleCustomRepeatType +from thousandeyes_sdk.dashboards.models.dashboard_schedule_custom_repeat_unit import DashboardScheduleCustomRepeatUnit +from thousandeyes_sdk.dashboards.models.dashboard_schedule_data_source import DashboardScheduleDataSource +from thousandeyes_sdk.dashboards.models.dashboard_schedule_date_end_condition import DashboardScheduleDateEndCondition +from thousandeyes_sdk.dashboards.models.dashboard_schedule_end_condition import DashboardScheduleEndCondition +from thousandeyes_sdk.dashboards.models.dashboard_schedule_never_end_condition import DashboardScheduleNeverEndCondition +from thousandeyes_sdk.dashboards.models.dashboard_schedule_non_custom_cron_spec import DashboardScheduleNonCustomCronSpec +from thousandeyes_sdk.dashboards.models.dashboard_schedule_non_custom_repeat import DashboardScheduleNonCustomRepeat +from thousandeyes_sdk.dashboards.models.dashboard_schedule_non_weekly_custom_repeat_unit import DashboardScheduleNonWeeklyCustomRepeatUnit +from thousandeyes_sdk.dashboards.models.dashboard_schedule_one_time_repeat_type import DashboardScheduleOneTimeRepeatType +from thousandeyes_sdk.dashboards.models.dashboard_schedule_repeat import DashboardScheduleRepeat +from thousandeyes_sdk.dashboards.models.dashboard_schedule_request import DashboardScheduleRequest +from thousandeyes_sdk.dashboards.models.dashboard_schedule_timespan import DashboardScheduleTimespan +from thousandeyes_sdk.dashboards.models.dashboard_schedule_timespan_period import DashboardScheduleTimespanPeriod from thousandeyes_sdk.dashboards.models.dashboard_snapshot_response import DashboardSnapshotResponse from thousandeyes_sdk.dashboards.models.dashboard_snapshots_page import DashboardSnapshotsPage from thousandeyes_sdk.dashboards.models.default_timespan import DefaultTimespan diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_dashboard.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_dashboard.py index 570514317..c5a828f35 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_dashboard.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_dashboard.py @@ -22,6 +22,7 @@ from thousandeyes_sdk.dashboards.models.api_widget import ApiWidget from thousandeyes_sdk.dashboards.models.dashboard_layout import DashboardLayout from thousandeyes_sdk.dashboards.models.dashboard_links import DashboardLinks +from thousandeyes_sdk.dashboards.models.dashboard_schedule import DashboardSchedule from thousandeyes_sdk.dashboards.models.default_timespan import DefaultTimespan from thousandeyes_sdk.dashboards.models.refresh_rate import RefreshRate from typing import Optional, Set @@ -55,9 +56,10 @@ class ApiDashboard(BaseModel): is_global_override: Optional[StrictBool] = Field(default=None, description="When set to `true`, the defaultTimespan is used and overrides the widget's timespan. If set to `false`, the the widget's timespan is used.", alias="isGlobalOverride") is_migrated_report: Optional[StrictBool] = Field(default=None, description="True if this dashboard was previously a report.", alias="isMigratedReport") layout: Optional[DashboardLayout] = None + schedule: Optional[DashboardSchedule] = None refresh_rate: Optional[RefreshRate] = Field(default=None, alias="refreshRate") links: Optional[DashboardLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["globalFilterId", "accountId", "createdBy", "modifiedBy", "modifiedDate", "globalOverride", "migratedReport", "apiLink", "dashboardId", "title", "isBuiltIn", "aid", "dashboardCreatedBy", "dashboardModifiedBy", "dashboardModifiedDate", "isPrivate", "isDefaultForUser", "isDefaultForAccount", "widgets", "description", "defaultTimespan", "isGlobalOverride", "isMigratedReport", "layout", "refreshRate", "_links"] + __properties: ClassVar[List[str]] = ["globalFilterId", "accountId", "createdBy", "modifiedBy", "modifiedDate", "globalOverride", "migratedReport", "apiLink", "dashboardId", "title", "isBuiltIn", "aid", "dashboardCreatedBy", "dashboardModifiedBy", "dashboardModifiedDate", "isPrivate", "isDefaultForUser", "isDefaultForAccount", "widgets", "description", "defaultTimespan", "isGlobalOverride", "isMigratedReport", "layout", "schedule", "refreshRate", "_links"] model_config = ConfigDict( populate_by_name=True, @@ -104,6 +106,7 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. """ excluded_fields: Set[str] = set([ "account_id", @@ -120,6 +123,7 @@ def to_dict(self) -> Dict[str, Any]: "is_default_for_user", "is_default_for_account", "is_migrated_report", + "schedule", ]) _dict = self.model_dump( @@ -140,6 +144,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of layout if self.layout: _dict['layout'] = self.layout.to_dict() + # override the default output from pydantic by calling `to_dict()` of schedule + if self.schedule: + _dict['schedule'] = self.schedule.to_dict() # override the default output from pydantic by calling `to_dict()` of links if self.links: _dict['_links'] = self.links.to_dict() @@ -179,6 +186,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "isGlobalOverride": obj.get("isGlobalOverride"), "isMigratedReport": obj.get("isMigratedReport"), "layout": DashboardLayout.from_dict(obj["layout"]) if obj.get("layout") is not None else None, + "schedule": DashboardSchedule.from_dict(obj["schedule"]) if obj.get("schedule") is not None else None, "refreshRate": obj.get("refreshRate"), "_links": DashboardLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None }) diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/clone_dashboard_refresh_rate.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/clone_dashboard_refresh_rate.py new file mode 100644 index 000000000..77e3714bc --- /dev/null +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/clone_dashboard_refresh_rate.py @@ -0,0 +1,46 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + 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 CloneDashboardRefreshRate(str, Enum): + """ + Auto-refresh interval for the cloned dashboard. If omitted, the clone inherits the source dashboard's refresh rate. + """ + + """ + allowed enum values + """ + OFF = 'off' + ENUM_2M = '2m' + ENUM_5M = '5m' + ENUM_10M = '10m' + ENUM_15M = '15m' + ENUM_30M = '30m' + ENUM_60M = '60m' + UNKNOWN = 'unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of CloneDashboardRefreshRate 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-dashboards/src/thousandeyes_sdk/dashboards/models/clone_dashboard_request.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/clone_dashboard_request.py new file mode 100644 index 000000000..92e50c75f --- /dev/null +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/clone_dashboard_request.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + 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, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from thousandeyes_sdk.dashboards.models.clone_dashboard_refresh_rate import CloneDashboardRefreshRate +from thousandeyes_sdk.dashboards.models.dashboard_layout import DashboardLayout +from thousandeyes_sdk.dashboards.models.default_timespan import DefaultTimespan +from typing import Optional, Set +from typing_extensions import Self + +class CloneDashboardRequest(BaseModel): + """ + Optional values that override settings inherited from the source dashboard. Omit the request body or send an empty object (`{}`) to clone the dashboard without overrides. + """ # noqa: E501 + title: Optional[StrictStr] = Field(default=None, description="Title of the cloned dashboard. If omitted, the API generates a unique title.") + tag_ids: Optional[List[StrictStr]] = Field(default=None, description="Dashboard tag identifiers. An empty array clears tags from the clone; omission preserves the source dashboard's tags.", alias="tagIds") + description: Optional[Annotated[str, Field(strict=True, max_length=1000)]] = Field(default=None, description="Description for the cloned dashboard.") + layout: Optional[DashboardLayout] = None + default_timespan: Optional[DefaultTimespan] = Field(default=None, alias="defaultTimespan") + is_global_override: Optional[StrictBool] = Field(default=None, description="If `true`, the dashboard time range overrides local widget time settings.", alias="isGlobalOverride") + refresh_rate: Optional[CloneDashboardRefreshRate] = Field(default=None, alias="refreshRate") + global_filter_id: Optional[StrictStr] = Field(default=None, description="Global filter applied to the cloned dashboard. If omitted, the source dashboard's filter is preserved when cloning within the same account group. When cloning across account groups, the filter is cleared.", alias="globalFilterId") + shared_account_ids: Optional[List[StrictStr]] = Field(default=None, description="Account group IDs with which to share the cloned dashboard. An empty array limits sharing to current account group. Omission does not share with other account groups. The `isPrivate` setting controls visibility within the current account group. Cannot be used together with `isSharedWithAllAccountGroups=true`", alias="sharedAccountIds") + is_shared_with_all_account_groups: Optional[StrictBool] = Field(default=None, description="When `true`, shares the cloned dashboard with all account groups available to the user. Cannot be used together with `sharedAccountIds`.", alias="isSharedWithAllAccountGroups") + is_private: Optional[StrictBool] = Field(default=False, description="When `true`, only the creator can view the cloned dashboard. Combining this property with `sharedAccountIds` or `isSharedWithAllAccountGroups=true` returns `400 Bad Request`. Defaults to `false`.", alias="isPrivate") + is_default_for_user: Optional[StrictBool] = Field(default=None, description="When `true`, sets the cloned dashboard as the current user's default dashboard.", alias="isDefaultForUser") + is_default_for_account: Optional[StrictBool] = Field(default=None, description="When `true`, sets the cloned dashboard as the current account group's default dashboard.", alias="isDefaultForAccount") + __properties: ClassVar[List[str]] = ["title", "tagIds", "description", "layout", "defaultTimespan", "isGlobalOverride", "refreshRate", "globalFilterId", "sharedAccountIds", "isSharedWithAllAccountGroups", "isPrivate", "isDefaultForUser", "isDefaultForAccount"] + + 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 CloneDashboardRequest 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 layout + if self.layout: + _dict['layout'] = self.layout.to_dict() + # override the default output from pydantic by calling `to_dict()` of default_timespan + if self.default_timespan: + _dict['defaultTimespan'] = self.default_timespan.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CloneDashboardRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "title": obj.get("title"), + "tagIds": obj.get("tagIds"), + "description": obj.get("description"), + "layout": DashboardLayout.from_dict(obj["layout"]) if obj.get("layout") is not None else None, + "defaultTimespan": DefaultTimespan.from_dict(obj["defaultTimespan"]) if obj.get("defaultTimespan") is not None else None, + "isGlobalOverride": obj.get("isGlobalOverride"), + "refreshRate": obj.get("refreshRate"), + "globalFilterId": obj.get("globalFilterId"), + "sharedAccountIds": obj.get("sharedAccountIds"), + "isSharedWithAllAccountGroups": obj.get("isSharedWithAllAccountGroups"), + "isPrivate": obj.get("isPrivate") if obj.get("isPrivate") is not None else False, + "isDefaultForUser": obj.get("isDefaultForUser"), + "isDefaultForAccount": obj.get("isDefaultForAccount") + }) + return _obj + + diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard.py index b1182fce4..cda4dcec2 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard.py @@ -22,6 +22,7 @@ from thousandeyes_sdk.dashboards.models.api_widget import ApiWidget from thousandeyes_sdk.dashboards.models.dashboard_layout import DashboardLayout from thousandeyes_sdk.dashboards.models.dashboard_links import DashboardLinks +from thousandeyes_sdk.dashboards.models.dashboard_schedule import DashboardSchedule from thousandeyes_sdk.dashboards.models.default_timespan import DefaultTimespan from thousandeyes_sdk.dashboards.models.refresh_rate import RefreshRate from typing import Optional, Set @@ -48,9 +49,10 @@ class Dashboard(BaseModel): is_global_override: Optional[StrictBool] = Field(default=None, description="When set to `true`, the defaultTimespan is used and overrides the widget's timespan. If set to `false`, the the widget's timespan is used.", alias="isGlobalOverride") is_migrated_report: Optional[StrictBool] = Field(default=None, description="True if this dashboard was previously a report.", alias="isMigratedReport") layout: Optional[DashboardLayout] = None + schedule: Optional[DashboardSchedule] = None refresh_rate: Optional[RefreshRate] = Field(default=None, alias="refreshRate") links: Optional[DashboardLinks] = Field(default=None, alias="_links") - __properties: ClassVar[List[str]] = ["globalFilterId", "dashboardId", "title", "isBuiltIn", "aid", "createdBy", "modifiedBy", "modifiedDate", "isPrivate", "isDefaultForUser", "isDefaultForAccount", "widgets", "description", "defaultTimespan", "isGlobalOverride", "isMigratedReport", "layout", "refreshRate", "_links"] + __properties: ClassVar[List[str]] = ["globalFilterId", "dashboardId", "title", "isBuiltIn", "aid", "createdBy", "modifiedBy", "modifiedDate", "isPrivate", "isDefaultForUser", "isDefaultForAccount", "widgets", "description", "defaultTimespan", "isGlobalOverride", "isMigratedReport", "layout", "schedule", "refreshRate", "_links"] model_config = ConfigDict( populate_by_name=True, @@ -92,6 +94,7 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. """ excluded_fields: Set[str] = set([ "dashboard_id", @@ -103,6 +106,7 @@ def to_dict(self) -> Dict[str, Any]: "is_default_for_user", "is_default_for_account", "is_migrated_report", + "schedule", ]) _dict = self.model_dump( @@ -123,6 +127,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of layout if self.layout: _dict['layout'] = self.layout.to_dict() + # override the default output from pydantic by calling `to_dict()` of schedule + if self.schedule: + _dict['schedule'] = self.schedule.to_dict() # override the default output from pydantic by calling `to_dict()` of links if self.links: _dict['_links'] = self.links.to_dict() @@ -155,6 +162,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "isGlobalOverride": obj.get("isGlobalOverride"), "isMigratedReport": obj.get("isMigratedReport"), "layout": DashboardLayout.from_dict(obj["layout"]) if obj.get("layout") is not None else None, + "schedule": DashboardSchedule.from_dict(obj["schedule"]) if obj.get("schedule") is not None else None, "refreshRate": obj.get("refreshRate"), "_links": DashboardLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None }) diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule.py new file mode 100644 index 000000000..9b85f8c8a --- /dev/null +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from thousandeyes_sdk.dashboards.models.dashboard_schedule_cron_spec import DashboardScheduleCronSpec +from thousandeyes_sdk.dashboards.models.dashboard_schedule_data_source import DashboardScheduleDataSource +from thousandeyes_sdk.dashboards.models.dashboard_schedule_timespan import DashboardScheduleTimespan +from typing import Optional, Set +from typing_extensions import Self + +class DashboardSchedule(BaseModel): + """ + Snapshot schedule for a dashboard. A `repeat` value of `NONE` represents a one-time schedule. + """ # noqa: E501 + cron_spec: DashboardScheduleCronSpec = Field(alias="cronSpec") + data_source: DashboardScheduleDataSource = Field(alias="dataSource") + data_timespan: DashboardScheduleTimespan = Field(alias="dataTimespan") + flag_enabled: StrictBool = Field(description="When `true`, the schedule is active and snapshots are generated according to `cronSpec`.", alias="flagEnabled") + flag_locked: Optional[StrictBool] = Field(default=None, description="When `true`, the schedule configuration is locked and cannot be edited through the web application.", alias="flagLocked") + flag_auto_share: Optional[StrictBool] = Field(default=None, description="When `true`, generated snapshots are automatically shared with schedule recipients.", alias="flagAutoShare") + flag_is_include_pii_user_data: Optional[StrictBool] = Field(default=None, description="When `true`, generated snapshots include personally identifiable user data when permitted by account policy.", alias="flagIsIncludePiiUserData") + flag_attach_pdf_to_email: Optional[StrictBool] = Field(default=None, description="When `true`, a PDF attachment is included in snapshot notification emails.", alias="flagAttachPdfToEmail") + recipients: Optional[List[StrictStr]] = Field(default=None, description="Email addresses of active dashboard account users who receive snapshot notifications.") + expires_after: Optional[Annotated[int, Field(le=157680000, strict=True, ge=86400)]] = Field(default=None, description="Snapshot retention period in seconds. Allowed range is 24 hours to 5 years.", alias="expiresAfter") + next_date: Optional[datetime] = Field(default=None, description="UTC date of the next scheduled snapshot run. Computed by the server.", alias="nextDate") + __properties: ClassVar[List[str]] = ["cronSpec", "dataSource", "dataTimespan", "flagEnabled", "flagLocked", "flagAutoShare", "flagIsIncludePiiUserData", "flagAttachPdfToEmail", "recipients", "expiresAfter", "nextDate"] + + 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 DashboardSchedule from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "next_date", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of cron_spec + if self.cron_spec: + _dict['cronSpec'] = self.cron_spec.to_dict() + # override the default output from pydantic by calling `to_dict()` of data_source + if self.data_source: + _dict['dataSource'] = self.data_source.to_dict() + # override the default output from pydantic by calling `to_dict()` of data_timespan + if self.data_timespan: + _dict['dataTimespan'] = self.data_timespan.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DashboardSchedule from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cronSpec": DashboardScheduleCronSpec.from_dict(obj["cronSpec"]) if obj.get("cronSpec") is not None else None, + "dataSource": DashboardScheduleDataSource.from_dict(obj["dataSource"]) if obj.get("dataSource") is not None else None, + "dataTimespan": DashboardScheduleTimespan.from_dict(obj["dataTimespan"]) if obj.get("dataTimespan") is not None else None, + "flagEnabled": obj.get("flagEnabled"), + "flagLocked": obj.get("flagLocked"), + "flagAutoShare": obj.get("flagAutoShare"), + "flagIsIncludePiiUserData": obj.get("flagIsIncludePiiUserData"), + "flagAttachPdfToEmail": obj.get("flagAttachPdfToEmail"), + "recipients": obj.get("recipients"), + "expiresAfter": obj.get("expiresAfter"), + "nextDate": obj.get("nextDate") + }) + return _obj + + diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_after_end_condition.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_after_end_condition.py new file mode 100644 index 000000000..0c334df9e --- /dev/null +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_after_end_condition.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + 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, field_validator +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class DashboardScheduleAfterEndCondition(BaseModel): + """ + DashboardScheduleAfterEndCondition + """ # noqa: E501 + end_condition_type: Annotated[str, Field(strict=True)] = Field(description="Identifies a schedule that ends after a number of occurrences.", alias="endConditionType") + value: Annotated[int, Field(strict=True, ge=1)] = Field(description="Number of schedule occurrences after which the recurrence ends.") + __properties: ClassVar[List[str]] = ["endConditionType", "value"] + + @field_validator('end_condition_type') + def end_condition_type_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^AFTER$", value): + raise ValueError(r"must validate the regular expression /^AFTER$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + extra="allow", + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DashboardScheduleAfterEndCondition 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 DashboardScheduleAfterEndCondition from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "endConditionType": obj.get("endConditionType"), + "value": obj.get("value") + }) + return _obj + + diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_cron_spec.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_cron_spec.py new file mode 100644 index 000000000..0ca2c4816 --- /dev/null +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_cron_spec.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from thousandeyes_sdk.dashboards.models.dashboard_schedule_custom_cron_spec import DashboardScheduleCustomCronSpec +from thousandeyes_sdk.dashboards.models.dashboard_schedule_non_custom_cron_spec import DashboardScheduleNonCustomCronSpec +from pydantic import StrictStr, Field, model_serializer +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +DASHBOARDSCHEDULECRONSPEC_ONE_OF_SCHEMAS = ["DashboardScheduleCustomCronSpec", "DashboardScheduleNonCustomCronSpec"] + +class DashboardScheduleCronSpec(BaseModel): + """ + Cron-style recurrence specification for a dashboard snapshot schedule. + """ + # data type: DashboardScheduleNonCustomCronSpec + oneof_schema_1_validator: Optional[DashboardScheduleNonCustomCronSpec] = None + # data type: DashboardScheduleCustomCronSpec + oneof_schema_2_validator: Optional[DashboardScheduleCustomCronSpec] = None + actual_instance: Optional[Union[DashboardScheduleCustomCronSpec, DashboardScheduleNonCustomCronSpec]] = None + one_of_schemas: Set[str] = { "DashboardScheduleCustomCronSpec", "DashboardScheduleNonCustomCronSpec" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = DashboardScheduleCronSpec.model_construct() + error_messages = [] + match = 0 + # validate data type: DashboardScheduleNonCustomCronSpec + if not isinstance(v, DashboardScheduleNonCustomCronSpec): + error_messages.append(f"Error! Input type `{type(v)}` is not `DashboardScheduleNonCustomCronSpec`") + else: + match += 1 + # validate data type: DashboardScheduleCustomCronSpec + if not isinstance(v, DashboardScheduleCustomCronSpec): + error_messages.append(f"Error! Input type `{type(v)}` is not `DashboardScheduleCustomCronSpec`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in DashboardScheduleCronSpec with oneOf schemas: DashboardScheduleCustomCronSpec, DashboardScheduleNonCustomCronSpec. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in DashboardScheduleCronSpec with oneOf schemas: DashboardScheduleCustomCronSpec, DashboardScheduleNonCustomCronSpec. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into DashboardScheduleNonCustomCronSpec + try: + instance.actual_instance = DashboardScheduleNonCustomCronSpec.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into DashboardScheduleCustomCronSpec + try: + instance.actual_instance = DashboardScheduleCustomCronSpec.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into DashboardScheduleCronSpec with oneOf schemas: DashboardScheduleCustomCronSpec, DashboardScheduleNonCustomCronSpec. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into DashboardScheduleCronSpec with oneOf schemas: DashboardScheduleCustomCronSpec, DashboardScheduleNonCustomCronSpec. Details: " + ", ".join(error_messages)) + else: + return instance + + @model_serializer(when_used="json") + def serialize_model(self): + return json.loads(self.to_json()) + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], DashboardScheduleCustomCronSpec, DashboardScheduleNonCustomCronSpec]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_custom_cron_spec.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_custom_cron_spec.py new file mode 100644 index 000000000..a004ef166 --- /dev/null +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_custom_cron_spec.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + 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.dashboards.models.dashboard_schedule_custom_repeat import DashboardScheduleCustomRepeat +from thousandeyes_sdk.dashboards.models.dashboard_schedule_custom_repeat_type import DashboardScheduleCustomRepeatType +from typing import Optional, Set +from typing_extensions import Self + +class DashboardScheduleCustomCronSpec(BaseModel): + """ + DashboardScheduleCustomCronSpec + """ # noqa: E501 + repeat: Optional[DashboardScheduleCustomRepeatType] = None + custom_repeat: DashboardScheduleCustomRepeat = Field(alias="customRepeat") + __properties: ClassVar[List[str]] = ["repeat", "customRepeat"] + + 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 DashboardScheduleCustomCronSpec 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 custom_repeat + if self.custom_repeat: + _dict['customRepeat'] = self.custom_repeat.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DashboardScheduleCustomCronSpec from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "repeat": obj.get("repeat"), + "customRepeat": DashboardScheduleCustomRepeat.from_dict(obj["customRepeat"]) if obj.get("customRepeat") is not None else None + }) + return _obj + + diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_custom_repeat.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_custom_repeat.py new file mode 100644 index 000000000..e4e752d6c --- /dev/null +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_custom_repeat.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + 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 typing_extensions import Annotated +from thousandeyes_sdk.dashboards.models.dashboard_schedule_custom_repeat_unit import DashboardScheduleCustomRepeatUnit +from typing import Optional, Set +from typing_extensions import Self + +class DashboardScheduleCustomRepeat(BaseModel): + """ + DashboardScheduleCustomRepeat + """ # noqa: E501 + repeat_every: Annotated[int, Field(le=99, strict=True, ge=1)] = Field(description="Interval count for custom recurrence.", alias="repeatEvery") + days_of_week: Optional[List[Annotated[int, Field(le=7, strict=True, ge=1)]]] = Field(default=None, description="Days of the week for custom weekly recurrence (`1` = Monday through `7` = Sunday).", alias="daysOfWeek") + repeat_unit: DashboardScheduleCustomRepeatUnit = Field(alias="repeatUnit") + __properties: ClassVar[List[str]] = ["repeatEvery", "daysOfWeek", "repeatUnit"] + + 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 DashboardScheduleCustomRepeat 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 DashboardScheduleCustomRepeat from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "repeatEvery": obj.get("repeatEvery"), + "daysOfWeek": obj.get("daysOfWeek"), + "repeatUnit": obj.get("repeatUnit") + }) + return _obj + + diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_custom_repeat_not.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_custom_repeat_not.py new file mode 100644 index 000000000..2b79e29de --- /dev/null +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_custom_repeat_not.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + 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.dashboards.models.dashboard_schedule_non_weekly_custom_repeat_unit import DashboardScheduleNonWeeklyCustomRepeatUnit +from typing import Optional, Set +from typing_extensions import Self + +class DashboardScheduleCustomRepeatNot(BaseModel): + """ + DashboardScheduleCustomRepeatNot + """ # noqa: E501 + repeat_unit: Optional[DashboardScheduleNonWeeklyCustomRepeatUnit] = Field(default=None, alias="repeatUnit") + __properties: ClassVar[List[str]] = ["repeatUnit"] + + 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 DashboardScheduleCustomRepeatNot 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 DashboardScheduleCustomRepeatNot from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "repeatUnit": obj.get("repeatUnit") + }) + return _obj + + diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_custom_repeat_type.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_custom_repeat_type.py new file mode 100644 index 000000000..ef1c24499 --- /dev/null +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_custom_repeat_type.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + 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 DashboardScheduleCustomRepeatType(str, Enum): + """ + DashboardScheduleCustomRepeatType + """ + + """ + allowed enum values + """ + CUSTOM = 'CUSTOM' + UNKNOWN = 'unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of DashboardScheduleCustomRepeatType 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-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_custom_repeat_unit.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_custom_repeat_unit.py new file mode 100644 index 000000000..35a927e08 --- /dev/null +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_custom_repeat_unit.py @@ -0,0 +1,42 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + 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 DashboardScheduleCustomRepeatUnit(str, Enum): + """ + DashboardScheduleCustomRepeatUnit + """ + + """ + allowed enum values + """ + DAY = 'DAY' + WEEK = 'WEEK' + MONTH = 'MONTH' + UNKNOWN = 'unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of DashboardScheduleCustomRepeatUnit 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-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_data_source.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_data_source.py new file mode 100644 index 000000000..4baeb4264 --- /dev/null +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_data_source.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + 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 +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class DashboardScheduleDataSource(BaseModel): + """ + Naming configuration for snapshots generated by the schedule. The required `dataTimespan` property on the schedule controls the snapshot data range. + """ # noqa: E501 + name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Name assigned to snapshots generated by the schedule.") + __properties: ClassVar[List[str]] = ["name"] + + 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 DashboardScheduleDataSource 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 DashboardScheduleDataSource from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name") + }) + return _obj + + diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_date_end_condition.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_date_end_condition.py new file mode 100644 index 000000000..015023a7e --- /dev/null +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_date_end_condition.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + 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, field_validator +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class DashboardScheduleDateEndCondition(BaseModel): + """ + DashboardScheduleDateEndCondition + """ # noqa: E501 + end_condition_type: Annotated[str, Field(strict=True)] = Field(description="Identifies a schedule that ends on a specified date.", alias="endConditionType") + value: Annotated[int, Field(strict=True, ge=0)] = Field(description="Unix timestamp in seconds when the recurrence ends.") + __properties: ClassVar[List[str]] = ["endConditionType", "value"] + + @field_validator('end_condition_type') + def end_condition_type_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^DATE$", value): + raise ValueError(r"must validate the regular expression /^DATE$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + extra="allow", + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DashboardScheduleDateEndCondition 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 DashboardScheduleDateEndCondition from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "endConditionType": obj.get("endConditionType"), + "value": obj.get("value") + }) + return _obj + + diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_end_condition.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_end_condition.py new file mode 100644 index 000000000..780e5522e --- /dev/null +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_end_condition.py @@ -0,0 +1,157 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from thousandeyes_sdk.dashboards.models.dashboard_schedule_after_end_condition import DashboardScheduleAfterEndCondition +from thousandeyes_sdk.dashboards.models.dashboard_schedule_date_end_condition import DashboardScheduleDateEndCondition +from thousandeyes_sdk.dashboards.models.dashboard_schedule_never_end_condition import DashboardScheduleNeverEndCondition +from pydantic import StrictStr, Field, model_serializer +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +DASHBOARDSCHEDULEENDCONDITION_ONE_OF_SCHEMAS = ["DashboardScheduleAfterEndCondition", "DashboardScheduleDateEndCondition", "DashboardScheduleNeverEndCondition"] + +class DashboardScheduleEndCondition(BaseModel): + """ + Condition that determines when the recurring schedule ends. + """ + # data type: DashboardScheduleNeverEndCondition + oneof_schema_1_validator: Optional[DashboardScheduleNeverEndCondition] = None + # data type: DashboardScheduleAfterEndCondition + oneof_schema_2_validator: Optional[DashboardScheduleAfterEndCondition] = None + # data type: DashboardScheduleDateEndCondition + oneof_schema_3_validator: Optional[DashboardScheduleDateEndCondition] = None + actual_instance: Optional[Union[DashboardScheduleAfterEndCondition, DashboardScheduleDateEndCondition, DashboardScheduleNeverEndCondition]] = None + one_of_schemas: Set[str] = { "DashboardScheduleAfterEndCondition", "DashboardScheduleDateEndCondition", "DashboardScheduleNeverEndCondition" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + discriminator_value_class_map: Dict[str, str] = { + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = DashboardScheduleEndCondition.model_construct() + error_messages = [] + match = 0 + # validate data type: DashboardScheduleNeverEndCondition + if not isinstance(v, DashboardScheduleNeverEndCondition): + error_messages.append(f"Error! Input type `{type(v)}` is not `DashboardScheduleNeverEndCondition`") + else: + match += 1 + # validate data type: DashboardScheduleAfterEndCondition + if not isinstance(v, DashboardScheduleAfterEndCondition): + error_messages.append(f"Error! Input type `{type(v)}` is not `DashboardScheduleAfterEndCondition`") + else: + match += 1 + # validate data type: DashboardScheduleDateEndCondition + if not isinstance(v, DashboardScheduleDateEndCondition): + error_messages.append(f"Error! Input type `{type(v)}` is not `DashboardScheduleDateEndCondition`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in DashboardScheduleEndCondition with oneOf schemas: DashboardScheduleAfterEndCondition, DashboardScheduleDateEndCondition, DashboardScheduleNeverEndCondition. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in DashboardScheduleEndCondition with oneOf schemas: DashboardScheduleAfterEndCondition, DashboardScheduleDateEndCondition, DashboardScheduleNeverEndCondition. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into DashboardScheduleNeverEndCondition + try: + instance.actual_instance = DashboardScheduleNeverEndCondition.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into DashboardScheduleAfterEndCondition + try: + instance.actual_instance = DashboardScheduleAfterEndCondition.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into DashboardScheduleDateEndCondition + try: + instance.actual_instance = DashboardScheduleDateEndCondition.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into DashboardScheduleEndCondition with oneOf schemas: DashboardScheduleAfterEndCondition, DashboardScheduleDateEndCondition, DashboardScheduleNeverEndCondition. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into DashboardScheduleEndCondition with oneOf schemas: DashboardScheduleAfterEndCondition, DashboardScheduleDateEndCondition, DashboardScheduleNeverEndCondition. Details: " + ", ".join(error_messages)) + else: + return instance + + @model_serializer(when_used="json") + def serialize_model(self): + return json.loads(self.to_json()) + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], DashboardScheduleAfterEndCondition, DashboardScheduleDateEndCondition, DashboardScheduleNeverEndCondition]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_never_end_condition.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_never_end_condition.py new file mode 100644 index 000000000..f6a53e12b --- /dev/null +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_never_end_condition.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + 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, field_validator +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class DashboardScheduleNeverEndCondition(BaseModel): + """ + DashboardScheduleNeverEndCondition + """ # noqa: E501 + end_condition_type: Annotated[str, Field(strict=True)] = Field(description="Identifies a schedule that never ends.", alias="endConditionType") + __properties: ClassVar[List[str]] = ["endConditionType"] + + @field_validator('end_condition_type') + def end_condition_type_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^NEVER$", value): + raise ValueError(r"must validate the regular expression /^NEVER$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + extra="allow", + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DashboardScheduleNeverEndCondition 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 DashboardScheduleNeverEndCondition from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "endConditionType": obj.get("endConditionType") + }) + return _obj + + diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_non_custom_cron_spec.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_non_custom_cron_spec.py new file mode 100644 index 000000000..56e53a275 --- /dev/null +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_non_custom_cron_spec.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + 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 +from typing import Any, ClassVar, Dict, List, Optional +from thousandeyes_sdk.dashboards.models.dashboard_schedule_non_custom_repeat import DashboardScheduleNonCustomRepeat +from typing import Optional, Set +from typing_extensions import Self + +class DashboardScheduleNonCustomCronSpec(BaseModel): + """ + DashboardScheduleNonCustomCronSpec + """ # noqa: E501 + repeat: Optional[DashboardScheduleNonCustomRepeat] = None + __properties: ClassVar[List[str]] = ["repeat"] + + 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 DashboardScheduleNonCustomCronSpec 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 DashboardScheduleNonCustomCronSpec from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "repeat": obj.get("repeat") + }) + return _obj + + diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_non_custom_repeat.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_non_custom_repeat.py new file mode 100644 index 000000000..f3a732005 --- /dev/null +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_non_custom_repeat.py @@ -0,0 +1,46 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + 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 DashboardScheduleNonCustomRepeat(str, Enum): + """ + DashboardScheduleNonCustomRepeat + """ + + """ + allowed enum values + """ + NONE = 'NONE' + EVERY_DAY = 'EVERY_DAY' + ALT_EVERY_DAY = 'ALT_EVERY_DAY' + EVERY_WEEK = 'EVERY_WEEK' + EVERY_MONTH = 'EVERY_MONTH' + EVERY_TWO_WEEKS = 'EVERY_TWO_WEEKS' + EVERY_THREE_MONTHS = 'EVERY_THREE_MONTHS' + UNKNOWN = 'unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of DashboardScheduleNonCustomRepeat 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-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_non_weekly_custom_repeat_unit.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_non_weekly_custom_repeat_unit.py new file mode 100644 index 000000000..5d4ab1de9 --- /dev/null +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_non_weekly_custom_repeat_unit.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + 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 DashboardScheduleNonWeeklyCustomRepeatUnit(str, Enum): + """ + DashboardScheduleNonWeeklyCustomRepeatUnit + """ + + """ + allowed enum values + """ + DAY = 'DAY' + MONTH = 'MONTH' + UNKNOWN = 'unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of DashboardScheduleNonWeeklyCustomRepeatUnit 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-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_one_time_repeat_type.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_one_time_repeat_type.py new file mode 100644 index 000000000..6cbc26fe1 --- /dev/null +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_one_time_repeat_type.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + 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 DashboardScheduleOneTimeRepeatType(str, Enum): + """ + DashboardScheduleOneTimeRepeatType + """ + + """ + allowed enum values + """ + NONE = 'NONE' + UNKNOWN = 'unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of DashboardScheduleOneTimeRepeatType 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-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_repeat.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_repeat.py new file mode 100644 index 000000000..7affcfbbc --- /dev/null +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_repeat.py @@ -0,0 +1,47 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + 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 DashboardScheduleRepeat(str, Enum): + """ + Schedule repetition pattern. Use `NONE` to generate one snapshot at `startTime`. + """ + + """ + allowed enum values + """ + NONE = 'NONE' + EVERY_DAY = 'EVERY_DAY' + ALT_EVERY_DAY = 'ALT_EVERY_DAY' + EVERY_WEEK = 'EVERY_WEEK' + EVERY_MONTH = 'EVERY_MONTH' + EVERY_TWO_WEEKS = 'EVERY_TWO_WEEKS' + EVERY_THREE_MONTHS = 'EVERY_THREE_MONTHS' + CUSTOM = 'CUSTOM' + UNKNOWN = 'unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of DashboardScheduleRepeat 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-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_request.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_request.py new file mode 100644 index 000000000..99a98fdbc --- /dev/null +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_request.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + 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, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from thousandeyes_sdk.dashboards.models.dashboard_schedule_cron_spec import DashboardScheduleCronSpec +from thousandeyes_sdk.dashboards.models.dashboard_schedule_data_source import DashboardScheduleDataSource +from thousandeyes_sdk.dashboards.models.dashboard_schedule_timespan import DashboardScheduleTimespan +from typing import Optional, Set +from typing_extensions import Self + +class DashboardScheduleRequest(BaseModel): + """ + Snapshot schedule configuration for create or update requests. + """ # noqa: E501 + cron_spec: DashboardScheduleCronSpec = Field(alias="cronSpec") + data_source: DashboardScheduleDataSource = Field(alias="dataSource") + data_timespan: DashboardScheduleTimespan = Field(alias="dataTimespan") + flag_enabled: StrictBool = Field(description="When `true`, the schedule is active and snapshots are generated according to `cronSpec`.", alias="flagEnabled") + flag_locked: Optional[StrictBool] = Field(default=None, description="When `true`, the schedule configuration is locked and cannot be edited through the web application.", alias="flagLocked") + flag_auto_share: Optional[StrictBool] = Field(default=None, description="When `true`, generated snapshots are automatically shared with schedule recipients.", alias="flagAutoShare") + flag_is_include_pii_user_data: Optional[StrictBool] = Field(default=None, description="When `true`, generated snapshots include personally identifiable user data when permitted by account policy.", alias="flagIsIncludePiiUserData") + flag_attach_pdf_to_email: Optional[StrictBool] = Field(default=None, description="When `true`, a PDF attachment is included in snapshot notification emails.", alias="flagAttachPdfToEmail") + recipients: Optional[List[StrictStr]] = Field(default=None, description="Email addresses of active dashboard account users who receive snapshot notifications. Unknown or duplicate addresses are rejected.") + expires_after: Optional[Annotated[int, Field(le=157680000, strict=True, ge=86400)]] = Field(default=157680000, description="Snapshot retention period in seconds. Allowed range is 24 hours to 5 years. Defaults to 5 years when omitted.", alias="expiresAfter") + __properties: ClassVar[List[str]] = ["cronSpec", "dataSource", "dataTimespan", "flagEnabled", "flagLocked", "flagAutoShare", "flagIsIncludePiiUserData", "flagAttachPdfToEmail", "recipients", "expiresAfter"] + + 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 DashboardScheduleRequest 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 cron_spec + if self.cron_spec: + _dict['cronSpec'] = self.cron_spec.to_dict() + # override the default output from pydantic by calling `to_dict()` of data_source + if self.data_source: + _dict['dataSource'] = self.data_source.to_dict() + # override the default output from pydantic by calling `to_dict()` of data_timespan + if self.data_timespan: + _dict['dataTimespan'] = self.data_timespan.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DashboardScheduleRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cronSpec": DashboardScheduleCronSpec.from_dict(obj["cronSpec"]) if obj.get("cronSpec") is not None else None, + "dataSource": DashboardScheduleDataSource.from_dict(obj["dataSource"]) if obj.get("dataSource") is not None else None, + "dataTimespan": DashboardScheduleTimespan.from_dict(obj["dataTimespan"]) if obj.get("dataTimespan") is not None else None, + "flagEnabled": obj.get("flagEnabled"), + "flagLocked": obj.get("flagLocked"), + "flagAutoShare": obj.get("flagAutoShare"), + "flagIsIncludePiiUserData": obj.get("flagIsIncludePiiUserData"), + "flagAttachPdfToEmail": obj.get("flagAttachPdfToEmail"), + "recipients": obj.get("recipients"), + "expiresAfter": obj.get("expiresAfter") if obj.get("expiresAfter") is not None else 157680000 + }) + return _obj + + diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_timespan.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_timespan.py new file mode 100644 index 000000000..fbb1c50ea --- /dev/null +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_timespan.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + 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 +from typing_extensions import Annotated +from thousandeyes_sdk.dashboards.models.dashboard_schedule_timespan_period import DashboardScheduleTimespanPeriod +from typing import Optional, Set +from typing_extensions import Self + +class DashboardScheduleTimespan(BaseModel): + """ + Amount of historical data to include in each scheduled snapshot. + """ # noqa: E501 + n: Annotated[int, Field(strict=True, ge=1)] = Field(description="Number of time units in the snapshot data range.") + period: DashboardScheduleTimespanPeriod + __properties: ClassVar[List[str]] = ["n", "period"] + + 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 DashboardScheduleTimespan 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 DashboardScheduleTimespan from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "n": obj.get("n"), + "period": obj.get("period") + }) + return _obj + + diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_timespan_period.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_timespan_period.py new file mode 100644 index 000000000..ffef0adb3 --- /dev/null +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_schedule_timespan_period.py @@ -0,0 +1,42 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + 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 DashboardScheduleTimespanPeriod(str, Enum): + """ + DashboardScheduleTimespanPeriod + """ + + """ + allowed enum values + """ + DAY = 'DAY' + WEEK = 'WEEK' + MONTH = 'MONTH' + UNKNOWN = 'unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of DashboardScheduleTimespanPeriod 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-dashboards/test/mock_manifest.py b/thousandeyes-sdk-dashboards/test/mock_manifest.py index 117cf2208..e35dc40dc 100644 --- a/thousandeyes-sdk-dashboards/test/mock_manifest.py +++ b/thousandeyes-sdk-dashboards/test/mock_manifest.py @@ -495,6 +495,7 @@ } ] } }, + "schedule" : "", "accountId" : 1234, "apiLink" : [ { "key" : "" @@ -1438,6 +1439,7 @@ } ] } }, + "schedule" : "", "accountId" : 1234, "apiLink" : [ { "key" : "" @@ -1703,6 +1705,7 @@ } ] } }, + "schedule" : "", "accountId" : 1234, "apiLink" : [ { "key" : "" @@ -1922,11 +1925,12 @@ }, ), - "create_dashboard": OperationExpectation( - operation_id="create_dashboard", + "clone_dashboard": OperationExpectation( + operation_id="clone_dashboard", method="POST", - path="/dashboards", + path="/dashboards/{dashboardId}/clone", path_param_examples={ + "dashboardId": '646f4d2ce3c99b0536c3821e', }, success_status=201, success_body=json.loads(""" @@ -2058,6 +2062,7 @@ } }, "globalFilterId" : "65babd9bb90bf55b17c96c8d", + "schedule" : "", "dashboardId" : "5e1f7a99143ae6004fdc3bb4", "createdBy" : "1", "refreshRate" : "off", @@ -2074,110 +2079,13 @@ request_body_example=json.loads(""" { - "isMigratedReport" : false, - "_links" : { - "snapshots" : { - "hreflang" : "hreflang", - "templated" : true, - "profile" : "profile", - "name" : "name", - "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", - "type" : "type", - "deprecation" : "deprecation", - "title" : "title" - }, - "self" : { - "hreflang" : "hreflang", - "templated" : true, - "profile" : "profile", - "name" : "name", - "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", - "type" : "type", - "deprecation" : "deprecation", - "title" : "title" - } - }, + "isSharedWithAllAccountGroups" : false, + "tagIds" : "", "isDefaultForAccount" : false, - "isDefaultForUser" : true, - "description" : "HTTP Server Widgets", + "description" : "Copy of the HTTP Server Widgets dashboard", + "isDefaultForUser" : false, "isPrivate" : true, - "title" : "HTTP Server Widgets", - "isBuiltIn" : true, - "widgets" : [ { - "embedUrl" : "https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f", - "shouldExcludeAlertSuppressionWindows" : true, - "_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" - } - }, - "visualMode" : "Full", - "filters" : { - "TEST" : [ 5187, 5227 ], - "ENDPOINT_MACHINE_ID" : [ "fbd0050c-07f7-43f7-9631-14b32f096962" ] - }, - "title" : "Widget Title", - "type" : "Agent Status", - "metricGroup" : "BGP", - "measure" : { - "percentileValue" : 95, - "type" : "MEAN" - }, - "apiLink" : "apiLink", - "metric" : "ENDPOINT_GATEWAY_CPU_LOAD_PERCENT", - "isEmbedded" : true, - "id" : "1234", - "fixedTimespan" : { - "unit" : "Days", - "value" : 10 - }, - "dataSource" : "ENDPOINT_AGENTS", - "direction" : "FROM_TARGET" - }, { - "embedUrl" : "https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f", - "shouldExcludeAlertSuppressionWindows" : true, - "_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" - } - }, - "visualMode" : "Full", - "filters" : { - "TEST" : [ 5187, 5227 ], - "ENDPOINT_MACHINE_ID" : [ "fbd0050c-07f7-43f7-9631-14b32f096962" ] - }, - "title" : "Widget Title", - "type" : "Agent Status", - "metricGroup" : "BGP", - "measure" : { - "percentileValue" : 95, - "type" : "MEAN" - }, - "apiLink" : "apiLink", - "metric" : "ENDPOINT_GATEWAY_CPU_LOAD_PERCENT", - "isEmbedded" : true, - "id" : "1234", - "fixedTimespan" : { - "unit" : "Days", - "value" : 10 - }, - "dataSource" : "ENDPOINT_AGENTS", - "direction" : "FROM_TARGET" - } ], + "title" : "HTTP Server Widgets Copy", "defaultTimespan" : { "duration" : 7200, "timespanDuration" : 7200, @@ -2200,13 +2108,9 @@ } }, "globalFilterId" : "65babd9bb90bf55b17c96c8d", - "dashboardId" : "5e1f7a99143ae6004fdc3bb4", - "createdBy" : "1", - "refreshRate" : "off", - "modifiedDate" : "2023-05-16T10:14:28Z", - "modifiedBy" : "1", - "isGlobalOverride" : true, - "aid" : "1234" + "refreshRate" : "5m", + "sharedAccountIds" : [ "1234", "5678" ], + "isGlobalOverride" : false } """), @@ -2299,119 +2203,17 @@ }, ), - "delete_dashboard": OperationExpectation( - operation_id="delete_dashboard", - method="DELETE", - path="/dashboards/{dashboardId}", - path_param_examples={ - "dashboardId": '646f4d2ce3c99b0536c3821e', - }, - success_status=204, - success_body=None, - success_content_type="application/json", - request_body_example=None, - error_responses={ - - "400": ErrorResponseExpectation( - status=400, - body=json.loads(""" - { - "instance" : "instance", - "detail" : "detail", - "type" : "type", - "title" : "title", - "errors" : [ { - "code" : "code", - "field" : "field", - "message" : "message" - }, { - "code" : "code", - "field" : "field", - "message" : "message" - } ], - "status" : 0 - }"""), - content_type="application/json", - ), - - "401": ErrorResponseExpectation( - status=401, - body=json.loads(""" - { - "error_description" : "Invalid access token", - "error" : "invalid_token" - }"""), - content_type="application/json", - ), - - "403": ErrorResponseExpectation( - status=403, - body=json.loads(""" - { - "instance" : "instance", - "detail" : "detail", - "type" : "type", - "title" : "title", - "status" : 6 - }"""), - content_type="application/json", - ), - - "404": ErrorResponseExpectation( - status=404, - body=json.loads(""" - { - "instance" : "instance", - "detail" : "detail", - "type" : "type", - "title" : "title", - "status" : 6 - }"""), - content_type="application/json", - ), - - "429": ErrorResponseExpectation( - status=429, - body=json.loads(""" - { - "instance" : "instance", - "detail" : "detail", - "type" : "type", - "title" : "title", - "status" : 6 - }"""), - content_type="application/json", - ), - - "500": ErrorResponseExpectation( - status=500, - body=json.loads(""" - { - "instance" : "instance", - "detail" : "detail", - "type" : "type", - "title" : "title", - "status" : 6 - }"""), - content_type="application/json", - ), - - }, - ), - - "get_dashboard": OperationExpectation( - operation_id="get_dashboard", - method="GET", - path="/dashboards/{dashboardId}", + "create_dashboard": OperationExpectation( + operation_id="create_dashboard", + method="POST", + path="/dashboards", path_param_examples={ - "dashboardId": '646f4d2ce3c99b0536c3821e', }, - success_status=200, + success_status=201, success_body=json.loads(""" { "isMigratedReport" : false, - "dashboardCreatedBy" : "1", "_links" : { "snapshots" : { "hreflang" : "hreflang", @@ -2434,6 +2236,7 @@ "title" : "title" } }, + "isDefaultForAccount" : false, "isDefaultForUser" : true, "description" : "HTTP Server Widgets", "isPrivate" : true, @@ -2514,12 +2317,6 @@ "dataSource" : "ENDPOINT_AGENTS", "direction" : "FROM_TARGET" } ], - "globalFilterId" : "65babd9bb90bf55b17c96c8d", - "refreshRate" : "off", - "modifiedBy" : 1, - "dashboardModifiedBy" : "1", - "migratedReport" : false, - "isDefaultForAccount" : false, "defaultTimespan" : { "duration" : 7200, "timespanDuration" : 7200, @@ -2541,33 +2338,633 @@ } ] } }, - "accountId" : 1234, - "apiLink" : [ { - "key" : "" - }, { - "key" : "" - } ], + "globalFilterId" : "65babd9bb90bf55b17c96c8d", + "schedule" : "", "dashboardId" : "5e1f7a99143ae6004fdc3bb4", - "createdBy" : 1, - "globalOverride" : true, - "modifiedDate" : "2023-05-16 10:14:28", + "createdBy" : "1", + "refreshRate" : "off", + "modifiedDate" : "2023-05-16T10:14:28Z", + "modifiedBy" : "1", "isGlobalOverride" : true, - "aid" : "1234", - "dashboardModifiedDate" : "2023-05-16T10:14:28Z" + "aid" : "1234" } """), success_content_type="application/json", - request_body_example=None, - error_responses={ + request_body_example=json.loads(""" - "400": ErrorResponseExpectation( - status=400, - body=json.loads(""" { - "instance" : "instance", + "isMigratedReport" : false, + "_links" : { + "snapshots" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + }, + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "isDefaultForAccount" : false, + "isDefaultForUser" : true, + "description" : "HTTP Server Widgets", + "isPrivate" : true, + "title" : "HTTP Server Widgets", + "isBuiltIn" : true, + "widgets" : [ { + "embedUrl" : "https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f", + "shouldExcludeAlertSuppressionWindows" : true, + "_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" + } + }, + "visualMode" : "Full", + "filters" : { + "TEST" : [ 5187, 5227 ], + "ENDPOINT_MACHINE_ID" : [ "fbd0050c-07f7-43f7-9631-14b32f096962" ] + }, + "title" : "Widget Title", + "type" : "Agent Status", + "metricGroup" : "BGP", + "measure" : { + "percentileValue" : 95, + "type" : "MEAN" + }, + "apiLink" : "apiLink", + "metric" : "ENDPOINT_GATEWAY_CPU_LOAD_PERCENT", + "isEmbedded" : true, + "id" : "1234", + "fixedTimespan" : { + "unit" : "Days", + "value" : 10 + }, + "dataSource" : "ENDPOINT_AGENTS", + "direction" : "FROM_TARGET" + }, { + "embedUrl" : "https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f", + "shouldExcludeAlertSuppressionWindows" : true, + "_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" + } + }, + "visualMode" : "Full", + "filters" : { + "TEST" : [ 5187, 5227 ], + "ENDPOINT_MACHINE_ID" : [ "fbd0050c-07f7-43f7-9631-14b32f096962" ] + }, + "title" : "Widget Title", + "type" : "Agent Status", + "metricGroup" : "BGP", + "measure" : { + "percentileValue" : 95, + "type" : "MEAN" + }, + "apiLink" : "apiLink", + "metric" : "ENDPOINT_GATEWAY_CPU_LOAD_PERCENT", + "isEmbedded" : true, + "id" : "1234", + "fixedTimespan" : { + "unit" : "Days", + "value" : 10 + }, + "dataSource" : "ENDPOINT_AGENTS", + "direction" : "FROM_TARGET" + } ], + "defaultTimespan" : { + "duration" : 7200, + "timespanDuration" : 7200, + "start" : "2023-05-16T10:14:28Z", + "end" : "2023-05-16T11:14:28Z", + "timespanStart" : "2023-05-16 10:14:28", + "timespanEnd" : "2023-05-16 11:14:28" + }, + "layout" : { + "layoutId" : "grid-layout-1", + "type" : "grid", + "details" : { + "widgetPositioning" : [ { + "x" : 0, + "y" : 0, + "w" : 9, + "h" : 5, + "id" : "widgetId-71lbb" + } ] + } + }, + "globalFilterId" : "65babd9bb90bf55b17c96c8d", + "schedule" : "", + "dashboardId" : "5e1f7a99143ae6004fdc3bb4", + "createdBy" : "1", + "refreshRate" : "off", + "modifiedDate" : "2023-05-16T10:14:28Z", + "modifiedBy" : "1", + "isGlobalOverride" : true, + "aid" : "1234" + } + + """), + error_responses={ + + "400": ErrorResponseExpectation( + status=400, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "errors" : [ { + "code" : "code", + "field" : "field", + "message" : "message" + }, { + "code" : "code", + "field" : "field", + "message" : "message" + } ], + "status" : 0 + }"""), + content_type="application/json", + ), + + "401": ErrorResponseExpectation( + status=401, + body=json.loads(""" + { + "error_description" : "Invalid access token", + "error" : "invalid_token" + }"""), + content_type="application/json", + ), + + "403": ErrorResponseExpectation( + status=403, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 6 + }"""), + content_type="application/json", + ), + + "404": ErrorResponseExpectation( + status=404, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 6 + }"""), + content_type="application/json", + ), + + "429": ErrorResponseExpectation( + status=429, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 6 + }"""), + content_type="application/json", + ), + + "500": ErrorResponseExpectation( + status=500, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 6 + }"""), + content_type="application/json", + ), + + }, + ), + + "delete_dashboard": OperationExpectation( + operation_id="delete_dashboard", + method="DELETE", + path="/dashboards/{dashboardId}", + path_param_examples={ + "dashboardId": '646f4d2ce3c99b0536c3821e', + }, + success_status=204, + success_body=None, + success_content_type="application/json", + request_body_example=None, + error_responses={ + + "400": ErrorResponseExpectation( + status=400, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "errors" : [ { + "code" : "code", + "field" : "field", + "message" : "message" + }, { + "code" : "code", + "field" : "field", + "message" : "message" + } ], + "status" : 0 + }"""), + content_type="application/json", + ), + + "401": ErrorResponseExpectation( + status=401, + body=json.loads(""" + { + "error_description" : "Invalid access token", + "error" : "invalid_token" + }"""), + content_type="application/json", + ), + + "403": ErrorResponseExpectation( + status=403, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 6 + }"""), + content_type="application/json", + ), + + "404": ErrorResponseExpectation( + status=404, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 6 + }"""), + content_type="application/json", + ), + + "429": ErrorResponseExpectation( + status=429, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 6 + }"""), + content_type="application/json", + ), + + "500": ErrorResponseExpectation( + status=500, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 6 + }"""), + content_type="application/json", + ), + + }, + ), + + "delete_dashboard_schedule": OperationExpectation( + operation_id="delete_dashboard_schedule", + method="DELETE", + path="/dashboards/{dashboardId}/actions/schedule", + path_param_examples={ + "dashboardId": '646f4d2ce3c99b0536c3821e', + }, + success_status=204, + success_body=None, + success_content_type="application/json", + request_body_example=None, + error_responses={ + + "400": ErrorResponseExpectation( + status=400, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "errors" : [ { + "code" : "code", + "field" : "field", + "message" : "message" + }, { + "code" : "code", + "field" : "field", + "message" : "message" + } ], + "status" : 0 + }"""), + content_type="application/json", + ), + + "401": ErrorResponseExpectation( + status=401, + body=json.loads(""" + { + "error_description" : "Invalid access token", + "error" : "invalid_token" + }"""), + content_type="application/json", + ), + + "403": ErrorResponseExpectation( + status=403, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 6 + }"""), + content_type="application/json", + ), + + "404": ErrorResponseExpectation( + status=404, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 6 + }"""), + content_type="application/json", + ), + + "409": ErrorResponseExpectation( + status=409, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 6 + }"""), + content_type="application/json", + ), + + "429": ErrorResponseExpectation( + status=429, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 6 + }"""), + content_type="application/json", + ), + + "500": ErrorResponseExpectation( + status=500, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 6 + }"""), + content_type="application/json", + ), + + }, + ), + + "get_dashboard": OperationExpectation( + operation_id="get_dashboard", + method="GET", + path="/dashboards/{dashboardId}", + path_param_examples={ + "dashboardId": '646f4d2ce3c99b0536c3821e', + }, + success_status=200, + success_body=json.loads(""" + + { + "isMigratedReport" : false, + "dashboardCreatedBy" : "1", + "_links" : { + "snapshots" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + }, + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "isDefaultForUser" : true, + "description" : "HTTP Server Widgets", + "isPrivate" : true, + "title" : "HTTP Server Widgets", + "isBuiltIn" : true, + "widgets" : [ { + "embedUrl" : "https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f", + "shouldExcludeAlertSuppressionWindows" : true, + "_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" + } + }, + "visualMode" : "Full", + "filters" : { + "TEST" : [ 5187, 5227 ], + "ENDPOINT_MACHINE_ID" : [ "fbd0050c-07f7-43f7-9631-14b32f096962" ] + }, + "title" : "Widget Title", + "type" : "Agent Status", + "metricGroup" : "BGP", + "measure" : { + "percentileValue" : 95, + "type" : "MEAN" + }, + "apiLink" : "apiLink", + "metric" : "ENDPOINT_GATEWAY_CPU_LOAD_PERCENT", + "isEmbedded" : true, + "id" : "1234", + "fixedTimespan" : { + "unit" : "Days", + "value" : 10 + }, + "dataSource" : "ENDPOINT_AGENTS", + "direction" : "FROM_TARGET" + }, { + "embedUrl" : "https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f", + "shouldExcludeAlertSuppressionWindows" : true, + "_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" + } + }, + "visualMode" : "Full", + "filters" : { + "TEST" : [ 5187, 5227 ], + "ENDPOINT_MACHINE_ID" : [ "fbd0050c-07f7-43f7-9631-14b32f096962" ] + }, + "title" : "Widget Title", + "type" : "Agent Status", + "metricGroup" : "BGP", + "measure" : { + "percentileValue" : 95, + "type" : "MEAN" + }, + "apiLink" : "apiLink", + "metric" : "ENDPOINT_GATEWAY_CPU_LOAD_PERCENT", + "isEmbedded" : true, + "id" : "1234", + "fixedTimespan" : { + "unit" : "Days", + "value" : 10 + }, + "dataSource" : "ENDPOINT_AGENTS", + "direction" : "FROM_TARGET" + } ], + "globalFilterId" : "65babd9bb90bf55b17c96c8d", + "refreshRate" : "off", + "modifiedBy" : 1, + "dashboardModifiedBy" : "1", + "migratedReport" : false, + "isDefaultForAccount" : false, + "defaultTimespan" : { + "duration" : 7200, + "timespanDuration" : 7200, + "start" : "2023-05-16T10:14:28Z", + "end" : "2023-05-16T11:14:28Z", + "timespanStart" : "2023-05-16 10:14:28", + "timespanEnd" : "2023-05-16 11:14:28" + }, + "layout" : { + "layoutId" : "grid-layout-1", + "type" : "grid", + "details" : { + "widgetPositioning" : [ { + "x" : 0, + "y" : 0, + "w" : 9, + "h" : 5, + "id" : "widgetId-71lbb" + } ] + } + }, + "schedule" : "", + "accountId" : 1234, + "apiLink" : [ { + "key" : "" + }, { + "key" : "" + } ], + "dashboardId" : "5e1f7a99143ae6004fdc3bb4", + "createdBy" : 1, + "globalOverride" : true, + "modifiedDate" : "2023-05-16 10:14:28", + "isGlobalOverride" : true, + "aid" : "1234", + "dashboardModifiedDate" : "2023-05-16T10:14:28Z" + } + + """), + + success_content_type="application/json", + + request_body_example=None, + error_responses={ + + "400": ErrorResponseExpectation( + status=400, + body=json.loads(""" + { + "instance" : "instance", "detail" : "detail", "type" : "type", "title" : "title", @@ -3348,6 +3745,7 @@ } ] } }, + "schedule" : "", "accountId" : 1234, "apiLink" : [ { "key" : "" @@ -3493,6 +3891,7 @@ } ] } }, + "schedule" : "", "accountId" : 1234, "apiLink" : [ { "key" : "" @@ -3828,105 +4227,248 @@ success_content_type="application/json", - request_body_example=None, - error_responses={ - - "400": ErrorResponseExpectation( - status=400, - body=json.loads(""" - { - "instance" : "instance", - "detail" : "detail", - "type" : "type", - "title" : "title", - "errors" : [ { - "code" : "code", - "field" : "field", - "message" : "message" - }, { - "code" : "code", - "field" : "field", - "message" : "message" - } ], - "status" : 0 - }"""), - content_type="application/json", - ), - - "401": ErrorResponseExpectation( - status=401, - body=json.loads(""" - { - "error_description" : "Invalid access token", - "error" : "invalid_token" - }"""), - content_type="application/json", - ), - - "403": ErrorResponseExpectation( - status=403, - body=json.loads(""" - { - "instance" : "instance", - "detail" : "detail", - "type" : "type", - "title" : "title", - "status" : 6 - }"""), - content_type="application/json", - ), - - "404": ErrorResponseExpectation( - status=404, - body=json.loads(""" - { - "instance" : "instance", - "detail" : "detail", - "type" : "type", - "title" : "title", - "status" : 6 - }"""), - content_type="application/json", - ), - - "429": ErrorResponseExpectation( - status=429, - body=json.loads(""" - { - "instance" : "instance", - "detail" : "detail", - "type" : "type", - "title" : "title", - "status" : 6 - }"""), - content_type="application/json", - ), - - "500": ErrorResponseExpectation( - status=500, - body=json.loads(""" - { - "instance" : "instance", - "detail" : "detail", - "type" : "type", - "title" : "title", - "status" : 6 - }"""), - content_type="application/json", - ), - - }, - ), - - "update_dashboard": OperationExpectation( - operation_id="update_dashboard", - method="PUT", - path="/dashboards/{dashboardId}", - path_param_examples={ - "dashboardId": '646f4d2ce3c99b0536c3821e', - }, - success_status=200, - success_body=json.loads(""" + request_body_example=None, + error_responses={ + + "400": ErrorResponseExpectation( + status=400, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "errors" : [ { + "code" : "code", + "field" : "field", + "message" : "message" + }, { + "code" : "code", + "field" : "field", + "message" : "message" + } ], + "status" : 0 + }"""), + content_type="application/json", + ), + + "401": ErrorResponseExpectation( + status=401, + body=json.loads(""" + { + "error_description" : "Invalid access token", + "error" : "invalid_token" + }"""), + content_type="application/json", + ), + + "403": ErrorResponseExpectation( + status=403, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 6 + }"""), + content_type="application/json", + ), + + "404": ErrorResponseExpectation( + status=404, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 6 + }"""), + content_type="application/json", + ), + + "429": ErrorResponseExpectation( + status=429, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 6 + }"""), + content_type="application/json", + ), + + "500": ErrorResponseExpectation( + status=500, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 6 + }"""), + content_type="application/json", + ), + + }, + ), + + "update_dashboard": OperationExpectation( + operation_id="update_dashboard", + method="PUT", + path="/dashboards/{dashboardId}", + path_param_examples={ + "dashboardId": '646f4d2ce3c99b0536c3821e', + }, + success_status=200, + success_body=json.loads(""" + + { + "isMigratedReport" : false, + "_links" : { + "snapshots" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + }, + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "isDefaultForAccount" : false, + "isDefaultForUser" : true, + "description" : "HTTP Server Widgets", + "isPrivate" : true, + "title" : "HTTP Server Widgets", + "isBuiltIn" : true, + "widgets" : [ { + "embedUrl" : "https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f", + "shouldExcludeAlertSuppressionWindows" : true, + "_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" + } + }, + "visualMode" : "Full", + "filters" : { + "TEST" : [ 5187, 5227 ], + "ENDPOINT_MACHINE_ID" : [ "fbd0050c-07f7-43f7-9631-14b32f096962" ] + }, + "title" : "Widget Title", + "type" : "Agent Status", + "metricGroup" : "BGP", + "measure" : { + "percentileValue" : 95, + "type" : "MEAN" + }, + "apiLink" : "apiLink", + "metric" : "ENDPOINT_GATEWAY_CPU_LOAD_PERCENT", + "isEmbedded" : true, + "id" : "1234", + "fixedTimespan" : { + "unit" : "Days", + "value" : 10 + }, + "dataSource" : "ENDPOINT_AGENTS", + "direction" : "FROM_TARGET" + }, { + "embedUrl" : "https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f", + "shouldExcludeAlertSuppressionWindows" : true, + "_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" + } + }, + "visualMode" : "Full", + "filters" : { + "TEST" : [ 5187, 5227 ], + "ENDPOINT_MACHINE_ID" : [ "fbd0050c-07f7-43f7-9631-14b32f096962" ] + }, + "title" : "Widget Title", + "type" : "Agent Status", + "metricGroup" : "BGP", + "measure" : { + "percentileValue" : 95, + "type" : "MEAN" + }, + "apiLink" : "apiLink", + "metric" : "ENDPOINT_GATEWAY_CPU_LOAD_PERCENT", + "isEmbedded" : true, + "id" : "1234", + "fixedTimespan" : { + "unit" : "Days", + "value" : 10 + }, + "dataSource" : "ENDPOINT_AGENTS", + "direction" : "FROM_TARGET" + } ], + "defaultTimespan" : { + "duration" : 7200, + "timespanDuration" : 7200, + "start" : "2023-05-16T10:14:28Z", + "end" : "2023-05-16T11:14:28Z", + "timespanStart" : "2023-05-16 10:14:28", + "timespanEnd" : "2023-05-16 11:14:28" + }, + "layout" : { + "layoutId" : "grid-layout-1", + "type" : "grid", + "details" : { + "widgetPositioning" : [ { + "x" : 0, + "y" : 0, + "w" : 9, + "h" : 5, + "id" : "widgetId-71lbb" + } ] + } + }, + "globalFilterId" : "65babd9bb90bf55b17c96c8d", + "schedule" : "", + "dashboardId" : "5e1f7a99143ae6004fdc3bb4", + "createdBy" : "1", + "refreshRate" : "off", + "modifiedDate" : "2023-05-16T10:14:28Z", + "modifiedBy" : "1", + "isGlobalOverride" : true, + "aid" : "1234" + } + + """), + + success_content_type="application/json", + + request_body_example=json.loads(""" { "isMigratedReport" : false, @@ -4055,6 +4597,7 @@ } }, "globalFilterId" : "65babd9bb90bf55b17c96c8d", + "schedule" : "", "dashboardId" : "5e1f7a99143ae6004fdc3bb4", "createdBy" : "1", "refreshRate" : "off", @@ -4065,13 +4608,108 @@ } """), + error_responses={ - success_content_type="application/json", + "400": ErrorResponseExpectation( + status=400, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "errors" : [ { + "code" : "code", + "field" : "field", + "message" : "message" + }, { + "code" : "code", + "field" : "field", + "message" : "message" + } ], + "status" : 0 + }"""), + content_type="application/json", + ), - request_body_example=json.loads(""" + "401": ErrorResponseExpectation( + status=401, + body=json.loads(""" + { + "error_description" : "Invalid access token", + "error" : "invalid_token" + }"""), + content_type="application/json", + ), + + "403": ErrorResponseExpectation( + status=403, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 6 + }"""), + content_type="application/json", + ), + + "404": ErrorResponseExpectation( + status=404, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 6 + }"""), + content_type="application/json", + ), + + "429": ErrorResponseExpectation( + status=429, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 6 + }"""), + content_type="application/json", + ), + + "500": ErrorResponseExpectation( + status=500, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 6 + }"""), + content_type="application/json", + ), + + }, + ), + + "update_dashboard_schedule": OperationExpectation( + operation_id="update_dashboard_schedule", + method="PUT", + path="/dashboards/{dashboardId}/actions/schedule", + path_param_examples={ + "dashboardId": '646f4d2ce3c99b0536c3821e', + }, + success_status=200, + success_body=json.loads(""" { "isMigratedReport" : false, + "dashboardCreatedBy" : "1", "_links" : { "snapshots" : { "hreflang" : "hreflang", @@ -4094,7 +4732,6 @@ "title" : "title" } }, - "isDefaultForAccount" : false, "isDefaultForUser" : true, "description" : "HTTP Server Widgets", "isPrivate" : true, @@ -4175,6 +4812,12 @@ "dataSource" : "ENDPOINT_AGENTS", "direction" : "FROM_TARGET" } ], + "globalFilterId" : "65babd9bb90bf55b17c96c8d", + "refreshRate" : "off", + "modifiedBy" : 1, + "dashboardModifiedBy" : "1", + "migratedReport" : false, + "isDefaultForAccount" : false, "defaultTimespan" : { "duration" : 7200, "timespanDuration" : 7200, @@ -4196,14 +4839,51 @@ } ] } }, - "globalFilterId" : "65babd9bb90bf55b17c96c8d", + "schedule" : "", + "accountId" : 1234, + "apiLink" : [ { + "key" : "" + }, { + "key" : "" + } ], "dashboardId" : "5e1f7a99143ae6004fdc3bb4", - "createdBy" : "1", - "refreshRate" : "off", - "modifiedDate" : "2023-05-16T10:14:28Z", - "modifiedBy" : "1", + "createdBy" : 1, + "globalOverride" : true, + "modifiedDate" : "2023-05-16 10:14:28", "isGlobalOverride" : true, - "aid" : "1234" + "aid" : "1234", + "dashboardModifiedDate" : "2023-05-16T10:14:28Z" + } + + """), + + success_content_type="application/json", + + request_body_example=json.loads(""" + + { + "expiresAfter" : 157680000, + "cronSpec" : { + "repeat" : "EVERY_WEEK", + "endRepeat" : { + "endConditionType" : "NEVER" + }, + "startTime" : 1753200000, + "zoneCode" : "America/Los_Angeles" + }, + "flagLocked" : false, + "recipients" : [ "alice@example.com", "bob@example.com" ], + "flagAutoShare" : false, + "dataTimespan" : { + "period" : "WEEK", + "n" : 1 + }, + "flagAttachPdfToEmail" : true, + "dataSource" : { + "name" : "Weekly network report" + }, + "flagIsIncludePiiUserData" : false, + "flagEnabled" : true } """), @@ -4267,6 +4947,19 @@ content_type="application/json", ), + "409": ErrorResponseExpectation( + status=409, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 6 + }"""), + content_type="application/json", + ), + "429": ErrorResponseExpectation( status=429, body=json.loads(""" diff --git a/thousandeyes-sdk-dashboards/test/test_dashboard_snapshots_api.py b/thousandeyes-sdk-dashboards/test/test_dashboard_snapshots_api.py index 760c7b322..34241229d 100644 --- a/thousandeyes-sdk-dashboards/test/test_dashboard_snapshots_api.py +++ b/thousandeyes-sdk-dashboards/test/test_dashboard_snapshots_api.py @@ -325,6 +325,7 @@ def test_get_dashboard_snapshot_models_validation(self) -> None: } ] } }, + "schedule" : "", "accountId" : 1234, "apiLink" : [ { "key" : "" @@ -1076,6 +1077,7 @@ def test_get_dashboard_snapshots_models_validation(self) -> None: } ] } }, + "schedule" : "", "accountId" : 1234, "apiLink" : [ { "key" : "" @@ -1341,6 +1343,7 @@ def test_get_dashboard_snapshots_models_validation(self) -> None: } ] } }, + "schedule" : "", "accountId" : 1234, "apiLink" : [ { "key" : "" diff --git a/thousandeyes-sdk-dashboards/test/test_dashboard_snapshots_api_integration.py b/thousandeyes-sdk-dashboards/test/test_dashboard_snapshots_api_integration.py index 6ced6da76..ccadd3382 100644 --- a/thousandeyes-sdk-dashboards/test/test_dashboard_snapshots_api_integration.py +++ b/thousandeyes-sdk-dashboards/test/test_dashboard_snapshots_api_integration.py @@ -735,6 +735,7 @@ def test_get_dashboard_snapshot_happy_path(self) -> None: } ] } }, + "schedule" : "", "accountId" : 1234, "apiLink" : [ { "key" : "" @@ -1878,6 +1879,7 @@ def test_get_dashboard_snapshots_happy_path(self) -> None: } ] } }, + "schedule" : "", "accountId" : 1234, "apiLink" : [ { "key" : "" @@ -2143,6 +2145,7 @@ def test_get_dashboard_snapshots_happy_path(self) -> None: } ] } }, + "schedule" : "", "accountId" : 1234, "apiLink" : [ { "key" : "" diff --git a/thousandeyes-sdk-dashboards/test/test_dashboards_api.py b/thousandeyes-sdk-dashboards/test/test_dashboards_api.py index 0e13200ed..d5cbbb811 100644 --- a/thousandeyes-sdk-dashboards/test/test_dashboards_api.py +++ b/thousandeyes-sdk-dashboards/test/test_dashboards_api.py @@ -28,6 +28,191 @@ def setUp(self) -> None: def tearDown(self) -> None: pass + def test_clone_dashboard_models_validation(self) -> None: + """Test case for clone_dashboard request and response models""" + request_body_json = """ + { + "isSharedWithAllAccountGroups" : false, + "tagIds" : "", + "isDefaultForAccount" : false, + "description" : "Copy of the HTTP Server Widgets dashboard", + "isDefaultForUser" : false, + "isPrivate" : true, + "title" : "HTTP Server Widgets Copy", + "defaultTimespan" : { + "duration" : 7200, + "timespanDuration" : 7200, + "start" : "2023-05-16T10:14:28Z", + "end" : "2023-05-16T11:14:28Z", + "timespanStart" : "2023-05-16 10:14:28", + "timespanEnd" : "2023-05-16 11:14:28" + }, + "layout" : { + "layoutId" : "grid-layout-1", + "type" : "grid", + "details" : { + "widgetPositioning" : [ { + "x" : 0, + "y" : 0, + "w" : 9, + "h" : 5, + "id" : "widgetId-71lbb" + } ] + } + }, + "globalFilterId" : "65babd9bb90bf55b17c96c8d", + "refreshRate" : "5m", + "sharedAccountIds" : [ "1234", "5678" ], + "isGlobalOverride" : false + } + """ + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.dashboards.models.CloneDashboardRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "isMigratedReport" : false, + "_links" : { + "snapshots" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + }, + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "isDefaultForAccount" : false, + "isDefaultForUser" : true, + "description" : "HTTP Server Widgets", + "isPrivate" : true, + "title" : "HTTP Server Widgets", + "isBuiltIn" : true, + "widgets" : [ { + "embedUrl" : "https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f", + "shouldExcludeAlertSuppressionWindows" : true, + "_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" + } + }, + "visualMode" : "Full", + "filters" : { + "TEST" : [ 5187, 5227 ], + "ENDPOINT_MACHINE_ID" : [ "fbd0050c-07f7-43f7-9631-14b32f096962" ] + }, + "title" : "Widget Title", + "type" : "Agent Status", + "metricGroup" : "BGP", + "measure" : { + "percentileValue" : 95, + "type" : "MEAN" + }, + "apiLink" : "apiLink", + "metric" : "ENDPOINT_GATEWAY_CPU_LOAD_PERCENT", + "isEmbedded" : true, + "id" : "1234", + "fixedTimespan" : { + "unit" : "Days", + "value" : 10 + }, + "dataSource" : "ENDPOINT_AGENTS", + "direction" : "FROM_TARGET" + }, { + "embedUrl" : "https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f", + "shouldExcludeAlertSuppressionWindows" : true, + "_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" + } + }, + "visualMode" : "Full", + "filters" : { + "TEST" : [ 5187, 5227 ], + "ENDPOINT_MACHINE_ID" : [ "fbd0050c-07f7-43f7-9631-14b32f096962" ] + }, + "title" : "Widget Title", + "type" : "Agent Status", + "metricGroup" : "BGP", + "measure" : { + "percentileValue" : 95, + "type" : "MEAN" + }, + "apiLink" : "apiLink", + "metric" : "ENDPOINT_GATEWAY_CPU_LOAD_PERCENT", + "isEmbedded" : true, + "id" : "1234", + "fixedTimespan" : { + "unit" : "Days", + "value" : 10 + }, + "dataSource" : "ENDPOINT_AGENTS", + "direction" : "FROM_TARGET" + } ], + "defaultTimespan" : { + "duration" : 7200, + "timespanDuration" : 7200, + "start" : "2023-05-16T10:14:28Z", + "end" : "2023-05-16T11:14:28Z", + "timespanStart" : "2023-05-16 10:14:28", + "timespanEnd" : "2023-05-16 11:14:28" + }, + "layout" : { + "layoutId" : "grid-layout-1", + "type" : "grid", + "details" : { + "widgetPositioning" : [ { + "x" : 0, + "y" : 0, + "w" : 9, + "h" : 5, + "id" : "widgetId-71lbb" + } ] + } + }, + "globalFilterId" : "65babd9bb90bf55b17c96c8d", + "schedule" : "", + "dashboardId" : "5e1f7a99143ae6004fdc3bb4", + "createdBy" : "1", + "refreshRate" : "off", + "modifiedDate" : "2023-05-16T10:14:28Z", + "modifiedBy" : "1", + "isGlobalOverride" : true, + "aid" : "1234" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.dashboards.models.Dashboard.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_create_dashboard_models_validation(self) -> None: """Test case for create_dashboard request and response models""" request_body_json = """ @@ -158,6 +343,7 @@ def test_create_dashboard_models_validation(self) -> None: } }, "globalFilterId" : "65babd9bb90bf55b17c96c8d", + "schedule" : "", "dashboardId" : "5e1f7a99143ae6004fdc3bb4", "createdBy" : "1", "refreshRate" : "off", @@ -300,6 +486,7 @@ def test_create_dashboard_models_validation(self) -> None: } }, "globalFilterId" : "65babd9bb90bf55b17c96c8d", + "schedule" : "", "dashboardId" : "5e1f7a99143ae6004fdc3bb4", "createdBy" : "1", "refreshRate" : "off", @@ -317,6 +504,10 @@ def test_delete_dashboard_models_validation(self) -> None: """Test case for delete_dashboard request and response models""" + def test_delete_dashboard_schedule_models_validation(self) -> None: + """Test case for delete_dashboard_schedule request and response models""" + + def test_get_dashboard_models_validation(self) -> None: """Test case for get_dashboard request and response models""" @@ -453,6 +644,7 @@ def test_get_dashboard_models_validation(self) -> None: } ] } }, + "schedule" : "", "accountId" : 1234, "apiLink" : [ { "key" : "" @@ -1068,6 +1260,7 @@ def test_get_dashboards_models_validation(self) -> None: } ] } }, + "schedule" : "", "accountId" : 1234, "apiLink" : [ { "key" : "" @@ -1213,6 +1406,7 @@ def test_get_dashboards_models_validation(self) -> None: } ] } }, + "schedule" : "", "accountId" : 1234, "apiLink" : [ { "key" : "" @@ -1485,6 +1679,7 @@ def test_update_dashboard_models_validation(self) -> None: } }, "globalFilterId" : "65babd9bb90bf55b17c96c8d", + "schedule" : "", "dashboardId" : "5e1f7a99143ae6004fdc3bb4", "createdBy" : "1", "refreshRate" : "off", @@ -1627,6 +1822,7 @@ def test_update_dashboard_models_validation(self) -> None: } }, "globalFilterId" : "65babd9bb90bf55b17c96c8d", + "schedule" : "", "dashboardId" : "5e1f7a99143ae6004fdc3bb4", "createdBy" : "1", "refreshRate" : "off", @@ -1640,6 +1836,192 @@ def test_update_dashboard_models_validation(self) -> None: response_from_json = thousandeyes_sdk.dashboards.models.Dashboard.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + def test_update_dashboard_schedule_models_validation(self) -> None: + """Test case for update_dashboard_schedule request and response models""" + request_body_json = """ + { + "expiresAfter" : 157680000, + "cronSpec" : { + "repeat" : "EVERY_WEEK", + "endRepeat" : { + "endConditionType" : "NEVER" + }, + "startTime" : 1753200000, + "zoneCode" : "America/Los_Angeles" + }, + "flagLocked" : false, + "recipients" : [ "alice@example.com", "bob@example.com" ], + "flagAutoShare" : false, + "dataTimespan" : { + "period" : "WEEK", + "n" : 1 + }, + "flagAttachPdfToEmail" : true, + "dataSource" : { + "name" : "Weekly network report" + }, + "flagIsIncludePiiUserData" : false, + "flagEnabled" : true + } + """ + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.dashboards.models.DashboardScheduleRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "isMigratedReport" : false, + "dashboardCreatedBy" : "1", + "_links" : { + "snapshots" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + }, + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "isDefaultForUser" : true, + "description" : "HTTP Server Widgets", + "isPrivate" : true, + "title" : "HTTP Server Widgets", + "isBuiltIn" : true, + "widgets" : [ { + "embedUrl" : "https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f", + "shouldExcludeAlertSuppressionWindows" : true, + "_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" + } + }, + "visualMode" : "Full", + "filters" : { + "TEST" : [ 5187, 5227 ], + "ENDPOINT_MACHINE_ID" : [ "fbd0050c-07f7-43f7-9631-14b32f096962" ] + }, + "title" : "Widget Title", + "type" : "Agent Status", + "metricGroup" : "BGP", + "measure" : { + "percentileValue" : 95, + "type" : "MEAN" + }, + "apiLink" : "apiLink", + "metric" : "ENDPOINT_GATEWAY_CPU_LOAD_PERCENT", + "isEmbedded" : true, + "id" : "1234", + "fixedTimespan" : { + "unit" : "Days", + "value" : 10 + }, + "dataSource" : "ENDPOINT_AGENTS", + "direction" : "FROM_TARGET" + }, { + "embedUrl" : "https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f", + "shouldExcludeAlertSuppressionWindows" : true, + "_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" + } + }, + "visualMode" : "Full", + "filters" : { + "TEST" : [ 5187, 5227 ], + "ENDPOINT_MACHINE_ID" : [ "fbd0050c-07f7-43f7-9631-14b32f096962" ] + }, + "title" : "Widget Title", + "type" : "Agent Status", + "metricGroup" : "BGP", + "measure" : { + "percentileValue" : 95, + "type" : "MEAN" + }, + "apiLink" : "apiLink", + "metric" : "ENDPOINT_GATEWAY_CPU_LOAD_PERCENT", + "isEmbedded" : true, + "id" : "1234", + "fixedTimespan" : { + "unit" : "Days", + "value" : 10 + }, + "dataSource" : "ENDPOINT_AGENTS", + "direction" : "FROM_TARGET" + } ], + "globalFilterId" : "65babd9bb90bf55b17c96c8d", + "refreshRate" : "off", + "modifiedBy" : 1, + "dashboardModifiedBy" : "1", + "migratedReport" : false, + "isDefaultForAccount" : false, + "defaultTimespan" : { + "duration" : 7200, + "timespanDuration" : 7200, + "start" : "2023-05-16T10:14:28Z", + "end" : "2023-05-16T11:14:28Z", + "timespanStart" : "2023-05-16 10:14:28", + "timespanEnd" : "2023-05-16 11:14:28" + }, + "layout" : { + "layoutId" : "grid-layout-1", + "type" : "grid", + "details" : { + "widgetPositioning" : [ { + "x" : 0, + "y" : 0, + "w" : 9, + "h" : 5, + "id" : "widgetId-71lbb" + } ] + } + }, + "schedule" : "", + "accountId" : 1234, + "apiLink" : [ { + "key" : "" + }, { + "key" : "" + } ], + "dashboardId" : "5e1f7a99143ae6004fdc3bb4", + "createdBy" : 1, + "globalOverride" : true, + "modifiedDate" : "2023-05-16 10:14:28", + "isGlobalOverride" : true, + "aid" : "1234", + "dashboardModifiedDate" : "2023-05-16T10:14:28Z" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.dashboards.models.ApiDashboard.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + if __name__ == '__main__': unittest.main() diff --git a/thousandeyes-sdk-dashboards/test/test_dashboards_api_integration.py b/thousandeyes-sdk-dashboards/test/test_dashboards_api_integration.py index 7f52383e8..c2caf69ad 100644 --- a/thousandeyes-sdk-dashboards/test/test_dashboards_api_integration.py +++ b/thousandeyes-sdk-dashboards/test/test_dashboards_api_integration.py @@ -29,115 +29,18 @@ def setUp(self) -> None: self.api = DashboardsApi(self.api_client) - def test_create_dashboard_happy_path(self) -> None: - """Integration test for create_dashboard success path""" + def test_clone_dashboard_happy_path(self) -> None: + """Integration test for clone_dashboard success path""" request_body_json = """ { - "isMigratedReport" : false, - "_links" : { - "snapshots" : { - "hreflang" : "hreflang", - "templated" : true, - "profile" : "profile", - "name" : "name", - "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", - "type" : "type", - "deprecation" : "deprecation", - "title" : "title" - }, - "self" : { - "hreflang" : "hreflang", - "templated" : true, - "profile" : "profile", - "name" : "name", - "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", - "type" : "type", - "deprecation" : "deprecation", - "title" : "title" - } - }, + "isSharedWithAllAccountGroups" : false, + "tagIds" : "", "isDefaultForAccount" : false, - "isDefaultForUser" : true, - "description" : "HTTP Server Widgets", + "description" : "Copy of the HTTP Server Widgets dashboard", + "isDefaultForUser" : false, "isPrivate" : true, - "title" : "HTTP Server Widgets", - "isBuiltIn" : true, - "widgets" : [ { - "embedUrl" : "https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f", - "shouldExcludeAlertSuppressionWindows" : true, - "_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" - } - }, - "visualMode" : "Full", - "filters" : { - "TEST" : [ 5187, 5227 ], - "ENDPOINT_MACHINE_ID" : [ "fbd0050c-07f7-43f7-9631-14b32f096962" ] - }, - "title" : "Widget Title", - "type" : "Agent Status", - "metricGroup" : "BGP", - "measure" : { - "percentileValue" : 95, - "type" : "MEAN" - }, - "apiLink" : "apiLink", - "metric" : "ENDPOINT_GATEWAY_CPU_LOAD_PERCENT", - "isEmbedded" : true, - "id" : "1234", - "fixedTimespan" : { - "unit" : "Days", - "value" : 10 - }, - "dataSource" : "ENDPOINT_AGENTS", - "direction" : "FROM_TARGET" - }, { - "embedUrl" : "https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f", - "shouldExcludeAlertSuppressionWindows" : true, - "_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" - } - }, - "visualMode" : "Full", - "filters" : { - "TEST" : [ 5187, 5227 ], - "ENDPOINT_MACHINE_ID" : [ "fbd0050c-07f7-43f7-9631-14b32f096962" ] - }, - "title" : "Widget Title", - "type" : "Agent Status", - "metricGroup" : "BGP", - "measure" : { - "percentileValue" : 95, - "type" : "MEAN" - }, - "apiLink" : "apiLink", - "metric" : "ENDPOINT_GATEWAY_CPU_LOAD_PERCENT", - "isEmbedded" : true, - "id" : "1234", - "fixedTimespan" : { - "unit" : "Days", - "value" : 10 - }, - "dataSource" : "ENDPOINT_AGENTS", - "direction" : "FROM_TARGET" - } ], + "title" : "HTTP Server Widgets Copy", "defaultTimespan" : { "duration" : 7200, "timespanDuration" : 7200, @@ -160,17 +63,14 @@ def test_create_dashboard_happy_path(self) -> None: } }, "globalFilterId" : "65babd9bb90bf55b17c96c8d", - "dashboardId" : "5e1f7a99143ae6004fdc3bb4", - "createdBy" : "1", - "refreshRate" : "off", - "modifiedDate" : "2023-05-16T10:14:28Z", - "modifiedBy" : "1", - "isGlobalOverride" : true, - "aid" : "1234" + "refreshRate" : "5m", + "sharedAccountIds" : [ "1234", "5678" ], + "isGlobalOverride" : false } """ - dashboard = thousandeyes_sdk.dashboards.models.Dashboard.from_json(request_body_json) + clone_dashboard_request = thousandeyes_sdk.dashboards.models.CloneDashboardRequest.from_json(request_body_json) + dashboard_id = '646f4d2ce3c99b0536c3821e' aid = '1234' response_body_json = """ { @@ -300,6 +200,7 @@ def test_create_dashboard_happy_path(self) -> None: } }, "globalFilterId" : "65babd9bb90bf55b17c96c8d", + "schedule" : "", "dashboardId" : "5e1f7a99143ae6004fdc3bb4", "createdBy" : "1", "refreshRate" : "off", @@ -310,126 +211,31 @@ def test_create_dashboard_happy_path(self) -> None: } """ expected_response = json.loads(response_body_json) - response = self.api.create_dashboard( + response = self.api.clone_dashboard( - dashboard=dashboard, + dashboard_id=dashboard_id, aid=aid, - _headers=self.te_headers("create_dashboard"), + clone_dashboard_request=clone_dashboard_request, + + _headers=self.te_headers("clone_dashboard"), ) assert_constructed_model_matches_example_json(response, expected_response) - def test_create_dashboard_error_400(self) -> None: - """Integration test for create_dashboard error path (HTTP 400)""" + def test_clone_dashboard_error_400(self) -> None: + """Integration test for clone_dashboard error path (HTTP 400)""" request_body_json = """ { - "isMigratedReport" : false, - "_links" : { - "snapshots" : { - "hreflang" : "hreflang", - "templated" : true, - "profile" : "profile", - "name" : "name", - "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", - "type" : "type", - "deprecation" : "deprecation", - "title" : "title" - }, - "self" : { - "hreflang" : "hreflang", - "templated" : true, - "profile" : "profile", - "name" : "name", - "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", - "type" : "type", - "deprecation" : "deprecation", - "title" : "title" - } - }, + "isSharedWithAllAccountGroups" : false, + "tagIds" : "", "isDefaultForAccount" : false, - "isDefaultForUser" : true, - "description" : "HTTP Server Widgets", + "description" : "Copy of the HTTP Server Widgets dashboard", + "isDefaultForUser" : false, "isPrivate" : true, - "title" : "HTTP Server Widgets", - "isBuiltIn" : true, - "widgets" : [ { - "embedUrl" : "https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f", - "shouldExcludeAlertSuppressionWindows" : true, - "_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" - } - }, - "visualMode" : "Full", - "filters" : { - "TEST" : [ 5187, 5227 ], - "ENDPOINT_MACHINE_ID" : [ "fbd0050c-07f7-43f7-9631-14b32f096962" ] - }, - "title" : "Widget Title", - "type" : "Agent Status", - "metricGroup" : "BGP", - "measure" : { - "percentileValue" : 95, - "type" : "MEAN" - }, - "apiLink" : "apiLink", - "metric" : "ENDPOINT_GATEWAY_CPU_LOAD_PERCENT", - "isEmbedded" : true, - "id" : "1234", - "fixedTimespan" : { - "unit" : "Days", - "value" : 10 - }, - "dataSource" : "ENDPOINT_AGENTS", - "direction" : "FROM_TARGET" - }, { - "embedUrl" : "https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f", - "shouldExcludeAlertSuppressionWindows" : true, - "_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" - } - }, - "visualMode" : "Full", - "filters" : { - "TEST" : [ 5187, 5227 ], - "ENDPOINT_MACHINE_ID" : [ "fbd0050c-07f7-43f7-9631-14b32f096962" ] - }, - "title" : "Widget Title", - "type" : "Agent Status", - "metricGroup" : "BGP", - "measure" : { - "percentileValue" : 95, - "type" : "MEAN" - }, - "apiLink" : "apiLink", - "metric" : "ENDPOINT_GATEWAY_CPU_LOAD_PERCENT", - "isEmbedded" : true, - "id" : "1234", - "fixedTimespan" : { - "unit" : "Days", - "value" : 10 - }, - "dataSource" : "ENDPOINT_AGENTS", - "direction" : "FROM_TARGET" - } ], + "title" : "HTTP Server Widgets Copy", "defaultTimespan" : { "duration" : 7200, "timespanDuration" : 7200, @@ -452,17 +258,14 @@ def test_create_dashboard_error_400(self) -> None: } }, "globalFilterId" : "65babd9bb90bf55b17c96c8d", - "dashboardId" : "5e1f7a99143ae6004fdc3bb4", - "createdBy" : "1", - "refreshRate" : "off", - "modifiedDate" : "2023-05-16T10:14:28Z", - "modifiedBy" : "1", - "isGlobalOverride" : true, - "aid" : "1234" + "refreshRate" : "5m", + "sharedAccountIds" : [ "1234", "5678" ], + "isGlobalOverride" : false } """ - dashboard = thousandeyes_sdk.dashboards.models.Dashboard.from_json(request_body_json) + clone_dashboard_request = thousandeyes_sdk.dashboards.models.CloneDashboardRequest.from_json(request_body_json) + dashboard_id = '646f4d2ce3c99b0536c3821e' aid = '1234' error_body_json = """ { @@ -486,40 +289,857 @@ def test_create_dashboard_error_400(self) -> None: with self.assertRaises( ApiException.exception_class_for_http_status(400) ) as context: - self.api.create_dashboard( + self.api.clone_dashboard( - dashboard=dashboard, + dashboard_id=dashboard_id, aid=aid, - _headers=self.te_headers("create_dashboard", error_status="400"), + clone_dashboard_request=clone_dashboard_request, + + _headers=self.te_headers("clone_dashboard", error_status="400"), ) assert_constructed_model_matches_example_json(context.exception.data, expected_error) - def test_create_dashboard_error_401(self) -> None: - """Integration test for create_dashboard error path (HTTP 401)""" + def test_clone_dashboard_error_401(self) -> None: + """Integration test for clone_dashboard error path (HTTP 401)""" request_body_json = """ { - "isMigratedReport" : false, - "_links" : { - "snapshots" : { - "hreflang" : "hreflang", - "templated" : true, - "profile" : "profile", - "name" : "name", - "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", - "type" : "type", - "deprecation" : "deprecation", - "title" : "title" - }, - "self" : { - "hreflang" : "hreflang", - "templated" : true, - "profile" : "profile", - "name" : "name", - "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "isSharedWithAllAccountGroups" : false, + "tagIds" : "", + "isDefaultForAccount" : false, + "description" : "Copy of the HTTP Server Widgets dashboard", + "isDefaultForUser" : false, + "isPrivate" : true, + "title" : "HTTP Server Widgets Copy", + "defaultTimespan" : { + "duration" : 7200, + "timespanDuration" : 7200, + "start" : "2023-05-16T10:14:28Z", + "end" : "2023-05-16T11:14:28Z", + "timespanStart" : "2023-05-16 10:14:28", + "timespanEnd" : "2023-05-16 11:14:28" + }, + "layout" : { + "layoutId" : "grid-layout-1", + "type" : "grid", + "details" : { + "widgetPositioning" : [ { + "x" : 0, + "y" : 0, + "w" : 9, + "h" : 5, + "id" : "widgetId-71lbb" + } ] + } + }, + "globalFilterId" : "65babd9bb90bf55b17c96c8d", + "refreshRate" : "5m", + "sharedAccountIds" : [ "1234", "5678" ], + "isGlobalOverride" : false + } + + """ + clone_dashboard_request = thousandeyes_sdk.dashboards.models.CloneDashboardRequest.from_json(request_body_json) + dashboard_id = '646f4d2ce3c99b0536c3821e' + aid = '1234' + error_body_json = """ + { + "error_description" : "Invalid access token", + "error" : "invalid_token" + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(401) + ) as context: + self.api.clone_dashboard( + + dashboard_id=dashboard_id, + + aid=aid, + + clone_dashboard_request=clone_dashboard_request, + + _headers=self.te_headers("clone_dashboard", error_status="401"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_clone_dashboard_error_403(self) -> None: + """Integration test for clone_dashboard error path (HTTP 403)""" + request_body_json = """ + + { + "isSharedWithAllAccountGroups" : false, + "tagIds" : "", + "isDefaultForAccount" : false, + "description" : "Copy of the HTTP Server Widgets dashboard", + "isDefaultForUser" : false, + "isPrivate" : true, + "title" : "HTTP Server Widgets Copy", + "defaultTimespan" : { + "duration" : 7200, + "timespanDuration" : 7200, + "start" : "2023-05-16T10:14:28Z", + "end" : "2023-05-16T11:14:28Z", + "timespanStart" : "2023-05-16 10:14:28", + "timespanEnd" : "2023-05-16 11:14:28" + }, + "layout" : { + "layoutId" : "grid-layout-1", + "type" : "grid", + "details" : { + "widgetPositioning" : [ { + "x" : 0, + "y" : 0, + "w" : 9, + "h" : 5, + "id" : "widgetId-71lbb" + } ] + } + }, + "globalFilterId" : "65babd9bb90bf55b17c96c8d", + "refreshRate" : "5m", + "sharedAccountIds" : [ "1234", "5678" ], + "isGlobalOverride" : false + } + + """ + clone_dashboard_request = thousandeyes_sdk.dashboards.models.CloneDashboardRequest.from_json(request_body_json) + dashboard_id = '646f4d2ce3c99b0536c3821e' + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 6 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(403) + ) as context: + self.api.clone_dashboard( + + dashboard_id=dashboard_id, + + aid=aid, + + clone_dashboard_request=clone_dashboard_request, + + _headers=self.te_headers("clone_dashboard", error_status="403"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_clone_dashboard_error_404(self) -> None: + """Integration test for clone_dashboard error path (HTTP 404)""" + request_body_json = """ + + { + "isSharedWithAllAccountGroups" : false, + "tagIds" : "", + "isDefaultForAccount" : false, + "description" : "Copy of the HTTP Server Widgets dashboard", + "isDefaultForUser" : false, + "isPrivate" : true, + "title" : "HTTP Server Widgets Copy", + "defaultTimespan" : { + "duration" : 7200, + "timespanDuration" : 7200, + "start" : "2023-05-16T10:14:28Z", + "end" : "2023-05-16T11:14:28Z", + "timespanStart" : "2023-05-16 10:14:28", + "timespanEnd" : "2023-05-16 11:14:28" + }, + "layout" : { + "layoutId" : "grid-layout-1", + "type" : "grid", + "details" : { + "widgetPositioning" : [ { + "x" : 0, + "y" : 0, + "w" : 9, + "h" : 5, + "id" : "widgetId-71lbb" + } ] + } + }, + "globalFilterId" : "65babd9bb90bf55b17c96c8d", + "refreshRate" : "5m", + "sharedAccountIds" : [ "1234", "5678" ], + "isGlobalOverride" : false + } + + """ + clone_dashboard_request = thousandeyes_sdk.dashboards.models.CloneDashboardRequest.from_json(request_body_json) + dashboard_id = '646f4d2ce3c99b0536c3821e' + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 6 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(404) + ) as context: + self.api.clone_dashboard( + + dashboard_id=dashboard_id, + + aid=aid, + + clone_dashboard_request=clone_dashboard_request, + + _headers=self.te_headers("clone_dashboard", error_status="404"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_clone_dashboard_error_429(self) -> None: + """Integration test for clone_dashboard error path (HTTP 429)""" + request_body_json = """ + + { + "isSharedWithAllAccountGroups" : false, + "tagIds" : "", + "isDefaultForAccount" : false, + "description" : "Copy of the HTTP Server Widgets dashboard", + "isDefaultForUser" : false, + "isPrivate" : true, + "title" : "HTTP Server Widgets Copy", + "defaultTimespan" : { + "duration" : 7200, + "timespanDuration" : 7200, + "start" : "2023-05-16T10:14:28Z", + "end" : "2023-05-16T11:14:28Z", + "timespanStart" : "2023-05-16 10:14:28", + "timespanEnd" : "2023-05-16 11:14:28" + }, + "layout" : { + "layoutId" : "grid-layout-1", + "type" : "grid", + "details" : { + "widgetPositioning" : [ { + "x" : 0, + "y" : 0, + "w" : 9, + "h" : 5, + "id" : "widgetId-71lbb" + } ] + } + }, + "globalFilterId" : "65babd9bb90bf55b17c96c8d", + "refreshRate" : "5m", + "sharedAccountIds" : [ "1234", "5678" ], + "isGlobalOverride" : false + } + + """ + clone_dashboard_request = thousandeyes_sdk.dashboards.models.CloneDashboardRequest.from_json(request_body_json) + dashboard_id = '646f4d2ce3c99b0536c3821e' + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 6 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(429) + ) as context: + self.api.clone_dashboard( + + dashboard_id=dashboard_id, + + aid=aid, + + clone_dashboard_request=clone_dashboard_request, + + _headers=self.te_headers("clone_dashboard", error_status="429"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_clone_dashboard_error_500(self) -> None: + """Integration test for clone_dashboard error path (HTTP 500)""" + request_body_json = """ + + { + "isSharedWithAllAccountGroups" : false, + "tagIds" : "", + "isDefaultForAccount" : false, + "description" : "Copy of the HTTP Server Widgets dashboard", + "isDefaultForUser" : false, + "isPrivate" : true, + "title" : "HTTP Server Widgets Copy", + "defaultTimespan" : { + "duration" : 7200, + "timespanDuration" : 7200, + "start" : "2023-05-16T10:14:28Z", + "end" : "2023-05-16T11:14:28Z", + "timespanStart" : "2023-05-16 10:14:28", + "timespanEnd" : "2023-05-16 11:14:28" + }, + "layout" : { + "layoutId" : "grid-layout-1", + "type" : "grid", + "details" : { + "widgetPositioning" : [ { + "x" : 0, + "y" : 0, + "w" : 9, + "h" : 5, + "id" : "widgetId-71lbb" + } ] + } + }, + "globalFilterId" : "65babd9bb90bf55b17c96c8d", + "refreshRate" : "5m", + "sharedAccountIds" : [ "1234", "5678" ], + "isGlobalOverride" : false + } + + """ + clone_dashboard_request = thousandeyes_sdk.dashboards.models.CloneDashboardRequest.from_json(request_body_json) + dashboard_id = '646f4d2ce3c99b0536c3821e' + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 6 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(500) + ) as context: + self.api.clone_dashboard( + + dashboard_id=dashboard_id, + + aid=aid, + + clone_dashboard_request=clone_dashboard_request, + + _headers=self.te_headers("clone_dashboard", error_status="500"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + + + def test_create_dashboard_happy_path(self) -> None: + """Integration test for create_dashboard success path""" + request_body_json = """ + + { + "isMigratedReport" : false, + "_links" : { + "snapshots" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + }, + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "isDefaultForAccount" : false, + "isDefaultForUser" : true, + "description" : "HTTP Server Widgets", + "isPrivate" : true, + "title" : "HTTP Server Widgets", + "isBuiltIn" : true, + "widgets" : [ { + "embedUrl" : "https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f", + "shouldExcludeAlertSuppressionWindows" : true, + "_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" + } + }, + "visualMode" : "Full", + "filters" : { + "TEST" : [ 5187, 5227 ], + "ENDPOINT_MACHINE_ID" : [ "fbd0050c-07f7-43f7-9631-14b32f096962" ] + }, + "title" : "Widget Title", + "type" : "Agent Status", + "metricGroup" : "BGP", + "measure" : { + "percentileValue" : 95, + "type" : "MEAN" + }, + "apiLink" : "apiLink", + "metric" : "ENDPOINT_GATEWAY_CPU_LOAD_PERCENT", + "isEmbedded" : true, + "id" : "1234", + "fixedTimespan" : { + "unit" : "Days", + "value" : 10 + }, + "dataSource" : "ENDPOINT_AGENTS", + "direction" : "FROM_TARGET" + }, { + "embedUrl" : "https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f", + "shouldExcludeAlertSuppressionWindows" : true, + "_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" + } + }, + "visualMode" : "Full", + "filters" : { + "TEST" : [ 5187, 5227 ], + "ENDPOINT_MACHINE_ID" : [ "fbd0050c-07f7-43f7-9631-14b32f096962" ] + }, + "title" : "Widget Title", + "type" : "Agent Status", + "metricGroup" : "BGP", + "measure" : { + "percentileValue" : 95, + "type" : "MEAN" + }, + "apiLink" : "apiLink", + "metric" : "ENDPOINT_GATEWAY_CPU_LOAD_PERCENT", + "isEmbedded" : true, + "id" : "1234", + "fixedTimespan" : { + "unit" : "Days", + "value" : 10 + }, + "dataSource" : "ENDPOINT_AGENTS", + "direction" : "FROM_TARGET" + } ], + "defaultTimespan" : { + "duration" : 7200, + "timespanDuration" : 7200, + "start" : "2023-05-16T10:14:28Z", + "end" : "2023-05-16T11:14:28Z", + "timespanStart" : "2023-05-16 10:14:28", + "timespanEnd" : "2023-05-16 11:14:28" + }, + "layout" : { + "layoutId" : "grid-layout-1", + "type" : "grid", + "details" : { + "widgetPositioning" : [ { + "x" : 0, + "y" : 0, + "w" : 9, + "h" : 5, + "id" : "widgetId-71lbb" + } ] + } + }, + "globalFilterId" : "65babd9bb90bf55b17c96c8d", + "schedule" : "", + "dashboardId" : "5e1f7a99143ae6004fdc3bb4", + "createdBy" : "1", + "refreshRate" : "off", + "modifiedDate" : "2023-05-16T10:14:28Z", + "modifiedBy" : "1", + "isGlobalOverride" : true, + "aid" : "1234" + } + + """ + dashboard = thousandeyes_sdk.dashboards.models.Dashboard.from_json(request_body_json) + aid = '1234' + response_body_json = """ + { + "isMigratedReport" : false, + "_links" : { + "snapshots" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + }, + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "isDefaultForAccount" : false, + "isDefaultForUser" : true, + "description" : "HTTP Server Widgets", + "isPrivate" : true, + "title" : "HTTP Server Widgets", + "isBuiltIn" : true, + "widgets" : [ { + "embedUrl" : "https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f", + "shouldExcludeAlertSuppressionWindows" : true, + "_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" + } + }, + "visualMode" : "Full", + "filters" : { + "TEST" : [ 5187, 5227 ], + "ENDPOINT_MACHINE_ID" : [ "fbd0050c-07f7-43f7-9631-14b32f096962" ] + }, + "title" : "Widget Title", + "type" : "Agent Status", + "metricGroup" : "BGP", + "measure" : { + "percentileValue" : 95, + "type" : "MEAN" + }, + "apiLink" : "apiLink", + "metric" : "ENDPOINT_GATEWAY_CPU_LOAD_PERCENT", + "isEmbedded" : true, + "id" : "1234", + "fixedTimespan" : { + "unit" : "Days", + "value" : 10 + }, + "dataSource" : "ENDPOINT_AGENTS", + "direction" : "FROM_TARGET" + }, { + "embedUrl" : "https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f", + "shouldExcludeAlertSuppressionWindows" : true, + "_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" + } + }, + "visualMode" : "Full", + "filters" : { + "TEST" : [ 5187, 5227 ], + "ENDPOINT_MACHINE_ID" : [ "fbd0050c-07f7-43f7-9631-14b32f096962" ] + }, + "title" : "Widget Title", + "type" : "Agent Status", + "metricGroup" : "BGP", + "measure" : { + "percentileValue" : 95, + "type" : "MEAN" + }, + "apiLink" : "apiLink", + "metric" : "ENDPOINT_GATEWAY_CPU_LOAD_PERCENT", + "isEmbedded" : true, + "id" : "1234", + "fixedTimespan" : { + "unit" : "Days", + "value" : 10 + }, + "dataSource" : "ENDPOINT_AGENTS", + "direction" : "FROM_TARGET" + } ], + "defaultTimespan" : { + "duration" : 7200, + "timespanDuration" : 7200, + "start" : "2023-05-16T10:14:28Z", + "end" : "2023-05-16T11:14:28Z", + "timespanStart" : "2023-05-16 10:14:28", + "timespanEnd" : "2023-05-16 11:14:28" + }, + "layout" : { + "layoutId" : "grid-layout-1", + "type" : "grid", + "details" : { + "widgetPositioning" : [ { + "x" : 0, + "y" : 0, + "w" : 9, + "h" : 5, + "id" : "widgetId-71lbb" + } ] + } + }, + "globalFilterId" : "65babd9bb90bf55b17c96c8d", + "schedule" : "", + "dashboardId" : "5e1f7a99143ae6004fdc3bb4", + "createdBy" : "1", + "refreshRate" : "off", + "modifiedDate" : "2023-05-16T10:14:28Z", + "modifiedBy" : "1", + "isGlobalOverride" : true, + "aid" : "1234" + } + """ + expected_response = json.loads(response_body_json) + response = self.api.create_dashboard( + + dashboard=dashboard, + + aid=aid, + + _headers=self.te_headers("create_dashboard"), + ) + assert_constructed_model_matches_example_json(response, expected_response) + + + def test_create_dashboard_error_400(self) -> None: + """Integration test for create_dashboard error path (HTTP 400)""" + request_body_json = """ + + { + "isMigratedReport" : false, + "_links" : { + "snapshots" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + }, + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "isDefaultForAccount" : false, + "isDefaultForUser" : true, + "description" : "HTTP Server Widgets", + "isPrivate" : true, + "title" : "HTTP Server Widgets", + "isBuiltIn" : true, + "widgets" : [ { + "embedUrl" : "https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f", + "shouldExcludeAlertSuppressionWindows" : true, + "_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" + } + }, + "visualMode" : "Full", + "filters" : { + "TEST" : [ 5187, 5227 ], + "ENDPOINT_MACHINE_ID" : [ "fbd0050c-07f7-43f7-9631-14b32f096962" ] + }, + "title" : "Widget Title", + "type" : "Agent Status", + "metricGroup" : "BGP", + "measure" : { + "percentileValue" : 95, + "type" : "MEAN" + }, + "apiLink" : "apiLink", + "metric" : "ENDPOINT_GATEWAY_CPU_LOAD_PERCENT", + "isEmbedded" : true, + "id" : "1234", + "fixedTimespan" : { + "unit" : "Days", + "value" : 10 + }, + "dataSource" : "ENDPOINT_AGENTS", + "direction" : "FROM_TARGET" + }, { + "embedUrl" : "https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f", + "shouldExcludeAlertSuppressionWindows" : true, + "_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" + } + }, + "visualMode" : "Full", + "filters" : { + "TEST" : [ 5187, 5227 ], + "ENDPOINT_MACHINE_ID" : [ "fbd0050c-07f7-43f7-9631-14b32f096962" ] + }, + "title" : "Widget Title", + "type" : "Agent Status", + "metricGroup" : "BGP", + "measure" : { + "percentileValue" : 95, + "type" : "MEAN" + }, + "apiLink" : "apiLink", + "metric" : "ENDPOINT_GATEWAY_CPU_LOAD_PERCENT", + "isEmbedded" : true, + "id" : "1234", + "fixedTimespan" : { + "unit" : "Days", + "value" : 10 + }, + "dataSource" : "ENDPOINT_AGENTS", + "direction" : "FROM_TARGET" + } ], + "defaultTimespan" : { + "duration" : 7200, + "timespanDuration" : 7200, + "start" : "2023-05-16T10:14:28Z", + "end" : "2023-05-16T11:14:28Z", + "timespanStart" : "2023-05-16 10:14:28", + "timespanEnd" : "2023-05-16 11:14:28" + }, + "layout" : { + "layoutId" : "grid-layout-1", + "type" : "grid", + "details" : { + "widgetPositioning" : [ { + "x" : 0, + "y" : 0, + "w" : 9, + "h" : 5, + "id" : "widgetId-71lbb" + } ] + } + }, + "globalFilterId" : "65babd9bb90bf55b17c96c8d", + "schedule" : "", + "dashboardId" : "5e1f7a99143ae6004fdc3bb4", + "createdBy" : "1", + "refreshRate" : "off", + "modifiedDate" : "2023-05-16T10:14:28Z", + "modifiedBy" : "1", + "isGlobalOverride" : true, + "aid" : "1234" + } + + """ + dashboard = thousandeyes_sdk.dashboards.models.Dashboard.from_json(request_body_json) + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "errors" : [ { + "code" : "code", + "field" : "field", + "message" : "message" + }, { + "code" : "code", + "field" : "field", + "message" : "message" + } ], + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(400) + ) as context: + self.api.create_dashboard( + + dashboard=dashboard, + + aid=aid, + + _headers=self.te_headers("create_dashboard", error_status="400"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_create_dashboard_error_401(self) -> None: + """Integration test for create_dashboard error path (HTTP 401)""" + request_body_json = """ + + { + "isMigratedReport" : false, + "_links" : { + "snapshots" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + }, + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", "type" : "type", "deprecation" : "deprecation", "title" : "title" @@ -628,6 +1248,7 @@ def test_create_dashboard_error_401(self) -> None: } }, "globalFilterId" : "65babd9bb90bf55b17c96c8d", + "schedule" : "", "dashboardId" : "5e1f7a99143ae6004fdc3bb4", "createdBy" : "1", "refreshRate" : "off", @@ -792,6 +1413,7 @@ def test_create_dashboard_error_403(self) -> None: } }, "globalFilterId" : "65babd9bb90bf55b17c96c8d", + "schedule" : "", "dashboardId" : "5e1f7a99143ae6004fdc3bb4", "createdBy" : "1", "refreshRate" : "off", @@ -959,6 +1581,7 @@ def test_create_dashboard_error_404(self) -> None: } }, "globalFilterId" : "65babd9bb90bf55b17c96c8d", + "schedule" : "", "dashboardId" : "5e1f7a99143ae6004fdc3bb4", "createdBy" : "1", "refreshRate" : "off", @@ -1126,6 +1749,7 @@ def test_create_dashboard_error_429(self) -> None: } }, "globalFilterId" : "65babd9bb90bf55b17c96c8d", + "schedule" : "", "dashboardId" : "5e1f7a99143ae6004fdc3bb4", "createdBy" : "1", "refreshRate" : "off", @@ -1293,6 +1917,7 @@ def test_create_dashboard_error_500(self) -> None: } }, "globalFilterId" : "65babd9bb90bf55b17c96c8d", + "schedule" : "", "dashboardId" : "5e1f7a99143ae6004fdc3bb4", "createdBy" : "1", "refreshRate" : "off", @@ -1318,37 +1943,229 @@ def test_create_dashboard_error_500(self) -> None: with self.assertRaises( ApiException.exception_class_for_http_status(500) ) as context: - self.api.create_dashboard( + self.api.create_dashboard( + + dashboard=dashboard, + + aid=aid, + + _headers=self.te_headers("create_dashboard", error_status="500"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + + + def test_delete_dashboard_happy_path(self) -> None: + """Integration test for delete_dashboard success path""" + dashboard_id = '646f4d2ce3c99b0536c3821e' + aid = '1234' + response = self.api.delete_dashboard_with_http_info( + + dashboard_id=dashboard_id, + + aid=aid, + + _headers=self.te_headers("delete_dashboard"), + ) + self.assertEqual(204, response.status_code) + self.assertIsNone(response.data) + + + def test_delete_dashboard_error_400(self) -> None: + """Integration test for delete_dashboard error path (HTTP 400)""" + dashboard_id = '646f4d2ce3c99b0536c3821e' + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "errors" : [ { + "code" : "code", + "field" : "field", + "message" : "message" + }, { + "code" : "code", + "field" : "field", + "message" : "message" + } ], + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(400) + ) as context: + self.api.delete_dashboard( + + dashboard_id=dashboard_id, + + aid=aid, + + _headers=self.te_headers("delete_dashboard", error_status="400"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_delete_dashboard_error_401(self) -> None: + """Integration test for delete_dashboard error path (HTTP 401)""" + dashboard_id = '646f4d2ce3c99b0536c3821e' + aid = '1234' + error_body_json = """ + { + "error_description" : "Invalid access token", + "error" : "invalid_token" + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(401) + ) as context: + self.api.delete_dashboard( + + dashboard_id=dashboard_id, + + aid=aid, + + _headers=self.te_headers("delete_dashboard", error_status="401"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_delete_dashboard_error_403(self) -> None: + """Integration test for delete_dashboard error path (HTTP 403)""" + dashboard_id = '646f4d2ce3c99b0536c3821e' + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 6 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(403) + ) as context: + self.api.delete_dashboard( + + dashboard_id=dashboard_id, + + aid=aid, + + _headers=self.te_headers("delete_dashboard", error_status="403"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_delete_dashboard_error_404(self) -> None: + """Integration test for delete_dashboard error path (HTTP 404)""" + dashboard_id = '646f4d2ce3c99b0536c3821e' + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 6 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(404) + ) as context: + self.api.delete_dashboard( + + dashboard_id=dashboard_id, + + aid=aid, + + _headers=self.te_headers("delete_dashboard", error_status="404"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_delete_dashboard_error_429(self) -> None: + """Integration test for delete_dashboard error path (HTTP 429)""" + dashboard_id = '646f4d2ce3c99b0536c3821e' + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 6 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(429) + ) as context: + self.api.delete_dashboard( + + dashboard_id=dashboard_id, + + aid=aid, + + _headers=self.te_headers("delete_dashboard", error_status="429"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_delete_dashboard_error_500(self) -> None: + """Integration test for delete_dashboard error path (HTTP 500)""" + dashboard_id = '646f4d2ce3c99b0536c3821e' + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 6 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(500) + ) as context: + self.api.delete_dashboard( - dashboard=dashboard, + dashboard_id=dashboard_id, aid=aid, - _headers=self.te_headers("create_dashboard", error_status="500"), + _headers=self.te_headers("delete_dashboard", error_status="500"), ) assert_constructed_model_matches_example_json(context.exception.data, expected_error) - def test_delete_dashboard_happy_path(self) -> None: - """Integration test for delete_dashboard success path""" + def test_delete_dashboard_schedule_happy_path(self) -> None: + """Integration test for delete_dashboard_schedule success path""" dashboard_id = '646f4d2ce3c99b0536c3821e' aid = '1234' - response = self.api.delete_dashboard_with_http_info( + response = self.api.delete_dashboard_schedule_with_http_info( dashboard_id=dashboard_id, aid=aid, - _headers=self.te_headers("delete_dashboard"), + _headers=self.te_headers("delete_dashboard_schedule"), ) self.assertEqual(204, response.status_code) self.assertIsNone(response.data) - def test_delete_dashboard_error_400(self) -> None: - """Integration test for delete_dashboard error path (HTTP 400)""" + def test_delete_dashboard_schedule_error_400(self) -> None: + """Integration test for delete_dashboard_schedule error path (HTTP 400)""" dashboard_id = '646f4d2ce3c99b0536c3821e' aid = '1234' error_body_json = """ @@ -1373,19 +2190,19 @@ def test_delete_dashboard_error_400(self) -> None: with self.assertRaises( ApiException.exception_class_for_http_status(400) ) as context: - self.api.delete_dashboard( + self.api.delete_dashboard_schedule( dashboard_id=dashboard_id, aid=aid, - _headers=self.te_headers("delete_dashboard", error_status="400"), + _headers=self.te_headers("delete_dashboard_schedule", error_status="400"), ) assert_constructed_model_matches_example_json(context.exception.data, expected_error) - def test_delete_dashboard_error_401(self) -> None: - """Integration test for delete_dashboard error path (HTTP 401)""" + def test_delete_dashboard_schedule_error_401(self) -> None: + """Integration test for delete_dashboard_schedule error path (HTTP 401)""" dashboard_id = '646f4d2ce3c99b0536c3821e' aid = '1234' error_body_json = """ @@ -1398,19 +2215,19 @@ def test_delete_dashboard_error_401(self) -> None: with self.assertRaises( ApiException.exception_class_for_http_status(401) ) as context: - self.api.delete_dashboard( + self.api.delete_dashboard_schedule( dashboard_id=dashboard_id, aid=aid, - _headers=self.te_headers("delete_dashboard", error_status="401"), + _headers=self.te_headers("delete_dashboard_schedule", error_status="401"), ) assert_constructed_model_matches_example_json(context.exception.data, expected_error) - def test_delete_dashboard_error_403(self) -> None: - """Integration test for delete_dashboard error path (HTTP 403)""" + def test_delete_dashboard_schedule_error_403(self) -> None: + """Integration test for delete_dashboard_schedule error path (HTTP 403)""" dashboard_id = '646f4d2ce3c99b0536c3821e' aid = '1234' error_body_json = """ @@ -1426,19 +2243,19 @@ def test_delete_dashboard_error_403(self) -> None: with self.assertRaises( ApiException.exception_class_for_http_status(403) ) as context: - self.api.delete_dashboard( + self.api.delete_dashboard_schedule( dashboard_id=dashboard_id, aid=aid, - _headers=self.te_headers("delete_dashboard", error_status="403"), + _headers=self.te_headers("delete_dashboard_schedule", error_status="403"), ) assert_constructed_model_matches_example_json(context.exception.data, expected_error) - def test_delete_dashboard_error_404(self) -> None: - """Integration test for delete_dashboard error path (HTTP 404)""" + def test_delete_dashboard_schedule_error_404(self) -> None: + """Integration test for delete_dashboard_schedule error path (HTTP 404)""" dashboard_id = '646f4d2ce3c99b0536c3821e' aid = '1234' error_body_json = """ @@ -1454,19 +2271,47 @@ def test_delete_dashboard_error_404(self) -> None: with self.assertRaises( ApiException.exception_class_for_http_status(404) ) as context: - self.api.delete_dashboard( + self.api.delete_dashboard_schedule( dashboard_id=dashboard_id, aid=aid, - _headers=self.te_headers("delete_dashboard", error_status="404"), + _headers=self.te_headers("delete_dashboard_schedule", error_status="404"), ) assert_constructed_model_matches_example_json(context.exception.data, expected_error) - def test_delete_dashboard_error_429(self) -> None: - """Integration test for delete_dashboard error path (HTTP 429)""" + def test_delete_dashboard_schedule_error_409(self) -> None: + """Integration test for delete_dashboard_schedule error path (HTTP 409)""" + dashboard_id = '646f4d2ce3c99b0536c3821e' + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 6 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(409) + ) as context: + self.api.delete_dashboard_schedule( + + dashboard_id=dashboard_id, + + aid=aid, + + _headers=self.te_headers("delete_dashboard_schedule", error_status="409"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_delete_dashboard_schedule_error_429(self) -> None: + """Integration test for delete_dashboard_schedule error path (HTTP 429)""" dashboard_id = '646f4d2ce3c99b0536c3821e' aid = '1234' error_body_json = """ @@ -1482,19 +2327,19 @@ def test_delete_dashboard_error_429(self) -> None: with self.assertRaises( ApiException.exception_class_for_http_status(429) ) as context: - self.api.delete_dashboard( + self.api.delete_dashboard_schedule( dashboard_id=dashboard_id, aid=aid, - _headers=self.te_headers("delete_dashboard", error_status="429"), + _headers=self.te_headers("delete_dashboard_schedule", error_status="429"), ) assert_constructed_model_matches_example_json(context.exception.data, expected_error) - def test_delete_dashboard_error_500(self) -> None: - """Integration test for delete_dashboard error path (HTTP 500)""" + def test_delete_dashboard_schedule_error_500(self) -> None: + """Integration test for delete_dashboard_schedule error path (HTTP 500)""" dashboard_id = '646f4d2ce3c99b0536c3821e' aid = '1234' error_body_json = """ @@ -1510,13 +2355,13 @@ def test_delete_dashboard_error_500(self) -> None: with self.assertRaises( ApiException.exception_class_for_http_status(500) ) as context: - self.api.delete_dashboard( + self.api.delete_dashboard_schedule( dashboard_id=dashboard_id, aid=aid, - _headers=self.te_headers("delete_dashboard", error_status="500"), + _headers=self.te_headers("delete_dashboard_schedule", error_status="500"), ) assert_constructed_model_matches_example_json(context.exception.data, expected_error) @@ -1660,6 +2505,7 @@ def test_get_dashboard_happy_path(self) -> None: } ] } }, + "schedule" : "", "accountId" : 1234, "apiLink" : [ { "key" : "" @@ -2812,6 +3658,7 @@ def test_get_dashboards_happy_path(self) -> None: } ] } }, + "schedule" : "", "accountId" : 1234, "apiLink" : [ { "key" : "" @@ -2957,6 +3804,7 @@ def test_get_dashboards_happy_path(self) -> None: } ] } }, + "schedule" : "", "accountId" : 1234, "apiLink" : [ { "key" : "" @@ -3974,6 +4822,7 @@ def test_update_dashboard_happy_path(self) -> None: } }, "globalFilterId" : "65babd9bb90bf55b17c96c8d", + "schedule" : "", "dashboardId" : "5e1f7a99143ae6004fdc3bb4", "createdBy" : "1", "refreshRate" : "off", @@ -4115,6 +4964,7 @@ def test_update_dashboard_happy_path(self) -> None: } }, "globalFilterId" : "65babd9bb90bf55b17c96c8d", + "schedule" : "", "dashboardId" : "5e1f7a99143ae6004fdc3bb4", "createdBy" : "1", "refreshRate" : "off", @@ -4269,6 +5119,7 @@ def test_update_dashboard_error_400(self) -> None: } }, "globalFilterId" : "65babd9bb90bf55b17c96c8d", + "schedule" : "", "dashboardId" : "5e1f7a99143ae6004fdc3bb4", "createdBy" : "1", "refreshRate" : "off", @@ -4448,6 +5299,7 @@ def test_update_dashboard_error_401(self) -> None: } }, "globalFilterId" : "65babd9bb90bf55b17c96c8d", + "schedule" : "", "dashboardId" : "5e1f7a99143ae6004fdc3bb4", "createdBy" : "1", "refreshRate" : "off", @@ -4615,6 +5467,7 @@ def test_update_dashboard_error_403(self) -> None: } }, "globalFilterId" : "65babd9bb90bf55b17c96c8d", + "schedule" : "", "dashboardId" : "5e1f7a99143ae6004fdc3bb4", "createdBy" : "1", "refreshRate" : "off", @@ -4785,6 +5638,7 @@ def test_update_dashboard_error_404(self) -> None: } }, "globalFilterId" : "65babd9bb90bf55b17c96c8d", + "schedule" : "", "dashboardId" : "5e1f7a99143ae6004fdc3bb4", "createdBy" : "1", "refreshRate" : "off", @@ -4955,6 +5809,7 @@ def test_update_dashboard_error_429(self) -> None: } }, "globalFilterId" : "65babd9bb90bf55b17c96c8d", + "schedule" : "", "dashboardId" : "5e1f7a99143ae6004fdc3bb4", "createdBy" : "1", "refreshRate" : "off", @@ -5022,7 +5877,210 @@ def test_update_dashboard_error_500(self) -> None: "title" : "title" } }, - "isDefaultForAccount" : false, + "isDefaultForAccount" : false, + "isDefaultForUser" : true, + "description" : "HTTP Server Widgets", + "isPrivate" : true, + "title" : "HTTP Server Widgets", + "isBuiltIn" : true, + "widgets" : [ { + "embedUrl" : "https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f", + "shouldExcludeAlertSuppressionWindows" : true, + "_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" + } + }, + "visualMode" : "Full", + "filters" : { + "TEST" : [ 5187, 5227 ], + "ENDPOINT_MACHINE_ID" : [ "fbd0050c-07f7-43f7-9631-14b32f096962" ] + }, + "title" : "Widget Title", + "type" : "Agent Status", + "metricGroup" : "BGP", + "measure" : { + "percentileValue" : 95, + "type" : "MEAN" + }, + "apiLink" : "apiLink", + "metric" : "ENDPOINT_GATEWAY_CPU_LOAD_PERCENT", + "isEmbedded" : true, + "id" : "1234", + "fixedTimespan" : { + "unit" : "Days", + "value" : 10 + }, + "dataSource" : "ENDPOINT_AGENTS", + "direction" : "FROM_TARGET" + }, { + "embedUrl" : "https://embed.thousandeyes.com/e/00aa:3039802d-5c76-42d2-9a93-c6e5f9d3122f", + "shouldExcludeAlertSuppressionWindows" : true, + "_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" + } + }, + "visualMode" : "Full", + "filters" : { + "TEST" : [ 5187, 5227 ], + "ENDPOINT_MACHINE_ID" : [ "fbd0050c-07f7-43f7-9631-14b32f096962" ] + }, + "title" : "Widget Title", + "type" : "Agent Status", + "metricGroup" : "BGP", + "measure" : { + "percentileValue" : 95, + "type" : "MEAN" + }, + "apiLink" : "apiLink", + "metric" : "ENDPOINT_GATEWAY_CPU_LOAD_PERCENT", + "isEmbedded" : true, + "id" : "1234", + "fixedTimespan" : { + "unit" : "Days", + "value" : 10 + }, + "dataSource" : "ENDPOINT_AGENTS", + "direction" : "FROM_TARGET" + } ], + "defaultTimespan" : { + "duration" : 7200, + "timespanDuration" : 7200, + "start" : "2023-05-16T10:14:28Z", + "end" : "2023-05-16T11:14:28Z", + "timespanStart" : "2023-05-16 10:14:28", + "timespanEnd" : "2023-05-16 11:14:28" + }, + "layout" : { + "layoutId" : "grid-layout-1", + "type" : "grid", + "details" : { + "widgetPositioning" : [ { + "x" : 0, + "y" : 0, + "w" : 9, + "h" : 5, + "id" : "widgetId-71lbb" + } ] + } + }, + "globalFilterId" : "65babd9bb90bf55b17c96c8d", + "schedule" : "", + "dashboardId" : "5e1f7a99143ae6004fdc3bb4", + "createdBy" : "1", + "refreshRate" : "off", + "modifiedDate" : "2023-05-16T10:14:28Z", + "modifiedBy" : "1", + "isGlobalOverride" : true, + "aid" : "1234" + } + + """ + dashboard = thousandeyes_sdk.dashboards.models.Dashboard.from_json(request_body_json) + dashboard_id = '646f4d2ce3c99b0536c3821e' + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 6 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(500) + ) as context: + self.api.update_dashboard( + + dashboard_id=dashboard_id, + + dashboard=dashboard, + + aid=aid, + + _headers=self.te_headers("update_dashboard", error_status="500"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + + + def test_update_dashboard_schedule_happy_path(self) -> None: + """Integration test for update_dashboard_schedule success path""" + request_body_json = """ + + { + "expiresAfter" : 157680000, + "cronSpec" : { + "repeat" : "EVERY_WEEK", + "endRepeat" : { + "endConditionType" : "NEVER" + }, + "startTime" : 1753200000, + "zoneCode" : "America/Los_Angeles" + }, + "flagLocked" : false, + "recipients" : [ "alice@example.com", "bob@example.com" ], + "flagAutoShare" : false, + "dataTimespan" : { + "period" : "WEEK", + "n" : 1 + }, + "flagAttachPdfToEmail" : true, + "dataSource" : { + "name" : "Weekly network report" + }, + "flagIsIncludePiiUserData" : false, + "flagEnabled" : true + } + + """ + dashboard_schedule_request = thousandeyes_sdk.dashboards.models.DashboardScheduleRequest.from_json(request_body_json) + dashboard_id = '646f4d2ce3c99b0536c3821e' + aid = '1234' + response_body_json = """ + { + "isMigratedReport" : false, + "dashboardCreatedBy" : "1", + "_links" : { + "snapshots" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + }, + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, "isDefaultForUser" : true, "description" : "HTTP Server Widgets", "isPrivate" : true, @@ -5103,6 +6161,12 @@ def test_update_dashboard_error_500(self) -> None: "dataSource" : "ENDPOINT_AGENTS", "direction" : "FROM_TARGET" } ], + "globalFilterId" : "65babd9bb90bf55b17c96c8d", + "refreshRate" : "off", + "modifiedBy" : 1, + "dashboardModifiedBy" : "1", + "migratedReport" : false, + "isDefaultForAccount" : false, "defaultTimespan" : { "duration" : 7200, "timespanDuration" : 7200, @@ -5124,18 +6188,427 @@ def test_update_dashboard_error_500(self) -> None: } ] } }, - "globalFilterId" : "65babd9bb90bf55b17c96c8d", + "schedule" : "", + "accountId" : 1234, + "apiLink" : [ { + "key" : "" + }, { + "key" : "" + } ], "dashboardId" : "5e1f7a99143ae6004fdc3bb4", - "createdBy" : "1", - "refreshRate" : "off", - "modifiedDate" : "2023-05-16T10:14:28Z", - "modifiedBy" : "1", + "createdBy" : 1, + "globalOverride" : true, + "modifiedDate" : "2023-05-16 10:14:28", "isGlobalOverride" : true, - "aid" : "1234" + "aid" : "1234", + "dashboardModifiedDate" : "2023-05-16T10:14:28Z" + } + """ + expected_response = json.loads(response_body_json) + response = self.api.update_dashboard_schedule( + + dashboard_id=dashboard_id, + + dashboard_schedule_request=dashboard_schedule_request, + + aid=aid, + + _headers=self.te_headers("update_dashboard_schedule"), + ) + assert_constructed_model_matches_example_json(response, expected_response) + + + def test_update_dashboard_schedule_error_400(self) -> None: + """Integration test for update_dashboard_schedule error path (HTTP 400)""" + request_body_json = """ + + { + "expiresAfter" : 157680000, + "cronSpec" : { + "repeat" : "EVERY_WEEK", + "endRepeat" : { + "endConditionType" : "NEVER" + }, + "startTime" : 1753200000, + "zoneCode" : "America/Los_Angeles" + }, + "flagLocked" : false, + "recipients" : [ "alice@example.com", "bob@example.com" ], + "flagAutoShare" : false, + "dataTimespan" : { + "period" : "WEEK", + "n" : 1 + }, + "flagAttachPdfToEmail" : true, + "dataSource" : { + "name" : "Weekly network report" + }, + "flagIsIncludePiiUserData" : false, + "flagEnabled" : true } """ - dashboard = thousandeyes_sdk.dashboards.models.Dashboard.from_json(request_body_json) + dashboard_schedule_request = thousandeyes_sdk.dashboards.models.DashboardScheduleRequest.from_json(request_body_json) + dashboard_id = '646f4d2ce3c99b0536c3821e' + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "errors" : [ { + "code" : "code", + "field" : "field", + "message" : "message" + }, { + "code" : "code", + "field" : "field", + "message" : "message" + } ], + "status" : 0 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(400) + ) as context: + self.api.update_dashboard_schedule( + + dashboard_id=dashboard_id, + + dashboard_schedule_request=dashboard_schedule_request, + + aid=aid, + + _headers=self.te_headers("update_dashboard_schedule", error_status="400"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_update_dashboard_schedule_error_401(self) -> None: + """Integration test for update_dashboard_schedule error path (HTTP 401)""" + request_body_json = """ + + { + "expiresAfter" : 157680000, + "cronSpec" : { + "repeat" : "EVERY_WEEK", + "endRepeat" : { + "endConditionType" : "NEVER" + }, + "startTime" : 1753200000, + "zoneCode" : "America/Los_Angeles" + }, + "flagLocked" : false, + "recipients" : [ "alice@example.com", "bob@example.com" ], + "flagAutoShare" : false, + "dataTimespan" : { + "period" : "WEEK", + "n" : 1 + }, + "flagAttachPdfToEmail" : true, + "dataSource" : { + "name" : "Weekly network report" + }, + "flagIsIncludePiiUserData" : false, + "flagEnabled" : true + } + + """ + dashboard_schedule_request = thousandeyes_sdk.dashboards.models.DashboardScheduleRequest.from_json(request_body_json) + dashboard_id = '646f4d2ce3c99b0536c3821e' + aid = '1234' + error_body_json = """ + { + "error_description" : "Invalid access token", + "error" : "invalid_token" + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(401) + ) as context: + self.api.update_dashboard_schedule( + + dashboard_id=dashboard_id, + + dashboard_schedule_request=dashboard_schedule_request, + + aid=aid, + + _headers=self.te_headers("update_dashboard_schedule", error_status="401"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_update_dashboard_schedule_error_403(self) -> None: + """Integration test for update_dashboard_schedule error path (HTTP 403)""" + request_body_json = """ + + { + "expiresAfter" : 157680000, + "cronSpec" : { + "repeat" : "EVERY_WEEK", + "endRepeat" : { + "endConditionType" : "NEVER" + }, + "startTime" : 1753200000, + "zoneCode" : "America/Los_Angeles" + }, + "flagLocked" : false, + "recipients" : [ "alice@example.com", "bob@example.com" ], + "flagAutoShare" : false, + "dataTimespan" : { + "period" : "WEEK", + "n" : 1 + }, + "flagAttachPdfToEmail" : true, + "dataSource" : { + "name" : "Weekly network report" + }, + "flagIsIncludePiiUserData" : false, + "flagEnabled" : true + } + + """ + dashboard_schedule_request = thousandeyes_sdk.dashboards.models.DashboardScheduleRequest.from_json(request_body_json) + dashboard_id = '646f4d2ce3c99b0536c3821e' + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 6 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(403) + ) as context: + self.api.update_dashboard_schedule( + + dashboard_id=dashboard_id, + + dashboard_schedule_request=dashboard_schedule_request, + + aid=aid, + + _headers=self.te_headers("update_dashboard_schedule", error_status="403"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_update_dashboard_schedule_error_404(self) -> None: + """Integration test for update_dashboard_schedule error path (HTTP 404)""" + request_body_json = """ + + { + "expiresAfter" : 157680000, + "cronSpec" : { + "repeat" : "EVERY_WEEK", + "endRepeat" : { + "endConditionType" : "NEVER" + }, + "startTime" : 1753200000, + "zoneCode" : "America/Los_Angeles" + }, + "flagLocked" : false, + "recipients" : [ "alice@example.com", "bob@example.com" ], + "flagAutoShare" : false, + "dataTimespan" : { + "period" : "WEEK", + "n" : 1 + }, + "flagAttachPdfToEmail" : true, + "dataSource" : { + "name" : "Weekly network report" + }, + "flagIsIncludePiiUserData" : false, + "flagEnabled" : true + } + + """ + dashboard_schedule_request = thousandeyes_sdk.dashboards.models.DashboardScheduleRequest.from_json(request_body_json) + dashboard_id = '646f4d2ce3c99b0536c3821e' + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 6 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(404) + ) as context: + self.api.update_dashboard_schedule( + + dashboard_id=dashboard_id, + + dashboard_schedule_request=dashboard_schedule_request, + + aid=aid, + + _headers=self.te_headers("update_dashboard_schedule", error_status="404"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_update_dashboard_schedule_error_409(self) -> None: + """Integration test for update_dashboard_schedule error path (HTTP 409)""" + request_body_json = """ + + { + "expiresAfter" : 157680000, + "cronSpec" : { + "repeat" : "EVERY_WEEK", + "endRepeat" : { + "endConditionType" : "NEVER" + }, + "startTime" : 1753200000, + "zoneCode" : "America/Los_Angeles" + }, + "flagLocked" : false, + "recipients" : [ "alice@example.com", "bob@example.com" ], + "flagAutoShare" : false, + "dataTimespan" : { + "period" : "WEEK", + "n" : 1 + }, + "flagAttachPdfToEmail" : true, + "dataSource" : { + "name" : "Weekly network report" + }, + "flagIsIncludePiiUserData" : false, + "flagEnabled" : true + } + + """ + dashboard_schedule_request = thousandeyes_sdk.dashboards.models.DashboardScheduleRequest.from_json(request_body_json) + dashboard_id = '646f4d2ce3c99b0536c3821e' + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 6 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(409) + ) as context: + self.api.update_dashboard_schedule( + + dashboard_id=dashboard_id, + + dashboard_schedule_request=dashboard_schedule_request, + + aid=aid, + + _headers=self.te_headers("update_dashboard_schedule", error_status="409"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_update_dashboard_schedule_error_429(self) -> None: + """Integration test for update_dashboard_schedule error path (HTTP 429)""" + request_body_json = """ + + { + "expiresAfter" : 157680000, + "cronSpec" : { + "repeat" : "EVERY_WEEK", + "endRepeat" : { + "endConditionType" : "NEVER" + }, + "startTime" : 1753200000, + "zoneCode" : "America/Los_Angeles" + }, + "flagLocked" : false, + "recipients" : [ "alice@example.com", "bob@example.com" ], + "flagAutoShare" : false, + "dataTimespan" : { + "period" : "WEEK", + "n" : 1 + }, + "flagAttachPdfToEmail" : true, + "dataSource" : { + "name" : "Weekly network report" + }, + "flagIsIncludePiiUserData" : false, + "flagEnabled" : true + } + + """ + dashboard_schedule_request = thousandeyes_sdk.dashboards.models.DashboardScheduleRequest.from_json(request_body_json) + dashboard_id = '646f4d2ce3c99b0536c3821e' + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 6 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(429) + ) as context: + self.api.update_dashboard_schedule( + + dashboard_id=dashboard_id, + + dashboard_schedule_request=dashboard_schedule_request, + + aid=aid, + + _headers=self.te_headers("update_dashboard_schedule", error_status="429"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + + def test_update_dashboard_schedule_error_500(self) -> None: + """Integration test for update_dashboard_schedule error path (HTTP 500)""" + request_body_json = """ + + { + "expiresAfter" : 157680000, + "cronSpec" : { + "repeat" : "EVERY_WEEK", + "endRepeat" : { + "endConditionType" : "NEVER" + }, + "startTime" : 1753200000, + "zoneCode" : "America/Los_Angeles" + }, + "flagLocked" : false, + "recipients" : [ "alice@example.com", "bob@example.com" ], + "flagAutoShare" : false, + "dataTimespan" : { + "period" : "WEEK", + "n" : 1 + }, + "flagAttachPdfToEmail" : true, + "dataSource" : { + "name" : "Weekly network report" + }, + "flagIsIncludePiiUserData" : false, + "flagEnabled" : true + } + + """ + dashboard_schedule_request = thousandeyes_sdk.dashboards.models.DashboardScheduleRequest.from_json(request_body_json) dashboard_id = '646f4d2ce3c99b0536c3821e' aid = '1234' error_body_json = """ @@ -5151,15 +6624,15 @@ def test_update_dashboard_error_500(self) -> None: with self.assertRaises( ApiException.exception_class_for_http_status(500) ) as context: - self.api.update_dashboard( + self.api.update_dashboard_schedule( dashboard_id=dashboard_id, - dashboard=dashboard, + dashboard_schedule_request=dashboard_schedule_request, aid=aid, - _headers=self.te_headers("update_dashboard", error_status="500"), + _headers=self.te_headers("update_dashboard_schedule", error_status="500"), ) assert_constructed_model_matches_example_json(context.exception.data, expected_error) diff --git a/thousandeyes-sdk-emulation/README.md b/thousandeyes-sdk-emulation/README.md index da14ead6a..3af4487d0 100644 --- a/thousandeyes-sdk-emulation/README.md +++ b/thousandeyes-sdk-emulation/README.md @@ -11,7 +11,7 @@ To access Emulation API operations, the following permissions are required: This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.99 +- API version: 7.0.101 - 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 74f0aa962..70e7060a7 100644 --- a/thousandeyes-sdk-endpoint-agents/README.md +++ b/thousandeyes-sdk-endpoint-agents/README.md @@ -7,7 +7,7 @@ For more information about Endpoint Agents, see [Endpoint Agents](https://docs.t This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.99 +- API version: 7.0.101 - 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 7fcdb2374..44280e210 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/README.md +++ b/thousandeyes-sdk-endpoint-instant-tests/README.md @@ -12,7 +12,7 @@ The URLs for these API test data endpoints are provided within the test definiti This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.99 +- API version: 7.0.101 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-endpoint-labels/README.md b/thousandeyes-sdk-endpoint-labels/README.md index 97a722766..873417ea3 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.99 +- API version: 7.0.101 - 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 a251bb352..77e87b397 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.99 +- API version: 7.0.101 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-endpoint-test-results/docs/HttpEndpointTestResults.md b/thousandeyes-sdk-endpoint-test-results/docs/HttpEndpointTestResults.md index 7b7f85466..874967948 100644 --- a/thousandeyes-sdk-endpoint-test-results/docs/HttpEndpointTestResults.md +++ b/thousandeyes-sdk-endpoint-test-results/docs/HttpEndpointTestResults.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **results** | [**List[HttpEndpointTestResult]**](HttpEndpointTestResult.md) | | [optional] **total_hits** | **int** | Total number of measurements that match the search criteria. | [optional] -**test** | [**EndpointHttpServerTest**](EndpointHttpServerTest.md) | | [optional] +**test** | [**EndpointHttpServerTest**](EndpointHttpServerTest.md) | The scheduled test configuration. Omitted when the user lacks the `View endpoint experience tests` permission. | [optional] **start_date** | **datetime** | (Optional) When passing `window` or `startDate` parameter, the client will also receive the `startDate` field indicating the UTC start date of the data's time range being retrieved (ISO date-time format). | [optional] [readonly] **end_date** | **datetime** | (Optional) When passing `window` or `endDate` parameter, the client will also receive the `endDate` field indicating the UTC end date of the data's time range being retrieved (ISO date-time format). | [optional] [readonly] **links** | [**PaginationNextAndSelfLink**](PaginationNextAndSelfLink.md) | | [optional] diff --git a/thousandeyes-sdk-endpoint-test-results/docs/NetworkEndpointTestResults.md b/thousandeyes-sdk-endpoint-test-results/docs/NetworkEndpointTestResults.md index 8e2052c4c..c78f0190f 100644 --- a/thousandeyes-sdk-endpoint-test-results/docs/NetworkEndpointTestResults.md +++ b/thousandeyes-sdk-endpoint-test-results/docs/NetworkEndpointTestResults.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **results** | [**List[NetworkEndpointTestResult]**](NetworkEndpointTestResult.md) | | [optional] **total_hits** | **int** | Total number of measurements that match the search criteria. | [optional] -**test** | [**EndpointScheduledTest**](EndpointScheduledTest.md) | | [optional] +**test** | [**EndpointScheduledTest**](EndpointScheduledTest.md) | The scheduled test configuration. Omitted when the user lacks the `View endpoint experience tests` permission. | [optional] **start_date** | **datetime** | (Optional) When passing `window` or `startDate` parameter, the client will also receive the `startDate` field indicating the UTC start date of the data's time range being retrieved (ISO date-time format). | [optional] [readonly] **end_date** | **datetime** | (Optional) When passing `window` or `endDate` parameter, the client will also receive the `endDate` field indicating the UTC end date of the data's time range being retrieved (ISO date-time format). | [optional] [readonly] **links** | [**PaginationNextLink**](PaginationNextLink.md) | | [optional] diff --git a/thousandeyes-sdk-endpoint-test-results/docs/PathVisDetailEndpointTestResults.md b/thousandeyes-sdk-endpoint-test-results/docs/PathVisDetailEndpointTestResults.md index 7437365d9..130be56ac 100644 --- a/thousandeyes-sdk-endpoint-test-results/docs/PathVisDetailEndpointTestResults.md +++ b/thousandeyes-sdk-endpoint-test-results/docs/PathVisDetailEndpointTestResults.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **results** | [**List[PathVisDetailEndpointTestResult]**](PathVisDetailEndpointTestResult.md) | | [optional] -**test** | [**EndpointScheduledTest**](EndpointScheduledTest.md) | | [optional] +**test** | [**EndpointScheduledTest**](EndpointScheduledTest.md) | The scheduled test configuration. Omitted when the user lacks the `View endpoint experience tests` permission. | [optional] **links** | [**SelfLinks**](SelfLinks.md) | | [optional] ## Example diff --git a/thousandeyes-sdk-endpoint-test-results/docs/PathVisEndpointTestResults.md b/thousandeyes-sdk-endpoint-test-results/docs/PathVisEndpointTestResults.md index 621a8b827..ea90a6d3a 100644 --- a/thousandeyes-sdk-endpoint-test-results/docs/PathVisEndpointTestResults.md +++ b/thousandeyes-sdk-endpoint-test-results/docs/PathVisEndpointTestResults.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **results** | [**List[PathVisEndpointTestResult]**](PathVisEndpointTestResult.md) | | [optional] -**test** | [**EndpointScheduledTest**](EndpointScheduledTest.md) | | [optional] +**test** | [**EndpointScheduledTest**](EndpointScheduledTest.md) | The scheduled test configuration. Omitted when the user lacks the `View endpoint experience tests` permission. | [optional] **start_date** | **datetime** | (Optional) When passing `window` or `startDate` parameter, the client will also receive the `startDate` field indicating the UTC start date of the data's time range being retrieved (ISO date-time format). | [optional] [readonly] **end_date** | **datetime** | (Optional) When passing `window` or `endDate` parameter, the client will also receive the `endDate` field indicating the UTC end date of the data's time range being retrieved (ISO date-time format). | [optional] [readonly] **links** | [**PaginationNextAndSelfLink**](PaginationNextAndSelfLink.md) | | [optional] diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/http_endpoint_test_results.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/http_endpoint_test_results.py index e402eabfd..9a845ded6 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/http_endpoint_test_results.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/http_endpoint_test_results.py @@ -31,7 +31,7 @@ class HttpEndpointTestResults(BaseModel): """ # noqa: E501 results: Optional[List[HttpEndpointTestResult]] = None total_hits: Optional[StrictInt] = Field(default=None, description="Total number of measurements that match the search criteria.", alias="totalHits") - test: Optional[EndpointHttpServerTest] = None + test: Optional[EndpointHttpServerTest] = Field(default=None, description="The scheduled test configuration. Omitted when the user lacks the `View endpoint experience tests` permission.") start_date: Optional[datetime] = Field(default=None, description="(Optional) When passing `window` or `startDate` parameter, the client will also receive the `startDate` field indicating the UTC start date of the data's time range being retrieved (ISO date-time format).", alias="startDate") end_date: Optional[datetime] = Field(default=None, description="(Optional) When passing `window` or `endDate` parameter, the client will also receive the `endDate` field indicating the UTC end date of the data's time range being retrieved (ISO date-time format).", alias="endDate") links: Optional[PaginationNextAndSelfLink] = Field(default=None, alias="_links") diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_endpoint_test_results.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_endpoint_test_results.py index 7507e0a1c..8cf5905cc 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_endpoint_test_results.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_endpoint_test_results.py @@ -31,7 +31,7 @@ class NetworkEndpointTestResults(BaseModel): """ # noqa: E501 results: Optional[List[NetworkEndpointTestResult]] = None total_hits: Optional[StrictInt] = Field(default=None, description="Total number of measurements that match the search criteria.", alias="totalHits") - test: Optional[EndpointScheduledTest] = None + test: Optional[EndpointScheduledTest] = Field(default=None, description="The scheduled test configuration. Omitted when the user lacks the `View endpoint experience tests` permission.") start_date: Optional[datetime] = Field(default=None, description="(Optional) When passing `window` or `startDate` parameter, the client will also receive the `startDate` field indicating the UTC start date of the data's time range being retrieved (ISO date-time format).", alias="startDate") end_date: Optional[datetime] = Field(default=None, description="(Optional) When passing `window` or `endDate` parameter, the client will also receive the `endDate` field indicating the UTC end date of the data's time range being retrieved (ISO date-time format).", alias="endDate") links: Optional[PaginationNextLink] = Field(default=None, alias="_links") diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_detail_endpoint_test_results.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_detail_endpoint_test_results.py index 190156eb3..bdda418bb 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_detail_endpoint_test_results.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_detail_endpoint_test_results.py @@ -29,7 +29,7 @@ class PathVisDetailEndpointTestResults(BaseModel): PathVisDetailEndpointTestResults """ # noqa: E501 results: Optional[List[PathVisDetailEndpointTestResult]] = None - test: Optional[EndpointScheduledTest] = None + test: Optional[EndpointScheduledTest] = Field(default=None, description="The scheduled test configuration. Omitted when the user lacks the `View endpoint experience tests` permission.") links: Optional[SelfLinks] = Field(default=None, alias="_links") __properties: ClassVar[List[str]] = ["results", "test", "_links"] diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_endpoint_test_results.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_endpoint_test_results.py index 2b87ea432..ce00f69ad 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_endpoint_test_results.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_endpoint_test_results.py @@ -30,7 +30,7 @@ class PathVisEndpointTestResults(BaseModel): PathVisEndpointTestResults """ # noqa: E501 results: Optional[List[PathVisEndpointTestResult]] = None - test: Optional[EndpointScheduledTest] = None + test: Optional[EndpointScheduledTest] = Field(default=None, description="The scheduled test configuration. Omitted when the user lacks the `View endpoint experience tests` permission.") start_date: Optional[datetime] = Field(default=None, description="(Optional) When passing `window` or `startDate` parameter, the client will also receive the `startDate` field indicating the UTC start date of the data's time range being retrieved (ISO date-time format).", alias="startDate") end_date: Optional[datetime] = Field(default=None, description="(Optional) When passing `window` or `endDate` parameter, the client will also receive the `endDate` field indicating the UTC end date of the data's time range being retrieved (ISO date-time format).", alias="endDate") links: Optional[PaginationNextAndSelfLink] = Field(default=None, alias="_links") diff --git a/thousandeyes-sdk-endpoint-test-results/test/mock_manifest.py b/thousandeyes-sdk-endpoint-test-results/test/mock_manifest.py index 494f9764f..7aaf35a8f 100644 --- a/thousandeyes-sdk-endpoint-test-results/test/mock_manifest.py +++ b/thousandeyes-sdk-endpoint-test-results/test/mock_manifest.py @@ -28,66 +28,7 @@ success_body=json.loads(""" { - "test" : { - "server" : "www.example.com", - "isSavedEvent" : false, - "sslVersion" : "Auto", - "useNtlm" : false, - "_links" : { - "testResults" : [ { - "href" : "https://api.thousandeyes.com/v7/endpoint/test-results/scheduled-tests/281474976710706/network/filter" - }, { - "href" : "https://api.thousandeyes.com/v7/endpoint/test-results/scheduled-tests/281474976710706/pathvis" - } ], - "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" - } - }, - "isPrioritized" : false, - "httpTimeLimit" : 5000, - "type" : "http-server", - "protocol" : "icmp", - "httpVersion" : 2, - "followRedirects" : true, - "authType" : "none", - "testName" : "Test name", - "verifyCertificate" : true, - "networkMeasurements" : true, - "tcpProbeMode" : "auto", - "url" : "https://example.com:443", - "labels" : [ { - "labelId" : "961", - "name" : "Artem label", - "isBuiltin" : false - }, { - "labelId" : "961", - "name" : "Artem label", - "isBuiltin" : false - } ], - "createdDate" : "2022-07-17T22:00:54Z", - "ipVersion" : "V4_ONLY", - "port" : 443, - "isEnabled" : true, - "modifiedDate" : "2022-07-17T22:00:54Z", - "interval" : 60, - "testId" : "281474976710706", - "aid" : "1234", - "agentSelectorConfig" : { - "agentSelectorType" : "all-agents", - "maxMachines" : 25 - }, - "hasPathTraceInSession" : true, - "httpTargetTime" : 100, - "username" : "username", - "sslVersionId" : "0" - }, + "test" : "", "totalHits" : 12, "endDate" : "2022-07-18T22:00:54Z", "_links" : { @@ -4182,55 +4123,7 @@ success_body=json.loads(""" { - "test" : { - "server" : "www.example.com", - "isSavedEvent" : false, - "_links" : { - "testResults" : [ { - "href" : "https://api.thousandeyes.com/v7/endpoint/test-results/scheduled-tests/281474976710706/network/filter" - }, { - "href" : "https://api.thousandeyes.com/v7/endpoint/test-results/scheduled-tests/281474976710706/pathvis" - } ], - "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" - } - }, - "isPrioritized" : false, - "networkMeasurements" : true, - "type" : "agent-to-server", - "tcpProbeMode" : "auto", - "labels" : [ { - "labelId" : "961", - "name" : "Artem label", - "isBuiltin" : false - }, { - "labelId" : "961", - "name" : "Artem label", - "isBuiltin" : false - } ], - "protocol" : "icmp", - "createdDate" : "2022-07-17T22:00:54Z", - "ipVersion" : "V4_ONLY", - "port" : 443, - "isEnabled" : true, - "modifiedDate" : "2022-07-17T22:00:54Z", - "interval" : 60, - "testId" : "281474976710706", - "aid" : "1234", - "agentSelectorConfig" : { - "agentSelectorType" : "all-agents", - "maxMachines" : 25 - }, - "hasPathTraceInSession" : true, - "testName" : "Test name" - }, + "test" : "", "totalHits" : 12, "endDate" : "2022-07-18T22:00:54Z", "_links" : { @@ -5044,55 +4937,7 @@ success_body=json.loads(""" { - "test" : { - "server" : "www.example.com", - "isSavedEvent" : false, - "_links" : { - "testResults" : [ { - "href" : "https://api.thousandeyes.com/v7/endpoint/test-results/scheduled-tests/281474976710706/network/filter" - }, { - "href" : "https://api.thousandeyes.com/v7/endpoint/test-results/scheduled-tests/281474976710706/pathvis" - } ], - "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" - } - }, - "isPrioritized" : false, - "networkMeasurements" : true, - "type" : "agent-to-server", - "tcpProbeMode" : "auto", - "labels" : [ { - "labelId" : "961", - "name" : "Artem label", - "isBuiltin" : false - }, { - "labelId" : "961", - "name" : "Artem label", - "isBuiltin" : false - } ], - "protocol" : "icmp", - "createdDate" : "2022-07-17T22:00:54Z", - "ipVersion" : "V4_ONLY", - "port" : 443, - "isEnabled" : true, - "modifiedDate" : "2022-07-17T22:00:54Z", - "interval" : 60, - "testId" : "281474976710706", - "aid" : "1234", - "agentSelectorConfig" : { - "agentSelectorType" : "all-agents", - "maxMachines" : 25 - }, - "hasPathTraceInSession" : true, - "testName" : "Test name" - }, + "test" : "", "_links" : { "self" : { "hreflang" : "hreflang", @@ -5612,55 +5457,7 @@ success_body=json.loads(""" { - "test" : { - "server" : "www.example.com", - "isSavedEvent" : false, - "_links" : { - "testResults" : [ { - "href" : "https://api.thousandeyes.com/v7/endpoint/test-results/scheduled-tests/281474976710706/network/filter" - }, { - "href" : "https://api.thousandeyes.com/v7/endpoint/test-results/scheduled-tests/281474976710706/pathvis" - } ], - "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" - } - }, - "isPrioritized" : false, - "networkMeasurements" : true, - "type" : "agent-to-server", - "tcpProbeMode" : "auto", - "labels" : [ { - "labelId" : "961", - "name" : "Artem label", - "isBuiltin" : false - }, { - "labelId" : "961", - "name" : "Artem label", - "isBuiltin" : false - } ], - "protocol" : "icmp", - "createdDate" : "2022-07-17T22:00:54Z", - "ipVersion" : "V4_ONLY", - "port" : 443, - "isEnabled" : true, - "modifiedDate" : "2022-07-17T22:00:54Z", - "interval" : 60, - "testId" : "281474976710706", - "aid" : "1234", - "agentSelectorConfig" : { - "agentSelectorType" : "all-agents", - "maxMachines" : 25 - }, - "hasPathTraceInSession" : true, - "testName" : "Test name" - }, + "test" : "", "endDate" : "2022-07-18T22:00:54Z", "_links" : { "next" : { diff --git a/thousandeyes-sdk-endpoint-test-results/test/test_http_server_endpoint_scheduled_test_results_api.py b/thousandeyes-sdk-endpoint-test-results/test/test_http_server_endpoint_scheduled_test_results_api.py index 516684ba3..6106de0b9 100644 --- a/thousandeyes-sdk-endpoint-test-results/test/test_http_server_endpoint_scheduled_test_results_api.py +++ b/thousandeyes-sdk-endpoint-test-results/test/test_http_server_endpoint_scheduled_test_results_api.py @@ -33,66 +33,7 @@ def test_get_http_server_scheduled_test_results_models_validation(self) -> None: response_body_json = """ { - "test" : { - "server" : "www.example.com", - "isSavedEvent" : false, - "sslVersion" : "Auto", - "useNtlm" : false, - "_links" : { - "testResults" : [ { - "href" : "https://api.thousandeyes.com/v7/endpoint/test-results/scheduled-tests/281474976710706/network/filter" - }, { - "href" : "https://api.thousandeyes.com/v7/endpoint/test-results/scheduled-tests/281474976710706/pathvis" - } ], - "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" - } - }, - "isPrioritized" : false, - "httpTimeLimit" : 5000, - "type" : "http-server", - "protocol" : "icmp", - "httpVersion" : 2, - "followRedirects" : true, - "authType" : "none", - "testName" : "Test name", - "verifyCertificate" : true, - "networkMeasurements" : true, - "tcpProbeMode" : "auto", - "url" : "https://example.com:443", - "labels" : [ { - "labelId" : "961", - "name" : "Artem label", - "isBuiltin" : false - }, { - "labelId" : "961", - "name" : "Artem label", - "isBuiltin" : false - } ], - "createdDate" : "2022-07-17T22:00:54Z", - "ipVersion" : "V4_ONLY", - "port" : 443, - "isEnabled" : true, - "modifiedDate" : "2022-07-17T22:00:54Z", - "interval" : 60, - "testId" : "281474976710706", - "aid" : "1234", - "agentSelectorConfig" : { - "agentSelectorType" : "all-agents", - "maxMachines" : 25 - }, - "hasPathTraceInSession" : true, - "httpTargetTime" : 100, - "username" : "username", - "sslVersionId" : "0" - }, + "test" : "", "totalHits" : 12, "endDate" : "2022-07-18T22:00:54Z", "_links" : { diff --git a/thousandeyes-sdk-endpoint-test-results/test/test_http_server_endpoint_scheduled_test_results_api_integration.py b/thousandeyes-sdk-endpoint-test-results/test/test_http_server_endpoint_scheduled_test_results_api_integration.py index b5ff2d487..bf0603907 100644 --- a/thousandeyes-sdk-endpoint-test-results/test/test_http_server_endpoint_scheduled_test_results_api_integration.py +++ b/thousandeyes-sdk-endpoint-test-results/test/test_http_server_endpoint_scheduled_test_results_api_integration.py @@ -40,66 +40,7 @@ def test_get_http_server_scheduled_test_results_happy_path(self) -> None: expand = ["header"] response_body_json = """ { - "test" : { - "server" : "www.example.com", - "isSavedEvent" : false, - "sslVersion" : "Auto", - "useNtlm" : false, - "_links" : { - "testResults" : [ { - "href" : "https://api.thousandeyes.com/v7/endpoint/test-results/scheduled-tests/281474976710706/network/filter" - }, { - "href" : "https://api.thousandeyes.com/v7/endpoint/test-results/scheduled-tests/281474976710706/pathvis" - } ], - "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" - } - }, - "isPrioritized" : false, - "httpTimeLimit" : 5000, - "type" : "http-server", - "protocol" : "icmp", - "httpVersion" : 2, - "followRedirects" : true, - "authType" : "none", - "testName" : "Test name", - "verifyCertificate" : true, - "networkMeasurements" : true, - "tcpProbeMode" : "auto", - "url" : "https://example.com:443", - "labels" : [ { - "labelId" : "961", - "name" : "Artem label", - "isBuiltin" : false - }, { - "labelId" : "961", - "name" : "Artem label", - "isBuiltin" : false - } ], - "createdDate" : "2022-07-17T22:00:54Z", - "ipVersion" : "V4_ONLY", - "port" : 443, - "isEnabled" : true, - "modifiedDate" : "2022-07-17T22:00:54Z", - "interval" : 60, - "testId" : "281474976710706", - "aid" : "1234", - "agentSelectorConfig" : { - "agentSelectorType" : "all-agents", - "maxMachines" : 25 - }, - "hasPathTraceInSession" : true, - "httpTargetTime" : 100, - "username" : "username", - "sslVersionId" : "0" - }, + "test" : "", "totalHits" : 12, "endDate" : "2022-07-18T22:00:54Z", "_links" : { diff --git a/thousandeyes-sdk-endpoint-test-results/test/test_network_endpoint_scheduled_test_results_api.py b/thousandeyes-sdk-endpoint-test-results/test/test_network_endpoint_scheduled_test_results_api.py index bee8aaff0..d8fe4e708 100644 --- a/thousandeyes-sdk-endpoint-test-results/test/test_network_endpoint_scheduled_test_results_api.py +++ b/thousandeyes-sdk-endpoint-test-results/test/test_network_endpoint_scheduled_test_results_api.py @@ -66,55 +66,7 @@ def test_filter_scheduled_test_network_results_models_validation(self) -> None: response_body_json = """ { - "test" : { - "server" : "www.example.com", - "isSavedEvent" : false, - "_links" : { - "testResults" : [ { - "href" : "https://api.thousandeyes.com/v7/endpoint/test-results/scheduled-tests/281474976710706/network/filter" - }, { - "href" : "https://api.thousandeyes.com/v7/endpoint/test-results/scheduled-tests/281474976710706/pathvis" - } ], - "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" - } - }, - "isPrioritized" : false, - "networkMeasurements" : true, - "type" : "agent-to-server", - "tcpProbeMode" : "auto", - "labels" : [ { - "labelId" : "961", - "name" : "Artem label", - "isBuiltin" : false - }, { - "labelId" : "961", - "name" : "Artem label", - "isBuiltin" : false - } ], - "protocol" : "icmp", - "createdDate" : "2022-07-17T22:00:54Z", - "ipVersion" : "V4_ONLY", - "port" : 443, - "isEnabled" : true, - "modifiedDate" : "2022-07-17T22:00:54Z", - "interval" : 60, - "testId" : "281474976710706", - "aid" : "1234", - "agentSelectorConfig" : { - "agentSelectorType" : "all-agents", - "maxMachines" : 25 - }, - "hasPathTraceInSession" : true, - "testName" : "Test name" - }, + "test" : "", "totalHits" : 12, "endDate" : "2022-07-18T22:00:54Z", "_links" : { @@ -726,55 +678,7 @@ def test_get_scheduled_test_path_vis_agent_round_results_models_validation(self) response_body_json = """ { - "test" : { - "server" : "www.example.com", - "isSavedEvent" : false, - "_links" : { - "testResults" : [ { - "href" : "https://api.thousandeyes.com/v7/endpoint/test-results/scheduled-tests/281474976710706/network/filter" - }, { - "href" : "https://api.thousandeyes.com/v7/endpoint/test-results/scheduled-tests/281474976710706/pathvis" - } ], - "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" - } - }, - "isPrioritized" : false, - "networkMeasurements" : true, - "type" : "agent-to-server", - "tcpProbeMode" : "auto", - "labels" : [ { - "labelId" : "961", - "name" : "Artem label", - "isBuiltin" : false - }, { - "labelId" : "961", - "name" : "Artem label", - "isBuiltin" : false - } ], - "protocol" : "icmp", - "createdDate" : "2022-07-17T22:00:54Z", - "ipVersion" : "V4_ONLY", - "port" : 443, - "isEnabled" : true, - "modifiedDate" : "2022-07-17T22:00:54Z", - "interval" : 60, - "testId" : "281474976710706", - "aid" : "1234", - "agentSelectorConfig" : { - "agentSelectorType" : "all-agents", - "maxMachines" : 25 - }, - "hasPathTraceInSession" : true, - "testName" : "Test name" - }, + "test" : "", "_links" : { "self" : { "hreflang" : "hreflang", @@ -1207,55 +1111,7 @@ def test_get_scheduled_test_path_vis_results_models_validation(self) -> None: response_body_json = """ { - "test" : { - "server" : "www.example.com", - "isSavedEvent" : false, - "_links" : { - "testResults" : [ { - "href" : "https://api.thousandeyes.com/v7/endpoint/test-results/scheduled-tests/281474976710706/network/filter" - }, { - "href" : "https://api.thousandeyes.com/v7/endpoint/test-results/scheduled-tests/281474976710706/pathvis" - } ], - "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" - } - }, - "isPrioritized" : false, - "networkMeasurements" : true, - "type" : "agent-to-server", - "tcpProbeMode" : "auto", - "labels" : [ { - "labelId" : "961", - "name" : "Artem label", - "isBuiltin" : false - }, { - "labelId" : "961", - "name" : "Artem label", - "isBuiltin" : false - } ], - "protocol" : "icmp", - "createdDate" : "2022-07-17T22:00:54Z", - "ipVersion" : "V4_ONLY", - "port" : 443, - "isEnabled" : true, - "modifiedDate" : "2022-07-17T22:00:54Z", - "interval" : 60, - "testId" : "281474976710706", - "aid" : "1234", - "agentSelectorConfig" : { - "agentSelectorType" : "all-agents", - "maxMachines" : 25 - }, - "hasPathTraceInSession" : true, - "testName" : "Test name" - }, + "test" : "", "endDate" : "2022-07-18T22:00:54Z", "_links" : { "next" : { diff --git a/thousandeyes-sdk-endpoint-test-results/test/test_network_endpoint_scheduled_test_results_api_integration.py b/thousandeyes-sdk-endpoint-test-results/test/test_network_endpoint_scheduled_test_results_api_integration.py index 877d74fc8..e737967f8 100644 --- a/thousandeyes-sdk-endpoint-test-results/test/test_network_endpoint_scheduled_test_results_api_integration.py +++ b/thousandeyes-sdk-endpoint-test-results/test/test_network_endpoint_scheduled_test_results_api_integration.py @@ -72,55 +72,7 @@ def test_filter_scheduled_test_network_results_happy_path(self) -> None: expand = ["header"] response_body_json = """ { - "test" : { - "server" : "www.example.com", - "isSavedEvent" : false, - "_links" : { - "testResults" : [ { - "href" : "https://api.thousandeyes.com/v7/endpoint/test-results/scheduled-tests/281474976710706/network/filter" - }, { - "href" : "https://api.thousandeyes.com/v7/endpoint/test-results/scheduled-tests/281474976710706/pathvis" - } ], - "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" - } - }, - "isPrioritized" : false, - "networkMeasurements" : true, - "type" : "agent-to-server", - "tcpProbeMode" : "auto", - "labels" : [ { - "labelId" : "961", - "name" : "Artem label", - "isBuiltin" : false - }, { - "labelId" : "961", - "name" : "Artem label", - "isBuiltin" : false - } ], - "protocol" : "icmp", - "createdDate" : "2022-07-17T22:00:54Z", - "ipVersion" : "V4_ONLY", - "port" : 443, - "isEnabled" : true, - "modifiedDate" : "2022-07-17T22:00:54Z", - "interval" : 60, - "testId" : "281474976710706", - "aid" : "1234", - "agentSelectorConfig" : { - "agentSelectorType" : "all-agents", - "maxMachines" : 25 - }, - "hasPathTraceInSession" : true, - "testName" : "Test name" - }, + "test" : "", "totalHits" : 12, "endDate" : "2022-07-18T22:00:54Z", "_links" : { @@ -1723,55 +1675,7 @@ def test_get_scheduled_test_path_vis_agent_round_results_happy_path(self) -> Non aid = '1234' response_body_json = """ { - "test" : { - "server" : "www.example.com", - "isSavedEvent" : false, - "_links" : { - "testResults" : [ { - "href" : "https://api.thousandeyes.com/v7/endpoint/test-results/scheduled-tests/281474976710706/network/filter" - }, { - "href" : "https://api.thousandeyes.com/v7/endpoint/test-results/scheduled-tests/281474976710706/pathvis" - } ], - "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" - } - }, - "isPrioritized" : false, - "networkMeasurements" : true, - "type" : "agent-to-server", - "tcpProbeMode" : "auto", - "labels" : [ { - "labelId" : "961", - "name" : "Artem label", - "isBuiltin" : false - }, { - "labelId" : "961", - "name" : "Artem label", - "isBuiltin" : false - } ], - "protocol" : "icmp", - "createdDate" : "2022-07-17T22:00:54Z", - "ipVersion" : "V4_ONLY", - "port" : 443, - "isEnabled" : true, - "modifiedDate" : "2022-07-17T22:00:54Z", - "interval" : 60, - "testId" : "281474976710706", - "aid" : "1234", - "agentSelectorConfig" : { - "agentSelectorType" : "all-agents", - "maxMachines" : 25 - }, - "hasPathTraceInSession" : true, - "testName" : "Test name" - }, + "test" : "", "_links" : { "self" : { "hreflang" : "hreflang", @@ -2424,55 +2328,7 @@ def test_get_scheduled_test_path_vis_results_happy_path(self) -> None: cursor = 'cursor_example' response_body_json = """ { - "test" : { - "server" : "www.example.com", - "isSavedEvent" : false, - "_links" : { - "testResults" : [ { - "href" : "https://api.thousandeyes.com/v7/endpoint/test-results/scheduled-tests/281474976710706/network/filter" - }, { - "href" : "https://api.thousandeyes.com/v7/endpoint/test-results/scheduled-tests/281474976710706/pathvis" - } ], - "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" - } - }, - "isPrioritized" : false, - "networkMeasurements" : true, - "type" : "agent-to-server", - "tcpProbeMode" : "auto", - "labels" : [ { - "labelId" : "961", - "name" : "Artem label", - "isBuiltin" : false - }, { - "labelId" : "961", - "name" : "Artem label", - "isBuiltin" : false - } ], - "protocol" : "icmp", - "createdDate" : "2022-07-17T22:00:54Z", - "ipVersion" : "V4_ONLY", - "port" : 443, - "isEnabled" : true, - "modifiedDate" : "2022-07-17T22:00:54Z", - "interval" : 60, - "testId" : "281474976710706", - "aid" : "1234", - "agentSelectorConfig" : { - "agentSelectorType" : "all-agents", - "maxMachines" : 25 - }, - "hasPathTraceInSession" : true, - "testName" : "Test name" - }, + "test" : "", "endDate" : "2022-07-18T22:00:54Z", "_links" : { "next" : { diff --git a/thousandeyes-sdk-endpoint-tests/README.md b/thousandeyes-sdk-endpoint-tests/README.md index febdc3bd2..3063b65f0 100644 --- a/thousandeyes-sdk-endpoint-tests/README.md +++ b/thousandeyes-sdk-endpoint-tests/README.md @@ -4,7 +4,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.99 +- API version: 7.0.101 - 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 2d6970cec..32813fd33 100644 --- a/thousandeyes-sdk-event-detection/README.md +++ b/thousandeyes-sdk-event-detection/README.md @@ -11,7 +11,7 @@ With the Events API, you can perform the following tasks on the ThousandEyes pla This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.99 +- API version: 7.0.101 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-instant-tests/.openapi-generator/FILES b/thousandeyes-sdk-instant-tests/.openapi-generator/FILES index 316b07b88..1b70f8302 100644 --- a/thousandeyes-sdk-instant-tests/.openapi-generator/FILES +++ b/thousandeyes-sdk-instant-tests/.openapi-generator/FILES @@ -88,6 +88,8 @@ docs/SipServerInstantTestResponse.md docs/SipServerProperties.md docs/SipTestProtocol.md docs/TestAgent.md +docs/TestAgentResponse.md +docs/TestAgentResponseProperties.md docs/TestAuthType.md docs/TestChromiumTrack.md docs/TestCustomHeaders.md @@ -217,6 +219,8 @@ src/thousandeyes_sdk/instant_tests/models/sip_server_instant_test_response.py src/thousandeyes_sdk/instant_tests/models/sip_server_properties.py src/thousandeyes_sdk/instant_tests/models/sip_test_protocol.py src/thousandeyes_sdk/instant_tests/models/test_agent.py +src/thousandeyes_sdk/instant_tests/models/test_agent_response.py +src/thousandeyes_sdk/instant_tests/models/test_agent_response_properties.py src/thousandeyes_sdk/instant_tests/models/test_auth_type.py src/thousandeyes_sdk/instant_tests/models/test_chromium_track.py src/thousandeyes_sdk/instant_tests/models/test_custom_headers.py diff --git a/thousandeyes-sdk-instant-tests/README.md b/thousandeyes-sdk-instant-tests/README.md index 8a529ed9c..43d1f76fc 100644 --- a/thousandeyes-sdk-instant-tests/README.md +++ b/thousandeyes-sdk-instant-tests/README.md @@ -6,7 +6,7 @@ The response does not include the immediate test results. Use the Test Results e This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.99 +- API version: 7.0.101 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator @@ -192,6 +192,8 @@ Class | Method | HTTP request | Description - [SipServerProperties](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-instant-tests/docs/SipServerProperties.md) - [SipTestProtocol](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-instant-tests/docs/SipTestProtocol.md) - [TestAgent](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-instant-tests/docs/TestAgent.md) + - [TestAgentResponse](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-instant-tests/docs/TestAgentResponse.md) + - [TestAgentResponseProperties](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-instant-tests/docs/TestAgentResponseProperties.md) - [TestAuthType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-instant-tests/docs/TestAuthType.md) - [TestChromiumTrack](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-instant-tests/docs/TestChromiumTrack.md) - [TestCustomHeaders](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-instant-tests/docs/TestCustomHeaders.md) diff --git a/thousandeyes-sdk-instant-tests/docs/AgentToAgentInstantTestResponse.md b/thousandeyes-sdk-instant-tests/docs/AgentToAgentInstantTestResponse.md index e1ec74840..d07f320ce 100644 --- a/thousandeyes-sdk-instant-tests/docs/AgentToAgentInstantTestResponse.md +++ b/thousandeyes-sdk-instant-tests/docs/AgentToAgentInstantTestResponse.md @@ -33,7 +33,7 @@ Name | Type | Description | Notes **throughput_duration** | **int** | The throughput duration. | [optional] [default to 10000] **throughput_rate** | **int** | The throughput rate, only applicable for UDP protocol. | [optional] **fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] -**agents** | [**List[AgentResponse]**](AgentResponse.md) | Contains list of agents. | [optional] +**agents** | [**List[TestAgentResponse]**](TestAgentResponse.md) | Contains list of agents. | [optional] ## Example diff --git a/thousandeyes-sdk-instant-tests/docs/AgentToServerInstantTestResponse.md b/thousandeyes-sdk-instant-tests/docs/AgentToServerInstantTestResponse.md index e16e34f07..036b183e1 100644 --- a/thousandeyes-sdk-instant-tests/docs/AgentToServerInstantTestResponse.md +++ b/thousandeyes-sdk-instant-tests/docs/AgentToServerInstantTestResponse.md @@ -34,7 +34,7 @@ Name | Type | Description | Notes **ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] **ping_payload_size** | **int** | Payload size (not total packet size) for the end-to-end metric's probes, ping payload size allows values from 0 to 1400 bytes. When set to null, payload sizes are 0 bytes for ICMP-based tests and 1 byte for TCP-based tests. | [optional] **network_measurements** | **bool** | View packet loss in 1-second intervals. This is only available for 1-minute interval tests. Set to `true` to enable network measurements. | [optional] [default to False] -**agents** | [**List[AgentResponse]**](AgentResponse.md) | Contains list of agents. | [optional] +**agents** | [**List[TestAgentResponse]**](TestAgentResponse.md) | Contains list of agents. | [optional] ## Example diff --git a/thousandeyes-sdk-instant-tests/docs/ApiInstantTestResponse.md b/thousandeyes-sdk-instant-tests/docs/ApiInstantTestResponse.md index cff276ab6..8a0cdc2e0 100644 --- a/thousandeyes-sdk-instant-tests/docs/ApiInstantTestResponse.md +++ b/thousandeyes-sdk-instant-tests/docs/ApiInstantTestResponse.md @@ -41,7 +41,7 @@ Name | Type | Description | Notes **url** | **str** | Target for the test. | **credentials** | **List[str]** | Contains a list of credential IDs (get `credentialId` from `/credentials` endpoint). | [optional] **vault_credentials** | [**List[TestVaultCredential]**](TestVaultCredential.md) | List of credential IDs that are stored in an external vault. | [optional] -**agents** | [**List[AgentResponse]**](AgentResponse.md) | Contains list of agents. | [optional] +**agents** | [**List[TestAgentResponse]**](TestAgentResponse.md) | Contains list of agents. | [optional] ## Example diff --git a/thousandeyes-sdk-instant-tests/docs/DnsSecInstantTestResponse.md b/thousandeyes-sdk-instant-tests/docs/DnsSecInstantTestResponse.md index 3dc15f199..601fafa60 100644 --- a/thousandeyes-sdk-instant-tests/docs/DnsSecInstantTestResponse.md +++ b/thousandeyes-sdk-instant-tests/docs/DnsSecInstantTestResponse.md @@ -22,7 +22,7 @@ Name | Type | Description | Notes **domain** | **str** | The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record. | **dns_query_class** | [**DnsQueryClass**](DnsQueryClass.md) | | [optional] **randomized_start_time** | **bool** | Indicates whether agents should randomize the start time in each test round. | [optional] [default to False] -**agents** | [**List[AgentResponse]**](AgentResponse.md) | Contains list of agents. | [optional] +**agents** | [**List[TestAgentResponse]**](TestAgentResponse.md) | Contains list of agents. | [optional] ## Example diff --git a/thousandeyes-sdk-instant-tests/docs/DnsServerInstantTestResponse.md b/thousandeyes-sdk-instant-tests/docs/DnsServerInstantTestResponse.md index c94e1d568..289dc7156 100644 --- a/thousandeyes-sdk-instant-tests/docs/DnsServerInstantTestResponse.md +++ b/thousandeyes-sdk-instant-tests/docs/DnsServerInstantTestResponse.md @@ -34,7 +34,7 @@ Name | Type | Description | Notes **ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] **fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] **dns_query_class** | [**DnsQueryClass**](DnsQueryClass.md) | | [optional] -**agents** | [**List[AgentResponse]**](AgentResponse.md) | Contains list of agents. | [optional] +**agents** | [**List[TestAgentResponse]**](TestAgentResponse.md) | Contains list of agents. | [optional] ## Example diff --git a/thousandeyes-sdk-instant-tests/docs/DnsTraceInstantTestResponse.md b/thousandeyes-sdk-instant-tests/docs/DnsTraceInstantTestResponse.md index 41ce900a6..28471309e 100644 --- a/thousandeyes-sdk-instant-tests/docs/DnsTraceInstantTestResponse.md +++ b/thousandeyes-sdk-instant-tests/docs/DnsTraceInstantTestResponse.md @@ -23,7 +23,7 @@ Name | Type | Description | Notes **domain** | **str** | The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record. | **dns_query_class** | [**DnsQueryClass**](DnsQueryClass.md) | | [optional] **randomized_start_time** | **bool** | Indicates whether agents should randomize the start time in each test round. | [optional] [default to False] -**agents** | [**List[AgentResponse]**](AgentResponse.md) | Contains list of agents. | [optional] +**agents** | [**List[TestAgentResponse]**](TestAgentResponse.md) | Contains list of agents. | [optional] ## Example diff --git a/thousandeyes-sdk-instant-tests/docs/FtpServerInstantTestResponse.md b/thousandeyes-sdk-instant-tests/docs/FtpServerInstantTestResponse.md index dcb7db2f9..e4addaf24 100644 --- a/thousandeyes-sdk-instant-tests/docs/FtpServerInstantTestResponse.md +++ b/thousandeyes-sdk-instant-tests/docs/FtpServerInstantTestResponse.md @@ -38,7 +38,7 @@ Name | Type | Description | Notes **username** | **str** | Username for Basic/NTLM authentication. | **fixed_packet_rate** | **int** | Sets packets rate sent to measure the network in packets per second. | [optional] **ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] -**agents** | [**List[AgentResponse]**](AgentResponse.md) | Contains list of agents. | [optional] +**agents** | [**List[TestAgentResponse]**](TestAgentResponse.md) | Contains list of agents. | [optional] ## Example diff --git a/thousandeyes-sdk-instant-tests/docs/HttpServerInstantTestResponse.md b/thousandeyes-sdk-instant-tests/docs/HttpServerInstantTestResponse.md index a93defc0a..1862f6112 100644 --- a/thousandeyes-sdk-instant-tests/docs/HttpServerInstantTestResponse.md +++ b/thousandeyes-sdk-instant-tests/docs/HttpServerInstantTestResponse.md @@ -60,7 +60,7 @@ Name | Type | Description | Notes **request_method** | [**RequestMethod**](RequestMethod.md) | | [optional] **post_body** | **str** | Enter the body for the HTTP POST request in this field. No special escaping is required. If content is provided and `requestMethod` is not specified, `requestMethod` is automatically set to `post`. | [optional] **ipv6_policy** | [**TestIpv6Policy**](TestIpv6Policy.md) | | [optional] -**agents** | [**List[AgentResponse]**](AgentResponse.md) | Contains list of agents. | [optional] +**agents** | [**List[TestAgentResponse]**](TestAgentResponse.md) | Contains list of agents. | [optional] ## Example diff --git a/thousandeyes-sdk-instant-tests/docs/PageLoadInstantTestResponse.md b/thousandeyes-sdk-instant-tests/docs/PageLoadInstantTestResponse.md index 01cc2c915..0801826d1 100644 --- a/thousandeyes-sdk-instant-tests/docs/PageLoadInstantTestResponse.md +++ b/thousandeyes-sdk-instant-tests/docs/PageLoadInstantTestResponse.md @@ -69,7 +69,7 @@ Name | Type | Description | Notes **page_loading_strategy** | [**TestPageLoadingStrategy**](TestPageLoadingStrategy.md) | | [optional] **randomized_start_time** | **bool** | Indicates whether agents should randomize the start time in each test round. | [optional] [default to False] **identify_agent_traffic_with_user_agent** | **bool** | Determines how agent traffic is identified: * `false`: Adds the `x-thousandeyes-agent: yes` header. * `true`: Appends `(ThousandEyes Agent)` to the `user-agent` header. For more information, see [Notes on Agent ID Strategy](https://docs.thousandeyes.com/product-documentation/browser-synthetics/test-settings-page-load-transaction#notes-on-agent-id-strategy). | [optional] [default to False] -**agents** | [**List[AgentResponse]**](AgentResponse.md) | Contains list of agents. | [optional] +**agents** | [**List[TestAgentResponse]**](TestAgentResponse.md) | Contains list of agents. | [optional] ## Example diff --git a/thousandeyes-sdk-instant-tests/docs/SipServerInstantTestResponse.md b/thousandeyes-sdk-instant-tests/docs/SipServerInstantTestResponse.md index 158da0dd3..54679e3ed 100644 --- a/thousandeyes-sdk-instant-tests/docs/SipServerInstantTestResponse.md +++ b/thousandeyes-sdk-instant-tests/docs/SipServerInstantTestResponse.md @@ -37,7 +37,7 @@ Name | Type | Description | Notes **protocol** | [**SipTestProtocol**](SipTestProtocol.md) | | [optional] **sip_registrar** | **str** | SIP server to be tested, specified by domain name or IP address. | [optional] **user** | **str** | Username for SIP registration, should be unique within a ThousandEyes account group. | [optional] -**agents** | [**List[AgentResponse]**](AgentResponse.md) | Contains list of agents. | [optional] +**agents** | [**List[TestAgentResponse]**](TestAgentResponse.md) | Contains list of agents. | [optional] ## Example diff --git a/thousandeyes-sdk-instant-tests/docs/TestAgentResponse.md b/thousandeyes-sdk-instant-tests/docs/TestAgentResponse.md new file mode 100644 index 000000000..aa3fc2110 --- /dev/null +++ b/thousandeyes-sdk-instant-tests/docs/TestAgentResponse.md @@ -0,0 +1,42 @@ +# TestAgentResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**agent_type** | [**CloudEnterpriseAgentType**](CloudEnterpriseAgentType.md) | | +**ip_addresses** | **List[str]** | Array of private IP addresses. | [optional] [readonly] +**public_ip_addresses** | **List[str]** | Array of public IP addresses. | [optional] [readonly] +**network** | **str** | Network (including ASN) of agent’s public IP. | [optional] [readonly] +**agent_id** | **str** | Unique ID of the agent. | [optional] [readonly] +**agent_name** | **str** | Name of the agent. | [optional] +**location** | **str** | Location of the agent. | [optional] [readonly] +**country_id** | **str** | 2-digit ISO country code | [optional] [readonly] +**coordinates** | [**Coordinates**](Coordinates.md) | | [optional] +**network_provider_info** | [**SimpleAgentAllOfNetworkProviderInfo**](SimpleAgentAllOfNetworkProviderInfo.md) | | [optional] +**enabled** | **bool** | Flag indicating if the agent is enabled. | [optional] +**verify_ssl_certificates** | **bool** | Flag indicating if has normal SSL operations or if instead it's set to ignore SSL errors on browserbot-based tests. | [optional] [readonly] +**prefix** | **str** | Prefix containing agents public IP address. | [optional] [readonly] +**source_ip_address** | **str** | IP address of the agent interface used as the source for the test. Returned when a source interface is selected. | [optional] [readonly] + +## Example + +```python +from thousandeyes_sdk.instant_tests.models.test_agent_response import TestAgentResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of TestAgentResponse from a JSON string +test_agent_response_instance = TestAgentResponse.from_json(json) +# print the JSON string representation of the object +print(TestAgentResponse.to_json()) + +# convert the object into a dict +test_agent_response_dict = test_agent_response_instance.to_dict() +# create an instance of TestAgentResponse from a dict +test_agent_response_from_dict = TestAgentResponse.from_dict(test_agent_response_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-instant-tests/docs/TestAgentResponseProperties.md b/thousandeyes-sdk-instant-tests/docs/TestAgentResponseProperties.md new file mode 100644 index 000000000..3bcb9a978 --- /dev/null +++ b/thousandeyes-sdk-instant-tests/docs/TestAgentResponseProperties.md @@ -0,0 +1,29 @@ +# TestAgentResponseProperties + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**source_ip_address** | **str** | IP address of the agent interface used as the source for the test. Returned when a source interface is selected. | [optional] [readonly] + +## Example + +```python +from thousandeyes_sdk.instant_tests.models.test_agent_response_properties import TestAgentResponseProperties + +# TODO update the JSON string below +json = "{}" +# create an instance of TestAgentResponseProperties from a JSON string +test_agent_response_properties_instance = TestAgentResponseProperties.from_json(json) +# print the JSON string representation of the object +print(TestAgentResponseProperties.to_json()) + +# convert the object into a dict +test_agent_response_properties_dict = test_agent_response_properties_instance.to_dict() +# create an instance of TestAgentResponseProperties from a dict +test_agent_response_properties_from_dict = TestAgentResponseProperties.from_dict(test_agent_response_properties_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-instant-tests/docs/VoiceInstantTestResponse.md b/thousandeyes-sdk-instant-tests/docs/VoiceInstantTestResponse.md index 528015769..61a9f31f4 100644 --- a/thousandeyes-sdk-instant-tests/docs/VoiceInstantTestResponse.md +++ b/thousandeyes-sdk-instant-tests/docs/VoiceInstantTestResponse.md @@ -29,7 +29,7 @@ Name | Type | Description | Notes **port** | **int** | Port number for the chosen protocol. | [optional] **randomized_start_time** | **bool** | Indicates whether agents should randomize the start time in each test round. | [optional] [default to False] **target_agent_id** | **str** | Agent ID of the target agent for the test. | -**agents** | [**List[AgentResponse]**](AgentResponse.md) | Contains list of agents. | [optional] +**agents** | [**List[TestAgentResponse]**](TestAgentResponse.md) | Contains list of agents. | [optional] ## Example diff --git a/thousandeyes-sdk-instant-tests/docs/WebTransactionInstantTestResponse.md b/thousandeyes-sdk-instant-tests/docs/WebTransactionInstantTestResponse.md index f3f16a2c5..288879981 100644 --- a/thousandeyes-sdk-instant-tests/docs/WebTransactionInstantTestResponse.md +++ b/thousandeyes-sdk-instant-tests/docs/WebTransactionInstantTestResponse.md @@ -72,7 +72,7 @@ Name | Type | Description | Notes **randomized_start_time** | **bool** | Indicates whether agents should randomize the start time in each test round. | [optional] [default to False] **identify_agent_traffic_with_user_agent** | **bool** | Determines how agent traffic is identified: * `false`: Adds the `x-thousandeyes-agent: yes` header. * `true`: Appends `(ThousandEyes Agent)` to the `user-agent` header. For more information, see [Notes on Agent ID Strategy](https://docs.thousandeyes.com/product-documentation/browser-synthetics/test-settings-page-load-transaction#notes-on-agent-id-strategy). | [optional] [default to False] **credentials** | **List[str]** | Contains a list of credential IDs (get `credentialId` from `/credentials` endpoint). | [optional] -**agents** | [**List[AgentResponse]**](AgentResponse.md) | Contains list of agents. | [optional] +**agents** | [**List[TestAgentResponse]**](TestAgentResponse.md) | Contains list of agents. | [optional] ## Example diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/__init__.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/__init__.py index 97a06c485..f4245288c 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/__init__.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/__init__.py @@ -106,6 +106,8 @@ from thousandeyes_sdk.instant_tests.models.sip_server_properties import SipServerProperties from thousandeyes_sdk.instant_tests.models.sip_test_protocol import SipTestProtocol from thousandeyes_sdk.instant_tests.models.test_agent import TestAgent +from thousandeyes_sdk.instant_tests.models.test_agent_response import TestAgentResponse +from thousandeyes_sdk.instant_tests.models.test_agent_response_properties import TestAgentResponseProperties from thousandeyes_sdk.instant_tests.models.test_auth_type import TestAuthType from thousandeyes_sdk.instant_tests.models.test_chromium_track import TestChromiumTrack from thousandeyes_sdk.instant_tests.models.test_custom_headers import TestCustomHeaders diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/__init__.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/__init__.py index 333022dff..d6b62d95e 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/__init__.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/__init__.py @@ -89,6 +89,8 @@ from thousandeyes_sdk.instant_tests.models.sip_server_properties import SipServerProperties from thousandeyes_sdk.instant_tests.models.sip_test_protocol import SipTestProtocol from thousandeyes_sdk.instant_tests.models.test_agent import TestAgent +from thousandeyes_sdk.instant_tests.models.test_agent_response import TestAgentResponse +from thousandeyes_sdk.instant_tests.models.test_agent_response_properties import TestAgentResponseProperties from thousandeyes_sdk.instant_tests.models.test_auth_type import TestAuthType from thousandeyes_sdk.instant_tests.models.test_chromium_track import TestChromiumTrack from thousandeyes_sdk.instant_tests.models.test_custom_headers import TestCustomHeaders diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent_to_agent_instant_test_response.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent_to_agent_instant_test_response.py index a8f506357..3a2be6f16 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent_to_agent_instant_test_response.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent_to_agent_instant_test_response.py @@ -20,9 +20,9 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.instant_tests.models.agent_response import AgentResponse from thousandeyes_sdk.instant_tests.models.agent_to_agent_test_protocol import AgentToAgentTestProtocol from thousandeyes_sdk.instant_tests.models.shared_with_account import SharedWithAccount +from thousandeyes_sdk.instant_tests.models.test_agent_response import TestAgentResponse from thousandeyes_sdk.instant_tests.models.test_direction import TestDirection from thousandeyes_sdk.instant_tests.models.test_dscp_id import TestDscpId from thousandeyes_sdk.instant_tests.models.test_label import TestLabel @@ -64,7 +64,7 @@ class AgentToAgentInstantTestResponse(BaseModel): throughput_duration: Optional[Annotated[int, Field(le=30000, strict=True, ge=5000)]] = Field(default=10000, description="The throughput duration.", alias="throughputDuration") throughput_rate: Optional[Annotated[int, Field(le=1000, strict=True, ge=8)]] = Field(default=None, description="The throughput rate, only applicable for UDP protocol.", alias="throughputRate") fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") - agents: Optional[List[AgentResponse]] = Field(default=None, description="Contains list of agents.") + agents: Optional[List[TestAgentResponse]] = Field(default=None, description="Contains list of agents.") __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "direction", "dscp", "dscpId", "mss", "numPathTraces", "pathTraceMode", "port", "protocol", "randomizedStartTime", "targetAgentId", "throughputMeasurements", "throughputDuration", "throughputRate", "fixedPacketRate", "agents"] model_config = ConfigDict( @@ -202,7 +202,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "throughputDuration": obj.get("throughputDuration") if obj.get("throughputDuration") is not None else 10000, "throughputRate": obj.get("throughputRate"), "fixedPacketRate": obj.get("fixedPacketRate"), - "agents": [AgentResponse.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + "agents": [TestAgentResponse.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None }) return _obj diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent_to_server_instant_test_response.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent_to_server_instant_test_response.py index 387fffa6e..b136b2864 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent_to_server_instant_test_response.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent_to_server_instant_test_response.py @@ -20,8 +20,8 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.instant_tests.models.agent_response import AgentResponse from thousandeyes_sdk.instant_tests.models.shared_with_account import SharedWithAccount +from thousandeyes_sdk.instant_tests.models.test_agent_response import TestAgentResponse from thousandeyes_sdk.instant_tests.models.test_dscp_id import TestDscpId from thousandeyes_sdk.instant_tests.models.test_ipv6_policy import TestIpv6Policy from thousandeyes_sdk.instant_tests.models.test_label import TestLabel @@ -66,7 +66,7 @@ class AgentToServerInstantTestResponse(BaseModel): ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") ping_payload_size: Optional[Annotated[int, Field(le=1400, strict=True, ge=0)]] = Field(default=None, description="Payload size (not total packet size) for the end-to-end metric's probes, ping payload size allows values from 0 to 1400 bytes. When set to null, payload sizes are 0 bytes for ICMP-based tests and 1 byte for TCP-based tests.", alias="pingPayloadSize") network_measurements: Optional[StrictBool] = Field(default=False, description="View packet loss in 1-second intervals. This is only available for 1-minute interval tests. Set to `true` to enable network measurements.", alias="networkMeasurements") - agents: Optional[List[AgentResponse]] = Field(default=None, description="Contains list of agents.") + agents: Optional[List[TestAgentResponse]] = Field(default=None, description="Contains list of agents.") __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "bandwidthMeasurements", "continuousMode", "fixedPacketRate", "mtuMeasurements", "numPathTraces", "pathTraceMode", "probeMode", "protocol", "randomizedStartTime", "server", "dscp", "dscpId", "ipv6Policy", "pingPayloadSize", "networkMeasurements", "agents"] model_config = ConfigDict( @@ -205,7 +205,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "ipv6Policy": obj.get("ipv6Policy"), "pingPayloadSize": obj.get("pingPayloadSize"), "networkMeasurements": obj.get("networkMeasurements") if obj.get("networkMeasurements") is not None else False, - "agents": [AgentResponse.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + "agents": [TestAgentResponse.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None }) return _obj diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_instant_test_response.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_instant_test_response.py index 1cf59bf3d..923870031 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_instant_test_response.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_instant_test_response.py @@ -20,10 +20,10 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.instant_tests.models.agent_response import AgentResponse from thousandeyes_sdk.instant_tests.models.api_predefined_variable import ApiPredefinedVariable from thousandeyes_sdk.instant_tests.models.api_request import ApiRequest from thousandeyes_sdk.instant_tests.models.shared_with_account import SharedWithAccount +from thousandeyes_sdk.instant_tests.models.test_agent_response import TestAgentResponse from thousandeyes_sdk.instant_tests.models.test_label import TestLabel from thousandeyes_sdk.instant_tests.models.test_links import TestLinks from thousandeyes_sdk.instant_tests.models.test_path_trace_mode import TestPathTraceMode @@ -75,7 +75,7 @@ class ApiInstantTestResponse(BaseModel): url: StrictStr = Field(description="Target for the test.") credentials: Optional[List[StrictStr]] = Field(default=None, description="Contains a list of credential IDs (get `credentialId` from `/credentials` endpoint).") vault_credentials: Optional[List[TestVaultCredential]] = Field(default=None, description="List of credential IDs that are stored in an external vault.", alias="vaultCredentials") - agents: Optional[List[AgentResponse]] = Field(default=None, description="Contains list of agents.") + agents: Optional[List[TestAgentResponse]] = Field(default=None, description="Contains list of agents.") __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "clientCertificate", "clientCertDomainsAllowList", "collectProxyNetworkData", "distributedTracing", "followRedirects", "mtuMeasurements", "networkMeasurements", "numPathTraces", "overrideAgentProxy", "overrideProxyId", "pathTraceMode", "predefinedVariables", "probeMode", "protocol", "randomizedStartTime", "requests", "sslVersionId", "targetTime", "timeLimit", "url", "credentials", "vaultCredentials", "agents"] model_config = ConfigDict( @@ -240,7 +240,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "url": obj.get("url"), "credentials": obj.get("credentials"), "vaultCredentials": [TestVaultCredential.from_dict(_item) for _item in obj["vaultCredentials"]] if obj.get("vaultCredentials") is not None else None, - "agents": [AgentResponse.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + "agents": [TestAgentResponse.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None }) return _obj diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_sec_instant_test_response.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_sec_instant_test_response.py index 8760eaa91..4b2879047 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_sec_instant_test_response.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_sec_instant_test_response.py @@ -19,9 +19,9 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from thousandeyes_sdk.instant_tests.models.agent_response import AgentResponse from thousandeyes_sdk.instant_tests.models.dns_query_class import DnsQueryClass from thousandeyes_sdk.instant_tests.models.shared_with_account import SharedWithAccount +from thousandeyes_sdk.instant_tests.models.test_agent_response import TestAgentResponse from thousandeyes_sdk.instant_tests.models.test_label import TestLabel from thousandeyes_sdk.instant_tests.models.test_links import TestLinks from thousandeyes_sdk.instant_tests.models.test_tag import TestTag @@ -49,7 +49,7 @@ class DnsSecInstantTestResponse(BaseModel): domain: StrictStr = Field(description="The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record.") dns_query_class: Optional[DnsQueryClass] = Field(default=None, alias="dnsQueryClass") randomized_start_time: Optional[StrictBool] = Field(default=False, description="Indicates whether agents should randomize the start time in each test round.", alias="randomizedStartTime") - agents: Optional[List[AgentResponse]] = Field(default=None, description="Contains list of agents.") + agents: Optional[List[TestAgentResponse]] = Field(default=None, description="Contains list of agents.") __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "domain", "dnsQueryClass", "randomizedStartTime", "agents"] model_config = ConfigDict( @@ -174,7 +174,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "domain": obj.get("domain"), "dnsQueryClass": obj.get("dnsQueryClass"), "randomizedStartTime": obj.get("randomizedStartTime") if obj.get("randomizedStartTime") is not None else False, - "agents": [AgentResponse.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + "agents": [TestAgentResponse.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None }) return _obj diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_server_instant_test_response.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_server_instant_test_response.py index f10f45b39..b2a906b5f 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_server_instant_test_response.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_server_instant_test_response.py @@ -20,9 +20,9 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.instant_tests.models.agent_response import AgentResponse from thousandeyes_sdk.instant_tests.models.dns_query_class import DnsQueryClass from thousandeyes_sdk.instant_tests.models.shared_with_account import SharedWithAccount +from thousandeyes_sdk.instant_tests.models.test_agent_response import TestAgentResponse from thousandeyes_sdk.instant_tests.models.test_dns_server import TestDnsServer from thousandeyes_sdk.instant_tests.models.test_dns_transport_protocol import TestDnsTransportProtocol from thousandeyes_sdk.instant_tests.models.test_ipv6_policy import TestIpv6Policy @@ -68,7 +68,7 @@ class DnsServerInstantTestResponse(BaseModel): ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") dns_query_class: Optional[DnsQueryClass] = Field(default=None, alias="dnsQueryClass") - agents: Optional[List[AgentResponse]] = Field(default=None, description="Contains list of agents.") + agents: Optional[List[TestAgentResponse]] = Field(default=None, description="Contains list of agents.") __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "bandwidthMeasurements", "dnsServers", "dnsTransportProtocol", "domain", "mtuMeasurements", "networkMeasurements", "numPathTraces", "pathTraceMode", "probeMode", "protocol", "randomizedStartTime", "recursiveQueries", "ipv6Policy", "fixedPacketRate", "dnsQueryClass", "agents"] model_config = ConfigDict( @@ -212,7 +212,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "ipv6Policy": obj.get("ipv6Policy"), "fixedPacketRate": obj.get("fixedPacketRate"), "dnsQueryClass": obj.get("dnsQueryClass"), - "agents": [AgentResponse.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + "agents": [TestAgentResponse.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None }) return _obj diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_trace_instant_test_response.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_trace_instant_test_response.py index c1c5aa3a9..e7b3f0aac 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_trace_instant_test_response.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_trace_instant_test_response.py @@ -19,9 +19,9 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from thousandeyes_sdk.instant_tests.models.agent_response import AgentResponse from thousandeyes_sdk.instant_tests.models.dns_query_class import DnsQueryClass from thousandeyes_sdk.instant_tests.models.shared_with_account import SharedWithAccount +from thousandeyes_sdk.instant_tests.models.test_agent_response import TestAgentResponse from thousandeyes_sdk.instant_tests.models.test_dns_transport_protocol import TestDnsTransportProtocol from thousandeyes_sdk.instant_tests.models.test_label import TestLabel from thousandeyes_sdk.instant_tests.models.test_links import TestLinks @@ -51,7 +51,7 @@ class DnsTraceInstantTestResponse(BaseModel): domain: StrictStr = Field(description="The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record.") dns_query_class: Optional[DnsQueryClass] = Field(default=None, alias="dnsQueryClass") randomized_start_time: Optional[StrictBool] = Field(default=False, description="Indicates whether agents should randomize the start time in each test round.", alias="randomizedStartTime") - agents: Optional[List[AgentResponse]] = Field(default=None, description="Contains list of agents.") + agents: Optional[List[TestAgentResponse]] = Field(default=None, description="Contains list of agents.") __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "dnsTransportProtocol", "domain", "dnsQueryClass", "randomizedStartTime", "agents"] model_config = ConfigDict( @@ -177,7 +177,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "domain": obj.get("domain"), "dnsQueryClass": obj.get("dnsQueryClass"), "randomizedStartTime": obj.get("randomizedStartTime") if obj.get("randomizedStartTime") is not None else False, - "agents": [AgentResponse.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + "agents": [TestAgentResponse.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None }) return _obj diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/ftp_server_instant_test_response.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/ftp_server_instant_test_response.py index 905b71c94..b936a81fd 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/ftp_server_instant_test_response.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/ftp_server_instant_test_response.py @@ -20,9 +20,9 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.instant_tests.models.agent_response import AgentResponse from thousandeyes_sdk.instant_tests.models.ftp_server_request_type import FtpServerRequestType from thousandeyes_sdk.instant_tests.models.shared_with_account import SharedWithAccount +from thousandeyes_sdk.instant_tests.models.test_agent_response import TestAgentResponse from thousandeyes_sdk.instant_tests.models.test_ipv6_policy import TestIpv6Policy from thousandeyes_sdk.instant_tests.models.test_label import TestLabel from thousandeyes_sdk.instant_tests.models.test_links import TestLinks @@ -70,7 +70,7 @@ class FtpServerInstantTestResponse(BaseModel): username: StrictStr = Field(description="Username for Basic/NTLM authentication.") fixed_packet_rate: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=None, description="Sets packets rate sent to measure the network in packets per second.", alias="fixedPacketRate") ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") - agents: Optional[List[AgentResponse]] = Field(default=None, description="Contains list of agents.") + agents: Optional[List[TestAgentResponse]] = Field(default=None, description="Contains list of agents.") __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "bandwidthMeasurements", "downloadLimit", "ftpTargetTime", "ftpTimeLimit", "mtuMeasurements", "networkMeasurements", "numPathTraces", "password", "pathTraceMode", "probeMode", "protocol", "randomizedStartTime", "requestType", "url", "useActiveFtp", "useExplicitFtps", "username", "fixedPacketRate", "ipv6Policy", "agents"] model_config = ConfigDict( @@ -211,7 +211,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "username": obj.get("username"), "fixedPacketRate": obj.get("fixedPacketRate"), "ipv6Policy": obj.get("ipv6Policy"), - "agents": [AgentResponse.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + "agents": [TestAgentResponse.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None }) return _obj diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/http_server_instant_test_response.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/http_server_instant_test_response.py index 99b5c8f95..0ffb1ce02 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/http_server_instant_test_response.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/http_server_instant_test_response.py @@ -21,10 +21,10 @@ from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated from thousandeyes_sdk.instant_tests.models.agent_interfaces import AgentInterfaces -from thousandeyes_sdk.instant_tests.models.agent_response import AgentResponse from thousandeyes_sdk.instant_tests.models.o_auth import OAuth from thousandeyes_sdk.instant_tests.models.request_method import RequestMethod from thousandeyes_sdk.instant_tests.models.shared_with_account import SharedWithAccount +from thousandeyes_sdk.instant_tests.models.test_agent_response import TestAgentResponse from thousandeyes_sdk.instant_tests.models.test_auth_type import TestAuthType from thousandeyes_sdk.instant_tests.models.test_custom_headers import TestCustomHeaders from thousandeyes_sdk.instant_tests.models.test_ipv6_policy import TestIpv6Policy @@ -98,7 +98,7 @@ class HttpServerInstantTestResponse(BaseModel): request_method: Optional[RequestMethod] = Field(default=None, alias="requestMethod") post_body: Optional[StrictStr] = Field(default=None, description="Enter the body for the HTTP POST request in this field. No special escaping is required. If content is provided and `requestMethod` is not specified, `requestMethod` is automatically set to `post`.", alias="postBody") ipv6_policy: Optional[TestIpv6Policy] = Field(default=None, alias="ipv6Policy") - agents: Optional[List[AgentResponse]] = Field(default=None, description="Contains list of agents.") + agents: Optional[List[TestAgentResponse]] = Field(default=None, description="Contains list of agents.") __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "authType", "agentInterfaces", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "headers", "randomizedStartTime", "requestMethod", "postBody", "ipv6Policy", "agents"] model_config = ConfigDict( @@ -279,7 +279,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "requestMethod": obj.get("requestMethod"), "postBody": obj.get("postBody"), "ipv6Policy": obj.get("ipv6Policy"), - "agents": [AgentResponse.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + "agents": [TestAgentResponse.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None }) return _obj diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/page_load_instant_test_response.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/page_load_instant_test_response.py index 38b99da4e..52cf0ad44 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/page_load_instant_test_response.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/page_load_instant_test_response.py @@ -21,9 +21,9 @@ from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated from thousandeyes_sdk.instant_tests.models.agent_interfaces import AgentInterfaces -from thousandeyes_sdk.instant_tests.models.agent_response import AgentResponse from thousandeyes_sdk.instant_tests.models.o_auth import OAuth from thousandeyes_sdk.instant_tests.models.shared_with_account import SharedWithAccount +from thousandeyes_sdk.instant_tests.models.test_agent_response import TestAgentResponse from thousandeyes_sdk.instant_tests.models.test_auth_type import TestAuthType from thousandeyes_sdk.instant_tests.models.test_chromium_track import TestChromiumTrack from thousandeyes_sdk.instant_tests.models.test_custom_headers import TestCustomHeaders @@ -107,7 +107,7 @@ class PageLoadInstantTestResponse(BaseModel): page_loading_strategy: Optional[TestPageLoadingStrategy] = Field(default=None, alias="pageLoadingStrategy") randomized_start_time: Optional[StrictBool] = Field(default=False, description="Indicates whether agents should randomize the start time in each test round.", alias="randomizedStartTime") identify_agent_traffic_with_user_agent: Optional[StrictBool] = Field(default=False, description="Determines how agent traffic is identified: * `false`: Adds the `x-thousandeyes-agent: yes` header. * `true`: Appends `(ThousandEyes Agent)` to the `user-agent` header. For more information, see [Notes on Agent ID Strategy](https://docs.thousandeyes.com/product-documentation/browser-synthetics/test-settings-page-load-transaction#notes-on-agent-id-strategy). ", alias="identifyAgentTrafficWithUserAgent") - agents: Optional[List[AgentResponse]] = Field(default=None, description="Contains list of agents.") + agents: Optional[List[TestAgentResponse]] = Field(default=None, description="Contains list of agents.") __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "authType", "agentInterfaces", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "emulatedDeviceId", "pageLoadTargetTime", "pageLoadTimeLimit", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "chromeOptions", "chromePolicies", "chromiumTrack", "pageLoadingStrategy", "randomizedStartTime", "identifyAgentTrafficWithUserAgent", "agents"] model_config = ConfigDict( @@ -297,7 +297,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "pageLoadingStrategy": obj.get("pageLoadingStrategy"), "randomizedStartTime": obj.get("randomizedStartTime") if obj.get("randomizedStartTime") is not None else False, "identifyAgentTrafficWithUserAgent": obj.get("identifyAgentTrafficWithUserAgent") if obj.get("identifyAgentTrafficWithUserAgent") is not None else False, - "agents": [AgentResponse.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + "agents": [TestAgentResponse.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None }) return _obj diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/sip_server_instant_test_response.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/sip_server_instant_test_response.py index 072cc0450..8c37adca1 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/sip_server_instant_test_response.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/sip_server_instant_test_response.py @@ -20,9 +20,9 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.instant_tests.models.agent_response import AgentResponse from thousandeyes_sdk.instant_tests.models.shared_with_account import SharedWithAccount from thousandeyes_sdk.instant_tests.models.sip_test_protocol import SipTestProtocol +from thousandeyes_sdk.instant_tests.models.test_agent_response import TestAgentResponse from thousandeyes_sdk.instant_tests.models.test_ipv6_policy import TestIpv6Policy from thousandeyes_sdk.instant_tests.models.test_label import TestLabel from thousandeyes_sdk.instant_tests.models.test_links import TestLinks @@ -68,7 +68,7 @@ class SipServerInstantTestResponse(BaseModel): protocol: Optional[SipTestProtocol] = None sip_registrar: Optional[StrictStr] = Field(default=None, description="SIP server to be tested, specified by domain name or IP address.", alias="sipRegistrar") user: Optional[StrictStr] = Field(default=None, description="Username for SIP registration, should be unique within a ThousandEyes account group.") - agents: Optional[List[AgentResponse]] = Field(default=None, description="Contains list of agents.") + agents: Optional[List[TestAgentResponse]] = Field(default=None, description="Contains list of agents.") __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "mtuMeasurements", "networkMeasurements", "numPathTraces", "optionsRegex", "pathTraceMode", "probeMode", "randomizedStartTime", "registerEnabled", "sipTargetTime", "sipTimeLimit", "fixedPacketRate", "ipv6Policy", "authUser", "password", "port", "protocol", "sipRegistrar", "user", "agents"] model_config = ConfigDict( @@ -208,7 +208,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "protocol": obj.get("protocol"), "sipRegistrar": obj.get("sipRegistrar"), "user": obj.get("user"), - "agents": [AgentResponse.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + "agents": [TestAgentResponse.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None }) return _obj diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_agent_response.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_agent_response.py new file mode 100644 index 000000000..ed4faa75b --- /dev/null +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_agent_response.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + Instant Tests API + + The Instant Tests API operations lets you create and run new instant tests. You will need to be an Account Admin. The response does not include the immediate test results. Use the Test Results endpoints to get test results after creating and executing an instant test. You can find the URLs for these endpoints in the _links section of the test definition that is returned when you create the instant test. + + 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, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from thousandeyes_sdk.instant_tests.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType +from thousandeyes_sdk.instant_tests.models.coordinates import Coordinates +from thousandeyes_sdk.instant_tests.models.simple_agent_all_of_network_provider_info import SimpleAgentAllOfNetworkProviderInfo +from typing import Optional, Set +from typing_extensions import Self + +class TestAgentResponse(BaseModel): + """ + TestAgentResponse + """ # noqa: E501 + agent_type: CloudEnterpriseAgentType = Field(alias="agentType") + ip_addresses: Optional[List[StrictStr]] = Field(default=None, description="Array of private IP addresses.", alias="ipAddresses") + public_ip_addresses: Optional[List[StrictStr]] = Field(default=None, description="Array of public IP addresses.", alias="publicIpAddresses") + network: Optional[StrictStr] = Field(default=None, description="Network (including ASN) of agent’s public IP.") + agent_id: Optional[StrictStr] = Field(default=None, description="Unique ID of the agent.", alias="agentId") + agent_name: Optional[StrictStr] = Field(default=None, description="Name of the agent.", alias="agentName") + location: Optional[StrictStr] = Field(default=None, description="Location of the agent.") + country_id: Optional[StrictStr] = Field(default=None, description="2-digit ISO country code", alias="countryId") + coordinates: Optional[Coordinates] = None + network_provider_info: Optional[SimpleAgentAllOfNetworkProviderInfo] = Field(default=None, alias="networkProviderInfo") + enabled: Optional[StrictBool] = Field(default=None, description="Flag indicating if the agent is enabled.") + verify_ssl_certificates: Optional[StrictBool] = Field(default=None, description="Flag indicating if has normal SSL operations or if instead it's set to ignore SSL errors on browserbot-based tests.", alias="verifySslCertificates") + prefix: Optional[StrictStr] = Field(default=None, description="Prefix containing agents public IP address.") + source_ip_address: Optional[StrictStr] = Field(default=None, description="IP address of the agent interface used as the source for the test. Returned when a source interface is selected.", alias="sourceIpAddress") + __properties: ClassVar[List[str]] = ["agentType", "ipAddresses", "publicIpAddresses", "network", "agentId", "agentName", "location", "countryId", "coordinates", "networkProviderInfo", "enabled", "verifySslCertificates", "prefix", "sourceIpAddress"] + + 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 TestAgentResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "ip_addresses", + "public_ip_addresses", + "network", + "agent_id", + "location", + "country_id", + "verify_ssl_certificates", + "prefix", + "source_ip_address", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of coordinates + if self.coordinates: + _dict['coordinates'] = self.coordinates.to_dict() + # override the default output from pydantic by calling `to_dict()` of network_provider_info + if self.network_provider_info: + _dict['networkProviderInfo'] = self.network_provider_info.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TestAgentResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "agentType": obj.get("agentType"), + "ipAddresses": obj.get("ipAddresses"), + "publicIpAddresses": obj.get("publicIpAddresses"), + "network": obj.get("network"), + "agentId": obj.get("agentId"), + "agentName": obj.get("agentName"), + "location": obj.get("location"), + "countryId": obj.get("countryId"), + "coordinates": Coordinates.from_dict(obj["coordinates"]) if obj.get("coordinates") is not None else None, + "networkProviderInfo": SimpleAgentAllOfNetworkProviderInfo.from_dict(obj["networkProviderInfo"]) if obj.get("networkProviderInfo") is not None else None, + "enabled": obj.get("enabled"), + "verifySslCertificates": obj.get("verifySslCertificates"), + "prefix": obj.get("prefix"), + "sourceIpAddress": obj.get("sourceIpAddress") + }) + return _obj + + diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_agent_response_properties.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_agent_response_properties.py new file mode 100644 index 000000000..4f3ff1440 --- /dev/null +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_agent_response_properties.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Instant Tests API + + The Instant Tests API operations lets you create and run new instant tests. You will need to be an Account Admin. The response does not include the immediate test results. Use the Test Results endpoints to get test results after creating and executing an instant test. You can find the URLs for these endpoints in the _links section of the test definition that is returned when you create the instant test. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class TestAgentResponseProperties(BaseModel): + """ + TestAgentResponseProperties + """ # noqa: E501 + source_ip_address: Optional[StrictStr] = Field(default=None, description="IP address of the agent interface used as the source for the test. Returned when a source interface is selected.", alias="sourceIpAddress") + __properties: ClassVar[List[str]] = ["sourceIpAddress"] + + 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 TestAgentResponseProperties from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "source_ip_address", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TestAgentResponseProperties from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sourceIpAddress": obj.get("sourceIpAddress") + }) + return _obj + + diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/voice_instant_test_response.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/voice_instant_test_response.py index 7207911f8..f2c40ba2c 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/voice_instant_test_response.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/voice_instant_test_response.py @@ -20,8 +20,8 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.instant_tests.models.agent_response import AgentResponse from thousandeyes_sdk.instant_tests.models.shared_with_account import SharedWithAccount +from thousandeyes_sdk.instant_tests.models.test_agent_response import TestAgentResponse from thousandeyes_sdk.instant_tests.models.test_dscp_id import TestDscpId from thousandeyes_sdk.instant_tests.models.test_label import TestLabel from thousandeyes_sdk.instant_tests.models.test_links import TestLinks @@ -57,7 +57,7 @@ class VoiceInstantTestResponse(BaseModel): port: Optional[Annotated[int, Field(le=65535, strict=True, ge=1024)]] = Field(default=None, description="Port number for the chosen protocol.") randomized_start_time: Optional[StrictBool] = Field(default=False, description="Indicates whether agents should randomize the start time in each test round.", alias="randomizedStartTime") target_agent_id: StrictStr = Field(description="Agent ID of the target agent for the test.", alias="targetAgentId") - agents: Optional[List[AgentResponse]] = Field(default=None, description="Contains list of agents.") + agents: Optional[List[TestAgentResponse]] = Field(default=None, description="Contains list of agents.") __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "codec", "codecId", "dscp", "dscpId", "duration", "jitterBuffer", "numPathTraces", "port", "randomizedStartTime", "targetAgentId", "agents"] model_config = ConfigDict( @@ -193,7 +193,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "port": obj.get("port"), "randomizedStartTime": obj.get("randomizedStartTime") if obj.get("randomizedStartTime") is not None else False, "targetAgentId": obj.get("targetAgentId"), - "agents": [AgentResponse.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + "agents": [TestAgentResponse.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None }) return _obj diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/web_transaction_instant_test_response.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/web_transaction_instant_test_response.py index 6981409b1..621ed2abe 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/web_transaction_instant_test_response.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/web_transaction_instant_test_response.py @@ -21,9 +21,9 @@ from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated from thousandeyes_sdk.instant_tests.models.agent_interfaces import AgentInterfaces -from thousandeyes_sdk.instant_tests.models.agent_response import AgentResponse from thousandeyes_sdk.instant_tests.models.o_auth import OAuth from thousandeyes_sdk.instant_tests.models.shared_with_account import SharedWithAccount +from thousandeyes_sdk.instant_tests.models.test_agent_response import TestAgentResponse from thousandeyes_sdk.instant_tests.models.test_auth_type import TestAuthType from thousandeyes_sdk.instant_tests.models.test_chromium_track import TestChromiumTrack from thousandeyes_sdk.instant_tests.models.test_custom_headers import TestCustomHeaders @@ -110,7 +110,7 @@ class WebTransactionInstantTestResponse(BaseModel): randomized_start_time: Optional[StrictBool] = Field(default=False, description="Indicates whether agents should randomize the start time in each test round.", alias="randomizedStartTime") identify_agent_traffic_with_user_agent: Optional[StrictBool] = Field(default=False, description="Determines how agent traffic is identified: * `false`: Adds the `x-thousandeyes-agent: yes` header. * `true`: Appends `(ThousandEyes Agent)` to the `user-agent` header. For more information, see [Notes on Agent ID Strategy](https://docs.thousandeyes.com/product-documentation/browser-synthetics/test-settings-page-load-transaction#notes-on-agent-id-strategy). ", alias="identifyAgentTrafficWithUserAgent") credentials: Optional[List[StrictStr]] = Field(default=None, description="Contains a list of credential IDs (get `credentialId` from `/credentials` endpoint).") - agents: Optional[List[AgentResponse]] = Field(default=None, description="Contains list of agents.") + agents: Optional[List[TestAgentResponse]] = Field(default=None, description="Contains list of agents.") __properties: ClassVar[List[str]] = ["createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "authType", "agentInterfaces", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "emulatedDeviceId", "targetTime", "timeLimit", "transactionScript", "flagCollectConsoleLogs", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "chromeOptions", "chromePolicies", "chromiumTrack", "pageLoadingStrategy", "randomizedStartTime", "identifyAgentTrafficWithUserAgent", "credentials", "agents"] model_config = ConfigDict( @@ -303,7 +303,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "randomizedStartTime": obj.get("randomizedStartTime") if obj.get("randomizedStartTime") is not None else False, "identifyAgentTrafficWithUserAgent": obj.get("identifyAgentTrafficWithUserAgent") if obj.get("identifyAgentTrafficWithUserAgent") is not None else False, "credentials": obj.get("credentials"), - "agents": [AgentResponse.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + "agents": [TestAgentResponse.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None }) return _obj diff --git a/thousandeyes-sdk-instant-tests/test/mock_manifest.py b/thousandeyes-sdk-instant-tests/test/mock_manifest.py index 0d77b9d61..82193ab99 100644 --- a/thousandeyes-sdk-instant-tests/test/mock_manifest.py +++ b/thousandeyes-sdk-instant-tests/test/mock_manifest.py @@ -186,6 +186,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -207,6 +208,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -572,6 +574,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -593,6 +596,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -857,6 +861,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -878,6 +883,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -1130,6 +1136,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -1151,6 +1158,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -1412,6 +1420,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -1433,6 +1442,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -1685,6 +1695,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -1706,6 +1717,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -1964,6 +1976,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -1985,6 +1998,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -2324,6 +2338,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -2345,6 +2360,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -2730,6 +2746,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -2751,6 +2768,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -3067,6 +3085,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -3088,6 +3107,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -3352,6 +3372,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -3373,6 +3394,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -3704,6 +3726,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -3725,6 +3748,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", diff --git a/thousandeyes-sdk-instant-tests/test/test_agent_to_agent_instant_tests_api.py b/thousandeyes-sdk-instant-tests/test/test_agent_to_agent_instant_tests_api.py index 94b3a0805..603e57413 100644 --- a/thousandeyes-sdk-instant-tests/test/test_agent_to_agent_instant_tests_api.py +++ b/thousandeyes-sdk-instant-tests/test/test_agent_to_agent_instant_tests_api.py @@ -153,6 +153,7 @@ def test_create_agent_to_agent_instant_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -174,6 +175,7 @@ def test_create_agent_to_agent_instant_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", diff --git a/thousandeyes-sdk-instant-tests/test/test_agent_to_agent_instant_tests_api_integration.py b/thousandeyes-sdk-instant-tests/test/test_agent_to_agent_instant_tests_api_integration.py index 656727f47..fcc58a69e 100644 --- a/thousandeyes-sdk-instant-tests/test/test_agent_to_agent_instant_tests_api_integration.py +++ b/thousandeyes-sdk-instant-tests/test/test_agent_to_agent_instant_tests_api_integration.py @@ -154,6 +154,7 @@ def test_create_agent_to_agent_instant_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -175,6 +176,7 @@ def test_create_agent_to_agent_instant_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", diff --git a/thousandeyes-sdk-instant-tests/test/test_agent_to_server_instant_tests_api.py b/thousandeyes-sdk-instant-tests/test/test_agent_to_server_instant_tests_api.py index 4cbc0252c..72b1594f3 100644 --- a/thousandeyes-sdk-instant-tests/test/test_agent_to_server_instant_tests_api.py +++ b/thousandeyes-sdk-instant-tests/test/test_agent_to_server_instant_tests_api.py @@ -155,6 +155,7 @@ def test_create_agent_to_server_instant_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -176,6 +177,7 @@ def test_create_agent_to_server_instant_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", diff --git a/thousandeyes-sdk-instant-tests/test/test_agent_to_server_instant_tests_api_integration.py b/thousandeyes-sdk-instant-tests/test/test_agent_to_server_instant_tests_api_integration.py index a258f6ecc..41b26aa4c 100644 --- a/thousandeyes-sdk-instant-tests/test/test_agent_to_server_instant_tests_api_integration.py +++ b/thousandeyes-sdk-instant-tests/test/test_agent_to_server_instant_tests_api_integration.py @@ -156,6 +156,7 @@ def test_create_agent_to_server_instant_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -177,6 +178,7 @@ def test_create_agent_to_server_instant_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", diff --git a/thousandeyes-sdk-instant-tests/test/test_api_instant_tests_api.py b/thousandeyes-sdk-instant-tests/test/test_api_instant_tests_api.py index 2786c920b..af63e2d45 100644 --- a/thousandeyes-sdk-instant-tests/test/test_api_instant_tests_api.py +++ b/thousandeyes-sdk-instant-tests/test/test_api_instant_tests_api.py @@ -351,6 +351,7 @@ def test_create_api_instant_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -372,6 +373,7 @@ def test_create_api_instant_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", diff --git a/thousandeyes-sdk-instant-tests/test/test_api_instant_tests_api_integration.py b/thousandeyes-sdk-instant-tests/test/test_api_instant_tests_api_integration.py index 69cc6d915..3dd3e3814 100644 --- a/thousandeyes-sdk-instant-tests/test/test_api_instant_tests_api_integration.py +++ b/thousandeyes-sdk-instant-tests/test/test_api_instant_tests_api_integration.py @@ -352,6 +352,7 @@ def test_create_api_instant_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -373,6 +374,7 @@ def test_create_api_instant_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", diff --git a/thousandeyes-sdk-instant-tests/test/test_dns_server_instant_tests_api.py b/thousandeyes-sdk-instant-tests/test/test_dns_server_instant_tests_api.py index a5cd64366..c821d5365 100644 --- a/thousandeyes-sdk-instant-tests/test/test_dns_server_instant_tests_api.py +++ b/thousandeyes-sdk-instant-tests/test/test_dns_server_instant_tests_api.py @@ -162,6 +162,7 @@ def test_create_dns_server_instant_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -183,6 +184,7 @@ def test_create_dns_server_instant_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", diff --git a/thousandeyes-sdk-instant-tests/test/test_dns_server_instant_tests_api_integration.py b/thousandeyes-sdk-instant-tests/test/test_dns_server_instant_tests_api_integration.py index c63df3c9c..50f63a15a 100644 --- a/thousandeyes-sdk-instant-tests/test/test_dns_server_instant_tests_api_integration.py +++ b/thousandeyes-sdk-instant-tests/test/test_dns_server_instant_tests_api_integration.py @@ -163,6 +163,7 @@ def test_create_dns_server_instant_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -184,6 +185,7 @@ def test_create_dns_server_instant_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", diff --git a/thousandeyes-sdk-instant-tests/test/test_dns_trace_instant_tests_api.py b/thousandeyes-sdk-instant-tests/test/test_dns_trace_instant_tests_api.py index e66a50eb8..4ffefe556 100644 --- a/thousandeyes-sdk-instant-tests/test/test_dns_trace_instant_tests_api.py +++ b/thousandeyes-sdk-instant-tests/test/test_dns_trace_instant_tests_api.py @@ -132,6 +132,7 @@ def test_create_dns_trace_instant_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -153,6 +154,7 @@ def test_create_dns_trace_instant_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", diff --git a/thousandeyes-sdk-instant-tests/test/test_dns_trace_instant_tests_api_integration.py b/thousandeyes-sdk-instant-tests/test/test_dns_trace_instant_tests_api_integration.py index ceed5706d..0a8b96c3a 100644 --- a/thousandeyes-sdk-instant-tests/test/test_dns_trace_instant_tests_api_integration.py +++ b/thousandeyes-sdk-instant-tests/test/test_dns_trace_instant_tests_api_integration.py @@ -133,6 +133,7 @@ def test_create_dns_trace_instant_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -154,6 +155,7 @@ def test_create_dns_trace_instant_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", diff --git a/thousandeyes-sdk-instant-tests/test/test_dnssec_instant_tests_api.py b/thousandeyes-sdk-instant-tests/test/test_dnssec_instant_tests_api.py index 34184aaa7..fb132caba 100644 --- a/thousandeyes-sdk-instant-tests/test/test_dnssec_instant_tests_api.py +++ b/thousandeyes-sdk-instant-tests/test/test_dnssec_instant_tests_api.py @@ -130,6 +130,7 @@ def test_create_dns_sec_instant_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -151,6 +152,7 @@ def test_create_dns_sec_instant_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", diff --git a/thousandeyes-sdk-instant-tests/test/test_dnssec_instant_tests_api_integration.py b/thousandeyes-sdk-instant-tests/test/test_dnssec_instant_tests_api_integration.py index 13557d94b..8f14bf197 100644 --- a/thousandeyes-sdk-instant-tests/test/test_dnssec_instant_tests_api_integration.py +++ b/thousandeyes-sdk-instant-tests/test/test_dnssec_instant_tests_api_integration.py @@ -131,6 +131,7 @@ def test_create_dns_sec_instant_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -152,6 +153,7 @@ def test_create_dns_sec_instant_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", diff --git a/thousandeyes-sdk-instant-tests/test/test_ftp_server_instant_tests_api.py b/thousandeyes-sdk-instant-tests/test/test_ftp_server_instant_tests_api.py index 5bf8c6d6e..95b6ca33c 100644 --- a/thousandeyes-sdk-instant-tests/test/test_ftp_server_instant_tests_api.py +++ b/thousandeyes-sdk-instant-tests/test/test_ftp_server_instant_tests_api.py @@ -162,6 +162,7 @@ def test_create_ftp_server_instant_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -183,6 +184,7 @@ def test_create_ftp_server_instant_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", diff --git a/thousandeyes-sdk-instant-tests/test/test_ftp_server_instant_tests_api_integration.py b/thousandeyes-sdk-instant-tests/test/test_ftp_server_instant_tests_api_integration.py index 2359e3714..ef8132361 100644 --- a/thousandeyes-sdk-instant-tests/test/test_ftp_server_instant_tests_api_integration.py +++ b/thousandeyes-sdk-instant-tests/test/test_ftp_server_instant_tests_api_integration.py @@ -163,6 +163,7 @@ def test_create_ftp_server_instant_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -184,6 +185,7 @@ def test_create_ftp_server_instant_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", diff --git a/thousandeyes-sdk-instant-tests/test/test_http_page_load_instant_tests_api.py b/thousandeyes-sdk-instant-tests/test/test_http_page_load_instant_tests_api.py index b66579c9e..49d7fb3bd 100644 --- a/thousandeyes-sdk-instant-tests/test/test_http_page_load_instant_tests_api.py +++ b/thousandeyes-sdk-instant-tests/test/test_http_page_load_instant_tests_api.py @@ -288,6 +288,7 @@ def test_create_page_load_instant_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -309,6 +310,7 @@ def test_create_page_load_instant_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", diff --git a/thousandeyes-sdk-instant-tests/test/test_http_page_load_instant_tests_api_integration.py b/thousandeyes-sdk-instant-tests/test/test_http_page_load_instant_tests_api_integration.py index 5e86dbed6..ad48ee087 100644 --- a/thousandeyes-sdk-instant-tests/test/test_http_page_load_instant_tests_api_integration.py +++ b/thousandeyes-sdk-instant-tests/test/test_http_page_load_instant_tests_api_integration.py @@ -289,6 +289,7 @@ def test_create_page_load_instant_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -310,6 +311,7 @@ def test_create_page_load_instant_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", diff --git a/thousandeyes-sdk-instant-tests/test/test_http_server_instant_tests_api.py b/thousandeyes-sdk-instant-tests/test/test_http_server_instant_tests_api.py index 4244690cf..63216faf8 100644 --- a/thousandeyes-sdk-instant-tests/test/test_http_server_instant_tests_api.py +++ b/thousandeyes-sdk-instant-tests/test/test_http_server_instant_tests_api.py @@ -271,6 +271,7 @@ def test_create_http_server_instant_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -292,6 +293,7 @@ def test_create_http_server_instant_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", diff --git a/thousandeyes-sdk-instant-tests/test/test_http_server_instant_tests_api_integration.py b/thousandeyes-sdk-instant-tests/test/test_http_server_instant_tests_api_integration.py index 89c41a453..db7d98a9d 100644 --- a/thousandeyes-sdk-instant-tests/test/test_http_server_instant_tests_api_integration.py +++ b/thousandeyes-sdk-instant-tests/test/test_http_server_instant_tests_api_integration.py @@ -272,6 +272,7 @@ def test_create_http_server_instant_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -293,6 +294,7 @@ def test_create_http_server_instant_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", diff --git a/thousandeyes-sdk-instant-tests/test/test_sip_server_instant_tests_api.py b/thousandeyes-sdk-instant-tests/test/test_sip_server_instant_tests_api.py index 5bb87910b..38fa99a05 100644 --- a/thousandeyes-sdk-instant-tests/test/test_sip_server_instant_tests_api.py +++ b/thousandeyes-sdk-instant-tests/test/test_sip_server_instant_tests_api.py @@ -162,6 +162,7 @@ def test_create_sip_server_instant_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -183,6 +184,7 @@ def test_create_sip_server_instant_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", diff --git a/thousandeyes-sdk-instant-tests/test/test_sip_server_instant_tests_api_integration.py b/thousandeyes-sdk-instant-tests/test/test_sip_server_instant_tests_api_integration.py index fc5104fd4..b510444c8 100644 --- a/thousandeyes-sdk-instant-tests/test/test_sip_server_instant_tests_api_integration.py +++ b/thousandeyes-sdk-instant-tests/test/test_sip_server_instant_tests_api_integration.py @@ -163,6 +163,7 @@ def test_create_sip_server_instant_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -184,6 +185,7 @@ def test_create_sip_server_instant_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", diff --git a/thousandeyes-sdk-instant-tests/test/test_voice_instant_tests_api.py b/thousandeyes-sdk-instant-tests/test/test_voice_instant_tests_api.py index 91e2b8a6d..406ca0abb 100644 --- a/thousandeyes-sdk-instant-tests/test/test_voice_instant_tests_api.py +++ b/thousandeyes-sdk-instant-tests/test/test_voice_instant_tests_api.py @@ -143,6 +143,7 @@ def test_create_voice_instant_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -164,6 +165,7 @@ def test_create_voice_instant_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", diff --git a/thousandeyes-sdk-instant-tests/test/test_voice_instant_tests_api_integration.py b/thousandeyes-sdk-instant-tests/test/test_voice_instant_tests_api_integration.py index 7531188ff..693f2f6b9 100644 --- a/thousandeyes-sdk-instant-tests/test/test_voice_instant_tests_api_integration.py +++ b/thousandeyes-sdk-instant-tests/test/test_voice_instant_tests_api_integration.py @@ -144,6 +144,7 @@ def test_create_voice_instant_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -165,6 +166,7 @@ def test_create_voice_instant_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", diff --git a/thousandeyes-sdk-instant-tests/test/test_web_transaction_instant_tests_api.py b/thousandeyes-sdk-instant-tests/test/test_web_transaction_instant_tests_api.py index adef707a8..01f1ccf7f 100644 --- a/thousandeyes-sdk-instant-tests/test/test_web_transaction_instant_tests_api.py +++ b/thousandeyes-sdk-instant-tests/test/test_web_transaction_instant_tests_api.py @@ -291,6 +291,7 @@ def test_create_web_transaction_instant_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -312,6 +313,7 @@ def test_create_web_transaction_instant_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", diff --git a/thousandeyes-sdk-instant-tests/test/test_web_transaction_instant_tests_api_integration.py b/thousandeyes-sdk-instant-tests/test/test_web_transaction_instant_tests_api_integration.py index 60ac20e4b..816683679 100644 --- a/thousandeyes-sdk-instant-tests/test/test_web_transaction_instant_tests_api_integration.py +++ b/thousandeyes-sdk-instant-tests/test/test_web_transaction_instant_tests_api_integration.py @@ -292,6 +292,7 @@ def test_create_web_transaction_instant_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -313,6 +314,7 @@ def test_create_web_transaction_instant_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", diff --git a/thousandeyes-sdk-internet-insights/README.md b/thousandeyes-sdk-internet-insights/README.md index 01be03092..4be3afd6d 100644 --- a/thousandeyes-sdk-internet-insights/README.md +++ b/thousandeyes-sdk-internet-insights/README.md @@ -16,7 +16,7 @@ For more information about Internet Insights, see the [Internet Insights](https: This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.99 +- API version: 7.0.101 - 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 723e019e8..d4a3a1745 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.99 +- API version: 7.0.101 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-streaming/README.md b/thousandeyes-sdk-streaming/README.md index 58351bf24..6edd6a11d 100644 --- a/thousandeyes-sdk-streaming/README.md +++ b/thousandeyes-sdk-streaming/README.md @@ -25,7 +25,7 @@ For more information about ThousandEyes for OpenTelemetry, see the [product docu This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.99 +- API version: 7.0.101 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-streaming/docs/CreateStreamResponse.md b/thousandeyes-sdk-streaming/docs/CreateStreamResponse.md index 76ebd54a6..b6ca6b30f 100644 --- a/thousandeyes-sdk-streaming/docs/CreateStreamResponse.md +++ b/thousandeyes-sdk-streaming/docs/CreateStreamResponse.md @@ -13,6 +13,7 @@ Name | Type | Description | Notes **endpoint_type** | [**EndpointType**](EndpointType.md) | | [optional] **stream_endpoint_url** | **str** | 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 data will be sent. Examples below: - `https://api.honeycomb.io:443/v1/metrics` - `https://ingest.eu0.signalfx.com/v2/datapoint/otlp` | [optional] **data_model_version** | [**DataModelVersion**](DataModelVersion.md) | | [optional] +**name** | **str** | Name of the data stream. When omitted, a name is generated on creation and the existing name is preserved on update. | [optional] **custom_headers** | **Dict[str, str]** | Custom headers. | [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. Tags are invalid if the tag key includes characters that are not allowed by the [OpenTelemetry naming recommendations for attributes](https://opentelemetry.io/docs/specs/semconv/general/naming/#recommendations-for-application-developers). | [optional] **test_match** | [**List[TestMatch]**](TestMatch.md) | A collection of tests to be included in the data stream. | [optional] diff --git a/thousandeyes-sdk-streaming/docs/GetStreamResponse.md b/thousandeyes-sdk-streaming/docs/GetStreamResponse.md index 4cb7c374c..0c8dee65d 100644 --- a/thousandeyes-sdk-streaming/docs/GetStreamResponse.md +++ b/thousandeyes-sdk-streaming/docs/GetStreamResponse.md @@ -13,6 +13,7 @@ Name | Type | Description | Notes **endpoint_type** | [**EndpointType**](EndpointType.md) | | [optional] **stream_endpoint_url** | **str** | 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 data will be sent. Examples below: - `https://api.honeycomb.io:443/v1/metrics` - `https://ingest.eu0.signalfx.com/v2/datapoint/otlp` | [optional] **data_model_version** | [**DataModelVersion**](DataModelVersion.md) | | [optional] +**name** | **str** | Name of the data stream. When omitted, a name is generated on creation and the existing name is preserved on update. | [optional] **custom_headers** | **Dict[str, str]** | Custom headers. | [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. Tags are invalid if the tag key includes characters that are not allowed by the [OpenTelemetry naming recommendations for attributes](https://opentelemetry.io/docs/specs/semconv/general/naming/#recommendations-for-application-developers). | [optional] **test_match** | [**List[TestMatch]**](TestMatch.md) | A collection of tests to be included in the data stream. | [optional] diff --git a/thousandeyes-sdk-streaming/docs/PutStream.md b/thousandeyes-sdk-streaming/docs/PutStream.md index 37748d325..96b3354e5 100644 --- a/thousandeyes-sdk-streaming/docs/PutStream.md +++ b/thousandeyes-sdk-streaming/docs/PutStream.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**name** | **str** | Name of the data stream. When omitted, a name is generated on creation and the existing name is preserved on update. | [optional] **custom_headers** | **Dict[str, str]** | Custom headers. | [optional] **stream_endpoint_url** | **str** | 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 data will be sent. Examples below: - `https://api.honeycomb.io:443/v1/metrics` - `https://ingest.eu0.signalfx.com/v2/datapoint/otlp` | [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. Tags are invalid if the tag key includes characters that are not allowed by the [OpenTelemetry naming recommendations for attributes](https://opentelemetry.io/docs/specs/semconv/general/naming/#recommendations-for-application-developers). | [optional] diff --git a/thousandeyes-sdk-streaming/docs/Stream.md b/thousandeyes-sdk-streaming/docs/Stream.md index 23f364721..3f6f15058 100644 --- a/thousandeyes-sdk-streaming/docs/Stream.md +++ b/thousandeyes-sdk-streaming/docs/Stream.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**name** | **str** | Name of the data stream. When omitted, a name is generated on creation and the existing name is preserved on update. | [optional] **custom_headers** | **Dict[str, str]** | Custom headers. | [optional] **stream_endpoint_url** | **str** | 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 data will be sent. Examples below: - `https://api.honeycomb.io:443/v1/metrics` - `https://ingest.eu0.signalfx.com/v2/datapoint/otlp` | [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. Tags are invalid if the tag key includes characters that are not allowed by the [OpenTelemetry naming recommendations for attributes](https://opentelemetry.io/docs/specs/semconv/general/naming/#recommendations-for-application-developers). | [optional] diff --git a/thousandeyes-sdk-streaming/docs/StreamingApi.md b/thousandeyes-sdk-streaming/docs/StreamingApi.md index c40e037a8..1a7569786 100644 --- a/thousandeyes-sdk-streaming/docs/StreamingApi.md +++ b/thousandeyes-sdk-streaming/docs/StreamingApi.md @@ -438,6 +438,7 @@ Name | Type | Description | Notes **401** | Unauthorized | - | **403** | Forbidden | - | **404** | Not Found | - | +**409** | A data stream with the same name already exists | - | **429** | Too Many Requests | - | **500** | Internal Server Error | - | diff --git a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/api/streaming_api.py b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/api/streaming_api.py index 194062eb7..f0992ab96 100644 --- a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/api/streaming_api.py +++ b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/api/streaming_api.py @@ -1322,6 +1322,7 @@ def update_stream( '401': "UnauthorizedError", '403': None, '404': None, + '409': None, '429': None, '500': "ApiError", } @@ -1405,6 +1406,7 @@ def update_stream_with_http_info( '401': "UnauthorizedError", '403': None, '404': None, + '409': None, '429': None, '500': "ApiError", } @@ -1488,6 +1490,7 @@ def update_stream_without_preload_content( '401': "UnauthorizedError", '403': None, '404': None, + '409': None, '429': None, '500': "ApiError", } 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 0375dec39..fc411ad45 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 @@ -18,6 +18,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated 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_agent_label import EndpointAgentLabel @@ -47,6 +48,7 @@ class CreateStreamResponse(BaseModel): 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 data 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") + name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=255)]] = Field(default=None, description="Name of the data stream. When omitted, a name is generated on creation and the existing name is preserved on update.") custom_headers: Optional[Dict[str, StrictStr]] = Field(default=None, description="Custom headers.", 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. Tags are invalid if the tag key includes characters that are not allowed by the [OpenTelemetry naming recommendations for attributes](https://opentelemetry.io/docs/specs/semconv/general/naming/#recommendations-for-application-developers).", alias="tagMatch") test_match: Optional[List[TestMatch]] = Field(default=None, description="A collection of tests to be included in the data stream.", alias="testMatch") @@ -57,7 +59,7 @@ class CreateStreamResponse(BaseModel): endpoint_agent_tag: Optional[List[EndpointAgentTag]] = Field(default=None, description="A collection of Endpoint Agent Tag IDs that determines what local network data is included in the data stream. `endpointAgentLabel` and `endpointAgentTag` represent the same data. Configure only one; both are synchronized.", alias="endpointAgentTag") audit_operation: Optional[AuditOperation] = Field(default=None, alias="auditOperation") stream_status: Optional[StreamStatus] = Field(default=None, alias="streamStatus") - __properties: ClassVar[List[str]] = ["id", "enabled", "_links", "type", "signal", "endpointType", "streamEndpointUrl", "dataModelVersion", "customHeaders", "tagMatch", "testMatch", "filters", "inputConfig", "exporterConfig", "endpointAgentLabel", "endpointAgentTag", "auditOperation", "streamStatus"] + __properties: ClassVar[List[str]] = ["id", "enabled", "_links", "type", "signal", "endpointType", "streamEndpointUrl", "dataModelVersion", "name", "customHeaders", "tagMatch", "testMatch", "filters", "inputConfig", "exporterConfig", "endpointAgentLabel", "endpointAgentTag", "auditOperation", "streamStatus"] model_config = ConfigDict( populate_by_name=True, @@ -167,6 +169,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "endpointType": obj.get("endpointType"), "streamEndpointUrl": obj.get("streamEndpointUrl"), "dataModelVersion": obj.get("dataModelVersion"), + "name": obj.get("name"), "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, 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 5e445440c..45d6bc96d 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 @@ -18,6 +18,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated from thousandeyes_sdk.streaming.models.audit_operation_with_update import AuditOperationWithUpdate from thousandeyes_sdk.streaming.models.data_model_version import DataModelVersion from thousandeyes_sdk.streaming.models.endpoint_agent_label import EndpointAgentLabel @@ -47,6 +48,7 @@ class GetStreamResponse(BaseModel): 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 data 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") + name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=255)]] = Field(default=None, description="Name of the data stream. When omitted, a name is generated on creation and the existing name is preserved on update.") custom_headers: Optional[Dict[str, StrictStr]] = Field(default=None, description="Custom headers.", 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. Tags are invalid if the tag key includes characters that are not allowed by the [OpenTelemetry naming recommendations for attributes](https://opentelemetry.io/docs/specs/semconv/general/naming/#recommendations-for-application-developers).", alias="tagMatch") test_match: Optional[List[TestMatch]] = Field(default=None, description="A collection of tests to be included in the data stream.", alias="testMatch") @@ -57,7 +59,7 @@ class GetStreamResponse(BaseModel): endpoint_agent_tag: Optional[List[EndpointAgentTag]] = Field(default=None, description="A collection of Endpoint Agent Tag IDs that determines what local network data is included in the data stream. `endpointAgentLabel` and `endpointAgentTag` represent the same data. Configure only one; both are synchronized.", alias="endpointAgentTag") audit_operation: Optional[AuditOperationWithUpdate] = Field(default=None, alias="auditOperation") stream_status: Optional[StreamStatus] = Field(default=None, alias="streamStatus") - __properties: ClassVar[List[str]] = ["id", "enabled", "_links", "type", "signal", "endpointType", "streamEndpointUrl", "dataModelVersion", "customHeaders", "tagMatch", "testMatch", "filters", "inputConfig", "exporterConfig", "endpointAgentLabel", "endpointAgentTag", "auditOperation", "streamStatus"] + __properties: ClassVar[List[str]] = ["id", "enabled", "_links", "type", "signal", "endpointType", "streamEndpointUrl", "dataModelVersion", "name", "customHeaders", "tagMatch", "testMatch", "filters", "inputConfig", "exporterConfig", "endpointAgentLabel", "endpointAgentTag", "auditOperation", "streamStatus"] model_config = ConfigDict( populate_by_name=True, @@ -167,6 +169,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "endpointType": obj.get("endpointType"), "streamEndpointUrl": obj.get("streamEndpointUrl"), "dataModelVersion": obj.get("dataModelVersion"), + "name": obj.get("name"), "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, 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 9bba4fce5..c94234ff2 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 @@ -18,6 +18,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated from thousandeyes_sdk.streaming.models.endpoint_agent_label import EndpointAgentLabel from thousandeyes_sdk.streaming.models.endpoint_agent_tag import EndpointAgentTag from thousandeyes_sdk.streaming.models.exporter_config import ExporterConfig @@ -32,6 +33,7 @@ class PutStream(BaseModel): """ PutStream """ # noqa: E501 + name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=255)]] = Field(default=None, description="Name of the data stream. When omitted, a name is generated on creation and the existing name is preserved on update.") custom_headers: Optional[Dict[str, StrictStr]] = Field(default=None, description="Custom headers.", alias="customHeaders") 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 data will be sent. Examples below: - `https://api.honeycomb.io:443/v1/metrics` - `https://ingest.eu0.signalfx.com/v2/datapoint/otlp`", alias="streamEndpointUrl") 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. Tags are invalid if the tag key includes characters that are not allowed by the [OpenTelemetry naming recommendations for attributes](https://opentelemetry.io/docs/specs/semconv/general/naming/#recommendations-for-application-developers).", alias="tagMatch") @@ -42,7 +44,7 @@ class PutStream(BaseModel): exporter_config: Optional[ExporterConfig] = Field(default=None, alias="exporterConfig") endpoint_agent_label: Optional[List[EndpointAgentLabel]] = Field(default=None, description="A collection of Endpoint Agent label IDs that determines what local network data is included in the data stream. `endpointAgentLabel` and `endpointAgentTag` represent the same data. Configure only one; both are synchronized.", alias="endpointAgentLabel") endpoint_agent_tag: Optional[List[EndpointAgentTag]] = Field(default=None, description="A collection of Endpoint Agent Tag IDs that determines what local network data is included in the data stream. `endpointAgentLabel` and `endpointAgentTag` represent the same data. Configure only one; both are synchronized.", alias="endpointAgentTag") - __properties: ClassVar[List[str]] = ["customHeaders", "streamEndpointUrl", "tagMatch", "testMatch", "enabled", "filters", "inputConfig", "exporterConfig", "endpointAgentLabel", "endpointAgentTag"] + __properties: ClassVar[List[str]] = ["name", "customHeaders", "streamEndpointUrl", "tagMatch", "testMatch", "enabled", "filters", "inputConfig", "exporterConfig", "endpointAgentLabel", "endpointAgentTag"] model_config = ConfigDict( populate_by_name=True, @@ -133,6 +135,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "name": obj.get("name"), "customHeaders": obj.get("customHeaders"), "streamEndpointUrl": obj.get("streamEndpointUrl"), "tagMatch": [TagMatch.from_dict(_item) for _item in obj["tagMatch"]] if obj.get("tagMatch") is not None else None, 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 e7d67aae4..f30f2e479 100644 --- a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/stream.py +++ b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/stream.py @@ -18,6 +18,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated from thousandeyes_sdk.streaming.models.data_model_version import DataModelVersion from thousandeyes_sdk.streaming.models.endpoint_agent_label import EndpointAgentLabel from thousandeyes_sdk.streaming.models.endpoint_agent_tag import EndpointAgentTag @@ -36,6 +37,7 @@ class Stream(BaseModel): """ Stream """ # noqa: E501 + name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=255)]] = Field(default=None, description="Name of the data stream. When omitted, a name is generated on creation and the existing name is preserved on update.") custom_headers: Optional[Dict[str, StrictStr]] = Field(default=None, description="Custom headers.", alias="customHeaders") 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 data will be sent. Examples below: - `https://api.honeycomb.io:443/v1/metrics` - `https://ingest.eu0.signalfx.com/v2/datapoint/otlp`", alias="streamEndpointUrl") 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. Tags are invalid if the tag key includes characters that are not allowed by the [OpenTelemetry naming recommendations for attributes](https://opentelemetry.io/docs/specs/semconv/general/naming/#recommendations-for-application-developers).", alias="tagMatch") @@ -50,7 +52,7 @@ class Stream(BaseModel): signal: Optional[Signal] = None endpoint_type: Optional[EndpointType] = Field(default=None, alias="endpointType") data_model_version: Optional[DataModelVersion] = Field(default=None, alias="dataModelVersion") - __properties: ClassVar[List[str]] = ["customHeaders", "streamEndpointUrl", "tagMatch", "testMatch", "enabled", "filters", "inputConfig", "exporterConfig", "endpointAgentLabel", "endpointAgentTag", "type", "signal", "endpointType", "dataModelVersion"] + __properties: ClassVar[List[str]] = ["name", "customHeaders", "streamEndpointUrl", "tagMatch", "testMatch", "enabled", "filters", "inputConfig", "exporterConfig", "endpointAgentLabel", "endpointAgentTag", "type", "signal", "endpointType", "dataModelVersion"] model_config = ConfigDict( populate_by_name=True, @@ -141,6 +143,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "name": obj.get("name"), "customHeaders": obj.get("customHeaders"), "streamEndpointUrl": obj.get("streamEndpointUrl"), "tagMatch": [TagMatch.from_dict(_item) for _item in obj["tagMatch"]] if obj.get("tagMatch") is not None else None, diff --git a/thousandeyes-sdk-streaming/test/mock_manifest.py b/thousandeyes-sdk-streaming/test/mock_manifest.py index 7f8ea0102..12f09f494 100644 --- a/thousandeyes-sdk-streaming/test/mock_manifest.py +++ b/thousandeyes-sdk-streaming/test/mock_manifest.py @@ -82,6 +82,7 @@ "id" : "5678", "domain" : "endpoint" } ], + "name" : "Production metrics stream", "tagMatch" : [ { "key" : "keyA", "value" : "valueA" @@ -163,6 +164,7 @@ "id" : "5678", "domain" : "endpoint" } ], + "name" : "Production metrics stream", "tagMatch" : [ { "key" : "keyA", "value" : "valueA" @@ -333,6 +335,7 @@ "id" : "5678", "domain" : "endpoint" } ], + "name" : "Production metrics stream", "tagMatch" : [ { "key" : "keyA", "value" : "valueA" @@ -456,6 +459,7 @@ "id" : "5678", "domain" : "endpoint" } ], + "name" : "Production metrics stream", "tagMatch" : [ { "key" : "keyA", "value" : "valueA" @@ -536,6 +540,7 @@ "id" : "5678", "domain" : "endpoint" } ], + "name" : "Production metrics stream", "tagMatch" : [ { "key" : "keyA", "value" : "valueA" @@ -672,6 +677,7 @@ "id" : "5678", "domain" : "endpoint" } ], + "name" : "Production metrics stream", "tagMatch" : [ { "key" : "keyA", "value" : "valueA" @@ -746,6 +752,7 @@ "token" : "d0a91307-be2f-4218-a9f8-71c02d98846b" } }, + "name" : "Production metrics stream", "tagMatch" : [ { "key" : "keyA", "value" : "valueA" diff --git a/thousandeyes-sdk-streaming/test/test_streaming_api.py b/thousandeyes-sdk-streaming/test/test_streaming_api.py index d41c2794d..4bc5fed77 100644 --- a/thousandeyes-sdk-streaming/test/test_streaming_api.py +++ b/thousandeyes-sdk-streaming/test/test_streaming_api.py @@ -82,6 +82,7 @@ def test_create_stream_models_validation(self) -> None: "id" : "5678", "domain" : "endpoint" } ], + "name" : "Production metrics stream", "tagMatch" : [ { "key" : "keyA", "value" : "valueA" @@ -158,6 +159,7 @@ def test_create_stream_models_validation(self) -> None: "id" : "5678", "domain" : "endpoint" } ], + "name" : "Production metrics stream", "tagMatch" : [ { "key" : "keyA", "value" : "valueA" @@ -250,6 +252,7 @@ def test_get_stream_models_validation(self) -> None: "id" : "5678", "domain" : "endpoint" } ], + "name" : "Production metrics stream", "tagMatch" : [ { "key" : "keyA", "value" : "valueA" @@ -340,6 +343,7 @@ def test_get_streams_models_validation(self) -> None: "id" : "5678", "domain" : "endpoint" } ], + "name" : "Production metrics stream", "tagMatch" : [ { "key" : "keyA", "value" : "valueA" @@ -420,6 +424,7 @@ def test_get_streams_models_validation(self) -> None: "id" : "5678", "domain" : "endpoint" } ], + "name" : "Production metrics stream", "tagMatch" : [ { "key" : "keyA", "value" : "valueA" @@ -498,6 +503,7 @@ def test_update_stream_models_validation(self) -> None: "token" : "d0a91307-be2f-4218-a9f8-71c02d98846b" } }, + "name" : "Production metrics stream", "tagMatch" : [ { "key" : "keyA", "value" : "valueA" @@ -579,6 +585,7 @@ def test_update_stream_models_validation(self) -> None: "id" : "5678", "domain" : "endpoint" } ], + "name" : "Production metrics stream", "tagMatch" : [ { "key" : "keyA", "value" : "valueA" diff --git a/thousandeyes-sdk-streaming/test/test_streaming_api_integration.py b/thousandeyes-sdk-streaming/test/test_streaming_api_integration.py index 8d6407953..f832e4865 100644 --- a/thousandeyes-sdk-streaming/test/test_streaming_api_integration.py +++ b/thousandeyes-sdk-streaming/test/test_streaming_api_integration.py @@ -84,6 +84,7 @@ def test_create_stream_happy_path(self) -> None: "id" : "5678", "domain" : "endpoint" } ], + "name" : "Production metrics stream", "tagMatch" : [ { "key" : "keyA", "value" : "valueA" @@ -158,6 +159,7 @@ def test_create_stream_happy_path(self) -> None: "id" : "5678", "domain" : "endpoint" } ], + "name" : "Production metrics stream", "tagMatch" : [ { "key" : "keyA", "value" : "valueA" @@ -249,6 +251,7 @@ def test_create_stream_error_400(self) -> None: "id" : "5678", "domain" : "endpoint" } ], + "name" : "Production metrics stream", "tagMatch" : [ { "key" : "keyA", "value" : "valueA" @@ -344,6 +347,7 @@ def test_create_stream_error_401(self) -> None: "id" : "5678", "domain" : "endpoint" } ], + "name" : "Production metrics stream", "tagMatch" : [ { "key" : "keyA", "value" : "valueA" @@ -437,6 +441,7 @@ def test_create_stream_error_412(self) -> None: "id" : "5678", "domain" : "endpoint" } ], + "name" : "Production metrics stream", "tagMatch" : [ { "key" : "keyA", "value" : "valueA" @@ -532,6 +537,7 @@ def test_create_stream_error_500(self) -> None: "id" : "5678", "domain" : "endpoint" } ], + "name" : "Production metrics stream", "tagMatch" : [ { "key" : "keyA", "value" : "valueA" @@ -706,6 +712,7 @@ def test_get_stream_happy_path(self) -> None: "id" : "5678", "domain" : "endpoint" } ], + "name" : "Production metrics stream", "tagMatch" : [ { "key" : "keyA", "value" : "valueA" @@ -867,6 +874,7 @@ def test_get_streams_happy_path(self) -> None: "id" : "5678", "domain" : "endpoint" } ], + "name" : "Production metrics stream", "tagMatch" : [ { "key" : "keyA", "value" : "valueA" @@ -947,6 +955,7 @@ def test_get_streams_happy_path(self) -> None: "id" : "5678", "domain" : "endpoint" } ], + "name" : "Production metrics stream", "tagMatch" : [ { "key" : "keyA", "value" : "valueA" @@ -1115,6 +1124,7 @@ def test_update_stream_happy_path(self) -> None: "token" : "d0a91307-be2f-4218-a9f8-71c02d98846b" } }, + "name" : "Production metrics stream", "tagMatch" : [ { "key" : "keyA", "value" : "valueA" @@ -1195,6 +1205,7 @@ def test_update_stream_happy_path(self) -> None: "id" : "5678", "domain" : "endpoint" } ], + "name" : "Production metrics stream", "tagMatch" : [ { "key" : "keyA", "value" : "valueA" @@ -1281,6 +1292,7 @@ def test_update_stream_error_400(self) -> None: "token" : "d0a91307-be2f-4218-a9f8-71c02d98846b" } }, + "name" : "Production metrics stream", "tagMatch" : [ { "key" : "keyA", "value" : "valueA" @@ -1375,6 +1387,7 @@ def test_update_stream_error_401(self) -> None: "token" : "d0a91307-be2f-4218-a9f8-71c02d98846b" } }, + "name" : "Production metrics stream", "tagMatch" : [ { "key" : "keyA", "value" : "valueA" @@ -1467,6 +1480,7 @@ def test_update_stream_error_500(self) -> None: "token" : "d0a91307-be2f-4218-a9f8-71c02d98846b" } }, + "name" : "Production metrics stream", "tagMatch" : [ { "key" : "keyA", "value" : "valueA" diff --git a/thousandeyes-sdk-tags/README.md b/thousandeyes-sdk-tags/README.md index a8c61ce7d..e7db7569b 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.99 +- API version: 7.0.101 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-tags/docs/Tag.md b/thousandeyes-sdk-tags/docs/Tag.md index 7a90d7ef3..975fee324 100644 --- a/thousandeyes-sdk-tags/docs/Tag.md +++ b/thousandeyes-sdk-tags/docs/Tag.md @@ -21,7 +21,7 @@ Name | Type | Description | Notes **type** | [**Type**](Type.md) | | [optional] **value** | **str** | The tag's value | [optional] **match_type** | [**TagMatchType**](TagMatchType.md) | | [optional] -**filters** | [**List[TagFilter]**](TagFilter.md) | The combination of filters (filter keys) dynamically assigned to an `endpoint-agent` as determined by the matching logic (`and` or `or`). For example, if you filter on `bssid` and `ssid` with a matching logic of `and`, both filters are assigned as tags to the `endpoint-agent`; `or` means either filter can be assigned. **Note:** filters currently only apply to `endpoint-agent` object types. | [optional] +**filters** | [**List[TagFilter]**](TagFilter.md) | Filter criteria used to dynamically assign the tag to endpoint agents. The matching logic determines how multiple filters are evaluated: `and` requires all filters to match, while `or` requires any filter to match. Filters are supported only for `endpoint-agent` object types. | [optional] **links** | [**SelfLinks**](SelfLinks.md) | | [optional] ## Example diff --git a/thousandeyes-sdk-tags/docs/TagBulkCreateError.md b/thousandeyes-sdk-tags/docs/TagBulkCreateError.md index bd325288d..26e4c7635 100644 --- a/thousandeyes-sdk-tags/docs/TagBulkCreateError.md +++ b/thousandeyes-sdk-tags/docs/TagBulkCreateError.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **tag** | [**Dict[str, TagInfo]**](TagInfo.md) | | [optional] -**response_code** | **int** | HTTP response code | [optional] -**message** | **str** | Status / error message | [optional] +**response_code** | **int** | HTTP response code. | [optional] +**message** | **str** | Status or error message. | [optional] ## Example diff --git a/thousandeyes-sdk-tags/docs/TagInfo.md b/thousandeyes-sdk-tags/docs/TagInfo.md index 4f8f35b4d..963aa4017 100644 --- a/thousandeyes-sdk-tags/docs/TagInfo.md +++ b/thousandeyes-sdk-tags/docs/TagInfo.md @@ -21,7 +21,7 @@ Name | Type | Description | Notes **type** | [**Type**](Type.md) | | [optional] **value** | **str** | The tag's value | [optional] **match_type** | [**TagMatchType**](TagMatchType.md) | | [optional] -**filters** | [**List[TagFilter]**](TagFilter.md) | The combination of filters (filter keys) dynamically assigned to an `endpoint-agent` as determined by the matching logic (`and` or `or`). For example, if you filter on `bssid` and `ssid` with a matching logic of `and`, both filters are assigned as tags to the `endpoint-agent`; `or` means either filter can be assigned. **Note:** filters currently only apply to `endpoint-agent` object types. | [optional] +**filters** | [**List[TagFilter]**](TagFilter.md) | Filter criteria used to dynamically assign the tag to endpoint agents. The matching logic determines how multiple filters are evaluated: `and` requires all filters to match, while `or` requires any filter to match. Filters are supported only for `endpoint-agent` object types. | [optional] ## Example diff --git a/thousandeyes-sdk-tags/docs/TagsApi.md b/thousandeyes-sdk-tags/docs/TagsApi.md index 008bf21ce..303aba5b9 100644 --- a/thousandeyes-sdk-tags/docs/TagsApi.md +++ b/thousandeyes-sdk-tags/docs/TagsApi.md @@ -17,7 +17,7 @@ Method | HTTP request | Description Create tag -Creates a new tag. +Creates a new tag. Creating a dynamic endpoint-agent tag (`objectType: endpoint-agent`, `type: dynamic`) requires all Endpoint Agent PII view permissions. Requests missing any of these permissions return `403`. For more information, see [Endpoint Agent permissions](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents#endpoint-agent-permissions). ### Example @@ -92,6 +92,7 @@ Name | Type | Description | Notes **201** | item created | - | **400** | Bad Request | - | **401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | **409** | An existing item already exists | - | **500** | Internal Server Error | - | @@ -102,7 +103,7 @@ Name | Type | Description | Notes 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. +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. Creating a dynamic endpoint-agent tag (`objectType: endpoint-agent`, `type: dynamic`) requires all Endpoint Agent PII view permissions. A tag that fails this permission check is reported as a per-item `403` in the `errors` array, while the top-level status remains `207`. If the caller does not have permission to create tags, the request returns a top-level `403`. For more information, see [Endpoint Agent permissions](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents#endpoint-agent-permissions). ### Example @@ -176,6 +177,7 @@ Name | Type | Description | Notes **207** | Item created | - | **400** | Bad Request | - | **401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | **500** | Internal Server Error | - | [[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) @@ -441,7 +443,7 @@ Name | Type | Description | Notes Update tag -Updates a tag. +Updates a tag. Updating a dynamic endpoint-agent tag (`objectType: endpoint-agent`, `type: dynamic`) requires all Endpoint Agent PII view permissions. Requests missing any of these permissions return `403`. For more information, see [Endpoint Agent permissions](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents#endpoint-agent-permissions). ### Example 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 8489f4b28..a072eea06 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 @@ -67,7 +67,7 @@ def create_tag( ) -> Tag: """Create tag - Creates a new tag. + Creates a new tag. Creating a dynamic endpoint-agent tag (`objectType: endpoint-agent`, `type: dynamic`) requires all Endpoint Agent PII view permissions. Requests missing any of these permissions return `403`. For more information, see [Endpoint Agent permissions](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents#endpoint-agent-permissions). :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. :type aid: str @@ -108,6 +108,7 @@ def create_tag( '201': "Tag", '400': "ValidationError", '401': "UnauthorizedError", + '403': "Error", '409': None, '500': "ApiError", } @@ -143,7 +144,7 @@ def create_tag_with_http_info( ) -> ApiResponse[Tag]: """Create tag - Creates a new tag. + Creates a new tag. Creating a dynamic endpoint-agent tag (`objectType: endpoint-agent`, `type: dynamic`) requires all Endpoint Agent PII view permissions. Requests missing any of these permissions return `403`. For more information, see [Endpoint Agent permissions](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents#endpoint-agent-permissions). :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. :type aid: str @@ -184,6 +185,7 @@ def create_tag_with_http_info( '201': "Tag", '400': "ValidationError", '401': "UnauthorizedError", + '403': "Error", '409': None, '500': "ApiError", } @@ -219,7 +221,7 @@ def create_tag_without_preload_content( ) -> RESTResponseType: """Create tag - Creates a new tag. + Creates a new tag. Creating a dynamic endpoint-agent tag (`objectType: endpoint-agent`, `type: dynamic`) requires all Endpoint Agent PII view permissions. Requests missing any of these permissions return `403`. For more information, see [Endpoint Agent permissions](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents#endpoint-agent-permissions). :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. :type aid: str @@ -260,6 +262,7 @@ def create_tag_without_preload_content( '201': "Tag", '400': "ValidationError", '401': "UnauthorizedError", + '403': "Error", '409': None, '500': "ApiError", } @@ -371,7 +374,7 @@ def create_tags( ) -> 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. + 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. Creating a dynamic endpoint-agent tag (`objectType: endpoint-agent`, `type: dynamic`) requires all Endpoint Agent PII view permissions. A tag that fails this permission check is reported as a per-item `403` in the `errors` array, while the top-level status remains `207`. If the caller does not have permission to create tags, the request returns a top-level `403`. For more information, see [Endpoint Agent permissions](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents#endpoint-agent-permissions). :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. :type aid: str @@ -412,6 +415,7 @@ def create_tags( '207': "BulkTagResponse", '400': "ValidationError", '401': "UnauthorizedError", + '403': "Error", '500': "ApiError", } response_data = self.api_client.call_api( @@ -446,7 +450,7 @@ def create_tags_with_http_info( ) -> 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. + 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. Creating a dynamic endpoint-agent tag (`objectType: endpoint-agent`, `type: dynamic`) requires all Endpoint Agent PII view permissions. A tag that fails this permission check is reported as a per-item `403` in the `errors` array, while the top-level status remains `207`. If the caller does not have permission to create tags, the request returns a top-level `403`. For more information, see [Endpoint Agent permissions](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents#endpoint-agent-permissions). :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. :type aid: str @@ -487,6 +491,7 @@ def create_tags_with_http_info( '207': "BulkTagResponse", '400': "ValidationError", '401': "UnauthorizedError", + '403': "Error", '500': "ApiError", } response_data = self.api_client.call_api( @@ -521,7 +526,7 @@ def create_tags_without_preload_content( ) -> RESTResponseType: """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. + 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. Creating a dynamic endpoint-agent tag (`objectType: endpoint-agent`, `type: dynamic`) requires all Endpoint Agent PII view permissions. A tag that fails this permission check is reported as a per-item `403` in the `errors` array, while the top-level status remains `207`. If the caller does not have permission to create tags, the request returns a top-level `403`. For more information, see [Endpoint Agent permissions](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents#endpoint-agent-permissions). :param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. :type aid: str @@ -562,6 +567,7 @@ def create_tags_without_preload_content( '207': "BulkTagResponse", '400': "ValidationError", '401': "UnauthorizedError", + '403': "Error", '500': "ApiError", } response_data = self.api_client.call_api( @@ -1575,7 +1581,7 @@ def update_tag( ) -> Tag: """Update tag - Updates a tag. + Updates a tag. Updating a dynamic endpoint-agent tag (`objectType: endpoint-agent`, `type: dynamic`) requires all Endpoint Agent PII view permissions. Requests missing any of these permissions return `403`. For more information, see [Endpoint Agent permissions](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents#endpoint-agent-permissions). :param id: ID of tag to update (required) :type id: str @@ -1656,7 +1662,7 @@ def update_tag_with_http_info( ) -> ApiResponse[Tag]: """Update tag - Updates a tag. + Updates a tag. Updating a dynamic endpoint-agent tag (`objectType: endpoint-agent`, `type: dynamic`) requires all Endpoint Agent PII view permissions. Requests missing any of these permissions return `403`. For more information, see [Endpoint Agent permissions](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents#endpoint-agent-permissions). :param id: ID of tag to update (required) :type id: str @@ -1737,7 +1743,7 @@ def update_tag_without_preload_content( ) -> RESTResponseType: """Update tag - Updates a tag. + Updates a tag. Updating a dynamic endpoint-agent tag (`objectType: endpoint-agent`, `type: dynamic`) requires all Endpoint Agent PII view permissions. Requests missing any of these permissions return `403`. For more information, see [Endpoint Agent permissions](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents#endpoint-agent-permissions). :param id: ID of tag to update (required) :type id: str diff --git a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/tag.py b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/tag.py index 0370bb8f1..9681b42ba 100644 --- a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/tag.py +++ b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/tag.py @@ -49,7 +49,7 @@ class Tag(BaseModel): type: Optional[Type] = None value: Optional[StrictStr] = Field(default=None, description="The tag's value") match_type: Optional[TagMatchType] = Field(default=None, alias="matchType") - filters: Optional[List[TagFilter]] = Field(default=None, description="The combination of filters (filter keys) dynamically assigned to an `endpoint-agent` as determined by the matching logic (`and` or `or`). For example, if you filter on `bssid` and `ssid` with a matching logic of `and`, both filters are assigned as tags to the `endpoint-agent`; `or` means either filter can be assigned. **Note:** filters currently only apply to `endpoint-agent` object types.") + filters: Optional[List[TagFilter]] = Field(default=None, description="Filter criteria used to dynamically assign the tag to endpoint agents. The matching logic determines how multiple filters are evaluated: `and` requires all filters to match, while `or` requires any filter to match. Filters are supported only for `endpoint-agent` object types.") links: Optional[SelfLinks] = Field(default=None, alias="_links") __properties: ClassVar[List[str]] = ["assignments", "accessType", "aid", "builtIn", "color", "createDate", "icon", "description", "id", "key", "legacyId", "modifiedDate", "objectType", "type", "value", "matchType", "filters", "_links"] diff --git a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/tag_bulk_create_error.py b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/tag_bulk_create_error.py index ea95dd0bd..975a79d47 100644 --- a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/tag_bulk_create_error.py +++ b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/tag_bulk_create_error.py @@ -27,8 +27,8 @@ class TagBulkCreateError(BaseModel): TagBulkCreateError """ # noqa: E501 tag: Optional[Dict[str, TagInfo]] = None - response_code: Optional[StrictInt] = Field(default=None, description="HTTP response code", alias="responseCode") - message: Optional[StrictStr] = Field(default=None, description="Status / error message") + response_code: Optional[StrictInt] = Field(default=None, description="HTTP response code.", alias="responseCode") + message: Optional[StrictStr] = Field(default=None, description="Status or error message.") __properties: ClassVar[List[str]] = ["tag", "responseCode", "message"] model_config = ConfigDict( diff --git a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/tag_info.py b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/tag_info.py index 699a9d493..d08c77634 100644 --- a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/tag_info.py +++ b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/tag_info.py @@ -48,7 +48,7 @@ class TagInfo(BaseModel): type: Optional[Type] = None value: Optional[StrictStr] = Field(default=None, description="The tag's value") match_type: Optional[TagMatchType] = Field(default=None, alias="matchType") - filters: Optional[List[TagFilter]] = Field(default=None, description="The combination of filters (filter keys) dynamically assigned to an `endpoint-agent` as determined by the matching logic (`and` or `or`). For example, if you filter on `bssid` and `ssid` with a matching logic of `and`, both filters are assigned as tags to the `endpoint-agent`; `or` means either filter can be assigned. **Note:** filters currently only apply to `endpoint-agent` object types.") + filters: Optional[List[TagFilter]] = Field(default=None, description="Filter criteria used to dynamically assign the tag to endpoint agents. The matching logic determines how multiple filters are evaluated: `and` requires all filters to match, while `or` requires any filter to match. Filters are supported only for `endpoint-agent` object types.") __properties: ClassVar[List[str]] = ["assignments", "accessType", "aid", "builtIn", "color", "createDate", "icon", "description", "id", "key", "legacyId", "modifiedDate", "objectType", "type", "value", "matchType", "filters"] model_config = ConfigDict( diff --git a/thousandeyes-sdk-tags/test/mock_manifest.py b/thousandeyes-sdk-tags/test/mock_manifest.py index 6d9518519..b0045cef8 100644 --- a/thousandeyes-sdk-tags/test/mock_manifest.py +++ b/thousandeyes-sdk-tags/test/mock_manifest.py @@ -752,6 +752,19 @@ content_type="application/json", ), + "403": ErrorResponseExpectation( + status=403, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 6 + }"""), + content_type="application/json", + ), + "500": ErrorResponseExpectation( status=500, body=json.loads(""" @@ -827,8 +840,8 @@ "createDate" : "2022-03-01T23:31:11Z" } }, - "message" : "Object successfully created", - "responseCode" : 200 + "message" : "Duplicate tags are not allowed. You must change at least one of the following: key, value, or object type.", + "responseCode" : 409 }, { "tag" : { "key" : { @@ -867,8 +880,8 @@ "createDate" : "2022-03-01T23:31:11Z" } }, - "message" : "Object successfully created", - "responseCode" : 200 + "message" : "Duplicate tags are not allowed. You must change at least one of the following: key, value, or object type.", + "responseCode" : 409 } ], "tags" : [ { "assignments" : [ { @@ -1022,8 +1035,8 @@ "createDate" : "2022-03-01T23:31:11Z" } }, - "message" : "Object successfully created", - "responseCode" : 200 + "message" : "Duplicate tags are not allowed. You must change at least one of the following: key, value, or object type.", + "responseCode" : 409 }, { "tag" : { "key" : { @@ -1062,8 +1075,8 @@ "createDate" : "2022-03-01T23:31:11Z" } }, - "message" : "Object successfully created", - "responseCode" : 200 + "message" : "Duplicate tags are not allowed. You must change at least one of the following: key, value, or object type.", + "responseCode" : 409 } ], "tags" : [ { "assignments" : [ { @@ -1195,6 +1208,19 @@ content_type="application/json", ), + "403": ErrorResponseExpectation( + status=403, + body=json.loads(""" + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 6 + }"""), + content_type="application/json", + ), + "500": ErrorResponseExpectation( status=500, body=json.loads(""" diff --git a/thousandeyes-sdk-tags/test/test_tags_api.py b/thousandeyes-sdk-tags/test/test_tags_api.py index 5bf8f49ff..866e623e2 100644 --- a/thousandeyes-sdk-tags/test/test_tags_api.py +++ b/thousandeyes-sdk-tags/test/test_tags_api.py @@ -179,8 +179,8 @@ def test_create_tags_models_validation(self) -> None: "createDate" : "2022-03-01T23:31:11Z" } }, - "message" : "Object successfully created", - "responseCode" : 200 + "message" : "Duplicate tags are not allowed. You must change at least one of the following: key, value, or object type.", + "responseCode" : 409 }, { "tag" : { "key" : { @@ -219,8 +219,8 @@ def test_create_tags_models_validation(self) -> None: "createDate" : "2022-03-01T23:31:11Z" } }, - "message" : "Object successfully created", - "responseCode" : 200 + "message" : "Duplicate tags are not allowed. You must change at least one of the following: key, value, or object type.", + "responseCode" : 409 } ], "tags" : [ { "assignments" : [ { @@ -374,8 +374,8 @@ def test_create_tags_models_validation(self) -> None: "createDate" : "2022-03-01T23:31:11Z" } }, - "message" : "Object successfully created", - "responseCode" : 200 + "message" : "Duplicate tags are not allowed. You must change at least one of the following: key, value, or object type.", + "responseCode" : 409 }, { "tag" : { "key" : { @@ -414,8 +414,8 @@ def test_create_tags_models_validation(self) -> None: "createDate" : "2022-03-01T23:31:11Z" } }, - "message" : "Object successfully created", - "responseCode" : 200 + "message" : "Duplicate tags are not allowed. You must change at least one of the following: key, value, or object type.", + "responseCode" : 409 } ], "tags" : [ { "assignments" : [ { diff --git a/thousandeyes-sdk-tags/test/test_tags_api_integration.py b/thousandeyes-sdk-tags/test/test_tags_api_integration.py index 0699e1b3d..a7b711526 100644 --- a/thousandeyes-sdk-tags/test/test_tags_api_integration.py +++ b/thousandeyes-sdk-tags/test/test_tags_api_integration.py @@ -273,6 +273,73 @@ def test_create_tag_error_401(self) -> None: assert_constructed_model_matches_example_json(context.exception.data, expected_error) + def test_create_tag_error_403(self) -> None: + """Integration test for create_tag error path (HTTP 403)""" + request_body_json = """ + + { + "assignments" : [ { + "id" : "123", + "type" : "test" + }, { + "id" : "123", + "type" : "test" + } ], + "color" : "#FF0000", + "matchType" : "and", + "builtIn" : true, + "icon" : "icon", + "description" : "To tag assets in San Francisco", + "filters" : [ { + "mode" : "in", + "values" : [ "10.1.1.0/24", "192.168.1.0/24" ], + "scope" : "custom", + "key" : "vpn-client-network" + }, { + "mode" : "in", + "values" : [ "10.1.1.0/24", "192.168.1.0/24" ], + "scope" : "custom", + "key" : "vpn-client-network" + } ], + "type" : "static", + "objectType" : "test", + "accessType" : "all", + "modifiedDate" : "2022-03-01T23:31:11Z", + "legacyId" : 0.8008281904610115, + "id" : "5aeab5d5-0d34-4d44-a7ac-fb440185295c", + "aid" : 1234, + "value" : "sfo", + "key" : "branch", + "createDate" : "2022-03-01T23:31:11Z" + } + + """ + tag_info = thousandeyes_sdk.tags.models.TagInfo.from_json(request_body_json) + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 6 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(403) + ) as context: + self.api.create_tag( + + aid=aid, + + tag_info=tag_info, + + _headers=self.te_headers("create_tag", error_status="403"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + def test_create_tag_error_500(self) -> None: """Integration test for create_tag error path (HTTP 500)""" request_body_json = """ @@ -396,8 +463,8 @@ def test_create_tags_happy_path(self) -> None: "createDate" : "2022-03-01T23:31:11Z" } }, - "message" : "Object successfully created", - "responseCode" : 200 + "message" : "Duplicate tags are not allowed. You must change at least one of the following: key, value, or object type.", + "responseCode" : 409 }, { "tag" : { "key" : { @@ -436,8 +503,8 @@ def test_create_tags_happy_path(self) -> None: "createDate" : "2022-03-01T23:31:11Z" } }, - "message" : "Object successfully created", - "responseCode" : 200 + "message" : "Duplicate tags are not allowed. You must change at least one of the following: key, value, or object type.", + "responseCode" : 409 } ], "tags" : [ { "assignments" : [ { @@ -589,8 +656,8 @@ def test_create_tags_happy_path(self) -> None: "createDate" : "2022-03-01T23:31:11Z" } }, - "message" : "Object successfully created", - "responseCode" : 200 + "message" : "Duplicate tags are not allowed. You must change at least one of the following: key, value, or object type.", + "responseCode" : 409 }, { "tag" : { "key" : { @@ -629,8 +696,8 @@ def test_create_tags_happy_path(self) -> None: "createDate" : "2022-03-01T23:31:11Z" } }, - "message" : "Object successfully created", - "responseCode" : 200 + "message" : "Duplicate tags are not allowed. You must change at least one of the following: key, value, or object type.", + "responseCode" : 409 } ], "tags" : [ { "assignments" : [ { @@ -794,8 +861,8 @@ def test_create_tags_error_400(self) -> None: "createDate" : "2022-03-01T23:31:11Z" } }, - "message" : "Object successfully created", - "responseCode" : 200 + "message" : "Duplicate tags are not allowed. You must change at least one of the following: key, value, or object type.", + "responseCode" : 409 }, { "tag" : { "key" : { @@ -834,8 +901,8 @@ def test_create_tags_error_400(self) -> None: "createDate" : "2022-03-01T23:31:11Z" } }, - "message" : "Object successfully created", - "responseCode" : 200 + "message" : "Duplicate tags are not allowed. You must change at least one of the following: key, value, or object type.", + "responseCode" : 409 } ], "tags" : [ { "assignments" : [ { @@ -1023,8 +1090,8 @@ def test_create_tags_error_401(self) -> None: "createDate" : "2022-03-01T23:31:11Z" } }, - "message" : "Object successfully created", - "responseCode" : 200 + "message" : "Duplicate tags are not allowed. You must change at least one of the following: key, value, or object type.", + "responseCode" : 409 }, { "tag" : { "key" : { @@ -1063,8 +1130,8 @@ def test_create_tags_error_401(self) -> None: "createDate" : "2022-03-01T23:31:11Z" } }, - "message" : "Object successfully created", - "responseCode" : 200 + "message" : "Duplicate tags are not allowed. You must change at least one of the following: key, value, or object type.", + "responseCode" : 409 } ], "tags" : [ { "assignments" : [ { @@ -1185,6 +1252,226 @@ def test_create_tags_error_401(self) -> None: assert_constructed_model_matches_example_json(context.exception.data, expected_error) + def test_create_tags_error_403(self) -> None: + """Integration test for create_tags error path (HTTP 403)""" + request_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" + } + }, + "errors" : [ { + "tag" : { + "key" : { + "assignments" : [ { + "id" : "123", + "type" : "test" + }, { + "id" : "123", + "type" : "test" + } ], + "color" : "#FF0000", + "matchType" : "and", + "builtIn" : true, + "icon" : "icon", + "description" : "To tag assets in San Francisco", + "filters" : [ { + "mode" : "in", + "values" : [ "10.1.1.0/24", "192.168.1.0/24" ], + "scope" : "custom", + "key" : "vpn-client-network" + }, { + "mode" : "in", + "values" : [ "10.1.1.0/24", "192.168.1.0/24" ], + "scope" : "custom", + "key" : "vpn-client-network" + } ], + "type" : "static", + "objectType" : "test", + "accessType" : "all", + "modifiedDate" : "2022-03-01T23:31:11Z", + "legacyId" : 0.8008281904610115, + "id" : "5aeab5d5-0d34-4d44-a7ac-fb440185295c", + "aid" : 1234, + "value" : "sfo", + "key" : "branch", + "createDate" : "2022-03-01T23:31:11Z" + } + }, + "message" : "Duplicate tags are not allowed. You must change at least one of the following: key, value, or object type.", + "responseCode" : 409 + }, { + "tag" : { + "key" : { + "assignments" : [ { + "id" : "123", + "type" : "test" + }, { + "id" : "123", + "type" : "test" + } ], + "color" : "#FF0000", + "matchType" : "and", + "builtIn" : true, + "icon" : "icon", + "description" : "To tag assets in San Francisco", + "filters" : [ { + "mode" : "in", + "values" : [ "10.1.1.0/24", "192.168.1.0/24" ], + "scope" : "custom", + "key" : "vpn-client-network" + }, { + "mode" : "in", + "values" : [ "10.1.1.0/24", "192.168.1.0/24" ], + "scope" : "custom", + "key" : "vpn-client-network" + } ], + "type" : "static", + "objectType" : "test", + "accessType" : "all", + "modifiedDate" : "2022-03-01T23:31:11Z", + "legacyId" : 0.8008281904610115, + "id" : "5aeab5d5-0d34-4d44-a7ac-fb440185295c", + "aid" : 1234, + "value" : "sfo", + "key" : "branch", + "createDate" : "2022-03-01T23:31:11Z" + } + }, + "message" : "Duplicate tags are not allowed. You must change at least one of the following: key, value, or object type.", + "responseCode" : 409 + } ], + "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" + } + }, + "matchType" : "and", + "builtIn" : true, + "icon" : "icon", + "description" : "To tag assets in San Francisco", + "filters" : [ { + "mode" : "in", + "values" : [ "10.1.1.0/24", "192.168.1.0/24" ], + "scope" : "custom", + "key" : "vpn-client-network" + }, { + "mode" : "in", + "values" : [ "10.1.1.0/24", "192.168.1.0/24" ], + "scope" : "custom", + "key" : "vpn-client-network" + } ], + "type" : "static", + "objectType" : "test", + "accessType" : "all", + "modifiedDate" : "2022-03-01T23:31:11Z", + "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" + } + }, + "matchType" : "and", + "builtIn" : true, + "icon" : "icon", + "description" : "To tag assets in San Francisco", + "filters" : [ { + "mode" : "in", + "values" : [ "10.1.1.0/24", "192.168.1.0/24" ], + "scope" : "custom", + "key" : "vpn-client-network" + }, { + "mode" : "in", + "values" : [ "10.1.1.0/24", "192.168.1.0/24" ], + "scope" : "custom", + "key" : "vpn-client-network" + } ], + "type" : "static", + "objectType" : "test", + "accessType" : "all", + "modifiedDate" : "2022-03-01T23:31:11Z", + "legacyId" : 0.8008281904610115, + "id" : "5aeab5d5-0d34-4d44-a7ac-fb440185295c", + "aid" : 1234, + "value" : "sfo", + "key" : "branch", + "createDate" : "2022-03-01T23:31:11Z" + } ] + } + + """ + bulk_tag_response = thousandeyes_sdk.tags.models.BulkTagResponse.from_json(request_body_json) + aid = '1234' + error_body_json = """ + { + "instance" : "instance", + "detail" : "detail", + "type" : "type", + "title" : "title", + "status" : 6 + } + """ + expected_error = json.loads(error_body_json) + with self.assertRaises( + ApiException.exception_class_for_http_status(403) + ) as context: + self.api.create_tags( + + aid=aid, + + bulk_tag_response=bulk_tag_response, + + _headers=self.te_headers("create_tags", error_status="403"), + ) + assert_constructed_model_matches_example_json(context.exception.data, expected_error) + + def test_create_tags_error_500(self) -> None: """Integration test for create_tags error path (HTTP 500)""" request_body_json = """ @@ -1240,8 +1527,8 @@ def test_create_tags_error_500(self) -> None: "createDate" : "2022-03-01T23:31:11Z" } }, - "message" : "Object successfully created", - "responseCode" : 200 + "message" : "Duplicate tags are not allowed. You must change at least one of the following: key, value, or object type.", + "responseCode" : 409 }, { "tag" : { "key" : { @@ -1280,8 +1567,8 @@ def test_create_tags_error_500(self) -> None: "createDate" : "2022-03-01T23:31:11Z" } }, - "message" : "Object successfully created", - "responseCode" : 200 + "message" : "Duplicate tags are not allowed. You must change at least one of the following: key, value, or object type.", + "responseCode" : 409 } ], "tags" : [ { "assignments" : [ { diff --git a/thousandeyes-sdk-test-results/README.md b/thousandeyes-sdk-test-results/README.md index 4da412a49..50d575c49 100644 --- a/thousandeyes-sdk-test-results/README.md +++ b/thousandeyes-sdk-test-results/README.md @@ -3,7 +3,7 @@ Get test result metrics for Network and Application Synthetics tests. This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.99 +- API version: 7.0.101 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator diff --git a/thousandeyes-sdk-test-results/docs/ConsoleLogs.md b/thousandeyes-sdk-test-results/docs/ConsoleLogs.md index 063d25d0d..60a1e7af0 100644 --- a/thousandeyes-sdk-test-results/docs/ConsoleLogs.md +++ b/thousandeyes-sdk-test-results/docs/ConsoleLogs.md @@ -7,7 +7,7 @@ Console logs captured during script execution to help troubleshoot transaction i Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **level** | **str** | Severity level of the log, or UNKNOWN if the log is system-generated. | [optional] -**timestamp** | **str** | Unix epoch time, in milliseconds, when the log entry was captured. | [optional] +**timestamp** | **int** | Unix epoch time, in milliseconds, when the log entry was captured. | [optional] **value** | **str** | Log message. | [optional] ## Example diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/console_logs.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/console_logs.py index aa8402a92..e42156231 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/console_logs.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/console_logs.py @@ -16,7 +16,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -26,7 +26,7 @@ class ConsoleLogs(BaseModel): Console logs captured during script execution to help troubleshoot transaction issues. """ # noqa: E501 level: Optional[StrictStr] = Field(default=None, description="Severity level of the log, or UNKNOWN if the log is system-generated.") - timestamp: Optional[StrictStr] = Field(default=None, description="Unix epoch time, in milliseconds, when the log entry was captured.") + timestamp: Optional[StrictInt] = Field(default=None, description="Unix epoch time, in milliseconds, when the log entry was captured.") value: Optional[StrictStr] = Field(default=None, description="Log message.") __properties: ClassVar[List[str]] = ["level", "timestamp", "value"] diff --git a/thousandeyes-sdk-test-results/test/mock_manifest.py b/thousandeyes-sdk-test-results/test/mock_manifest.py index 317d4e9df..2c018940f 100644 --- a/thousandeyes-sdk-test-results/test/mock_manifest.py +++ b/thousandeyes-sdk-test-results/test/mock_manifest.py @@ -5135,11 +5135,11 @@ "consoleLogs" : [ { "level" : "INFO", "value" : "Uncaught TypeError: Cannot read property attr of undefined", - "timestamp" : "1715880042123" + "timestamp" : 1715880042123 }, { "level" : "INFO", "value" : "Uncaught TypeError: Cannot read property attr of undefined", - "timestamp" : "1715880042123" + "timestamp" : 1715880042123 } ], "roundId" : 1384309800 }, { @@ -5165,11 +5165,11 @@ "consoleLogs" : [ { "level" : "INFO", "value" : "Uncaught TypeError: Cannot read property attr of undefined", - "timestamp" : "1715880042123" + "timestamp" : 1715880042123 }, { "level" : "INFO", "value" : "Uncaught TypeError: Cannot read property attr of undefined", - "timestamp" : "1715880042123" + "timestamp" : 1715880042123 } ], "roundId" : 1384309800 } ] diff --git a/thousandeyes-sdk-test-results/test/test_web_transactions_test_results_api.py b/thousandeyes-sdk-test-results/test/test_web_transactions_test_results_api.py index 50bc96cac..ee2763a2f 100644 --- a/thousandeyes-sdk-test-results/test/test_web_transactions_test_results_api.py +++ b/thousandeyes-sdk-test-results/test/test_web_transactions_test_results_api.py @@ -120,11 +120,11 @@ def test_get_test_console_logs_agent_round_results_models_validation(self) -> No "consoleLogs" : [ { "level" : "INFO", "value" : "Uncaught TypeError: Cannot read property attr of undefined", - "timestamp" : "1715880042123" + "timestamp" : 1715880042123 }, { "level" : "INFO", "value" : "Uncaught TypeError: Cannot read property attr of undefined", - "timestamp" : "1715880042123" + "timestamp" : 1715880042123 } ], "roundId" : 1384309800 }, { @@ -150,11 +150,11 @@ def test_get_test_console_logs_agent_round_results_models_validation(self) -> No "consoleLogs" : [ { "level" : "INFO", "value" : "Uncaught TypeError: Cannot read property attr of undefined", - "timestamp" : "1715880042123" + "timestamp" : 1715880042123 }, { "level" : "INFO", "value" : "Uncaught TypeError: Cannot read property attr of undefined", - "timestamp" : "1715880042123" + "timestamp" : 1715880042123 } ], "roundId" : 1384309800 } ] diff --git a/thousandeyes-sdk-test-results/test/test_web_transactions_test_results_api_integration.py b/thousandeyes-sdk-test-results/test/test_web_transactions_test_results_api_integration.py index 28045b340..3f003ce06 100644 --- a/thousandeyes-sdk-test-results/test/test_web_transactions_test_results_api_integration.py +++ b/thousandeyes-sdk-test-results/test/test_web_transactions_test_results_api_integration.py @@ -124,11 +124,11 @@ def test_get_test_console_logs_agent_round_results_happy_path(self) -> None: "consoleLogs" : [ { "level" : "INFO", "value" : "Uncaught TypeError: Cannot read property attr of undefined", - "timestamp" : "1715880042123" + "timestamp" : 1715880042123 }, { "level" : "INFO", "value" : "Uncaught TypeError: Cannot read property attr of undefined", - "timestamp" : "1715880042123" + "timestamp" : 1715880042123 } ], "roundId" : 1384309800 }, { @@ -154,11 +154,11 @@ def test_get_test_console_logs_agent_round_results_happy_path(self) -> None: "consoleLogs" : [ { "level" : "INFO", "value" : "Uncaught TypeError: Cannot read property attr of undefined", - "timestamp" : "1715880042123" + "timestamp" : 1715880042123 }, { "level" : "INFO", "value" : "Uncaught TypeError: Cannot read property attr of undefined", - "timestamp" : "1715880042123" + "timestamp" : 1715880042123 } ], "roundId" : 1384309800 } ] diff --git a/thousandeyes-sdk-tests/.openapi-generator/FILES b/thousandeyes-sdk-tests/.openapi-generator/FILES index 319ead941..970f22d6e 100644 --- a/thousandeyes-sdk-tests/.openapi-generator/FILES +++ b/thousandeyes-sdk-tests/.openapi-generator/FILES @@ -130,6 +130,8 @@ docs/SipServerTestResponse.md docs/SipServerTests.md docs/SipTestProtocol.md docs/TestAgentRequest.md +docs/TestAgentResponse.md +docs/TestAgentResponseProperties.md docs/TestAuthType.md docs/TestChromiumTrack.md docs/TestCustomHeaders.md @@ -332,6 +334,8 @@ src/thousandeyes_sdk/tests/models/sip_server_test_response.py src/thousandeyes_sdk/tests/models/sip_server_tests.py src/thousandeyes_sdk/tests/models/sip_test_protocol.py src/thousandeyes_sdk/tests/models/test_agent_request.py +src/thousandeyes_sdk/tests/models/test_agent_response.py +src/thousandeyes_sdk/tests/models/test_agent_response_properties.py src/thousandeyes_sdk/tests/models/test_auth_type.py src/thousandeyes_sdk/tests/models/test_chromium_track.py src/thousandeyes_sdk/tests/models/test_custom_headers.py diff --git a/thousandeyes-sdk-tests/README.md b/thousandeyes-sdk-tests/README.md index f1c7a55b8..658fe5764 100644 --- a/thousandeyes-sdk-tests/README.md +++ b/thousandeyes-sdk-tests/README.md @@ -6,7 +6,7 @@ This API allows you to list, create, edit, and delete Network and Application Sy This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.99 +- API version: 7.0.101 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator @@ -291,6 +291,8 @@ Class | Method | HTTP request | Description - [SipServerTests](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-tests/docs/SipServerTests.md) - [SipTestProtocol](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-tests/docs/SipTestProtocol.md) - [TestAgentRequest](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-tests/docs/TestAgentRequest.md) + - [TestAgentResponse](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-tests/docs/TestAgentResponse.md) + - [TestAgentResponseProperties](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-tests/docs/TestAgentResponseProperties.md) - [TestAuthType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-tests/docs/TestAuthType.md) - [TestChromiumTrack](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-tests/docs/TestChromiumTrack.md) - [TestCustomHeaders](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-tests/docs/TestCustomHeaders.md) diff --git a/thousandeyes-sdk-tests/docs/AgentToAgentTestResponse.md b/thousandeyes-sdk-tests/docs/AgentToAgentTestResponse.md index 67907a430..4b0a73489 100644 --- a/thousandeyes-sdk-tests/docs/AgentToAgentTestResponse.md +++ b/thousandeyes-sdk-tests/docs/AgentToAgentTestResponse.md @@ -40,7 +40,7 @@ Name | Type | Description | Notes **bgp_measurements** | **bool** | Set to `true` to enable bgp measurements. | [optional] [default to True] **use_public_bgp** | **bool** | Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value. | [optional] [default to True] **monitors** | [**List[Monitor]**](Monitor.md) | Contains list of enabled BGP monitors. | [optional] [readonly] -**agents** | [**List[AgentResponse]**](AgentResponse.md) | Contains list of agents. | [optional] +**agents** | [**List[TestAgentResponse]**](TestAgentResponse.md) | Contains list of agents. | [optional] ## Example diff --git a/thousandeyes-sdk-tests/docs/AgentToServerTestResponse.md b/thousandeyes-sdk-tests/docs/AgentToServerTestResponse.md index 1db2ee143..ff768ca3c 100644 --- a/thousandeyes-sdk-tests/docs/AgentToServerTestResponse.md +++ b/thousandeyes-sdk-tests/docs/AgentToServerTestResponse.md @@ -41,7 +41,7 @@ Name | Type | Description | Notes **bgp_measurements** | **bool** | Set to `true` to enable bgp measurements. | [optional] [default to True] **use_public_bgp** | **bool** | Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value. | [optional] [default to True] **monitors** | [**List[Monitor]**](Monitor.md) | Contains list of enabled BGP monitors. | [optional] [readonly] -**agents** | [**List[AgentResponse]**](AgentResponse.md) | Contains list of agents. | [optional] +**agents** | [**List[TestAgentResponse]**](TestAgentResponse.md) | Contains list of agents. | [optional] ## Example diff --git a/thousandeyes-sdk-tests/docs/ApiTestResponse.md b/thousandeyes-sdk-tests/docs/ApiTestResponse.md index d90b9c715..f5c009e17 100644 --- a/thousandeyes-sdk-tests/docs/ApiTestResponse.md +++ b/thousandeyes-sdk-tests/docs/ApiTestResponse.md @@ -48,7 +48,7 @@ Name | Type | Description | Notes **bgp_measurements** | **bool** | Set to `true` to enable bgp measurements. | [optional] [default to True] **use_public_bgp** | **bool** | Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value. | [optional] [default to True] **monitors** | [**List[Monitor]**](Monitor.md) | Contains list of enabled BGP monitors. | [optional] [readonly] -**agents** | [**List[AgentResponse]**](AgentResponse.md) | Contains list of agents. | [optional] +**agents** | [**List[TestAgentResponse]**](TestAgentResponse.md) | Contains list of agents. | [optional] ## Example diff --git a/thousandeyes-sdk-tests/docs/DnsSecTestResponse.md b/thousandeyes-sdk-tests/docs/DnsSecTestResponse.md index 03900c3e6..e4e544a08 100644 --- a/thousandeyes-sdk-tests/docs/DnsSecTestResponse.md +++ b/thousandeyes-sdk-tests/docs/DnsSecTestResponse.md @@ -26,7 +26,7 @@ Name | Type | Description | Notes **domain** | **str** | The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record. | **dns_query_class** | [**DnsQueryClass**](DnsQueryClass.md) | | [optional] **randomized_start_time** | **bool** | Indicates whether agents should randomize the start time in each test round. | [optional] [default to False] -**agents** | [**List[AgentResponse]**](AgentResponse.md) | Contains list of agents. | [optional] +**agents** | [**List[TestAgentResponse]**](TestAgentResponse.md) | Contains list of agents. | [optional] ## Example diff --git a/thousandeyes-sdk-tests/docs/DnsServerTestResponse.md b/thousandeyes-sdk-tests/docs/DnsServerTestResponse.md index 8a54da56f..45d8f51bc 100644 --- a/thousandeyes-sdk-tests/docs/DnsServerTestResponse.md +++ b/thousandeyes-sdk-tests/docs/DnsServerTestResponse.md @@ -41,7 +41,7 @@ Name | Type | Description | Notes **bgp_measurements** | **bool** | Set to `true` to enable bgp measurements. | [optional] [default to True] **use_public_bgp** | **bool** | Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value. | [optional] [default to True] **monitors** | [**List[Monitor]**](Monitor.md) | Contains list of enabled BGP monitors. | [optional] [readonly] -**agents** | [**List[AgentResponse]**](AgentResponse.md) | Contains list of agents. | [optional] +**agents** | [**List[TestAgentResponse]**](TestAgentResponse.md) | Contains list of agents. | [optional] ## Example diff --git a/thousandeyes-sdk-tests/docs/DnsTraceTestResponse.md b/thousandeyes-sdk-tests/docs/DnsTraceTestResponse.md index 21f5f005e..025cbde1c 100644 --- a/thousandeyes-sdk-tests/docs/DnsTraceTestResponse.md +++ b/thousandeyes-sdk-tests/docs/DnsTraceTestResponse.md @@ -27,7 +27,7 @@ Name | Type | Description | Notes **domain** | **str** | The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record. | **dns_query_class** | [**DnsQueryClass**](DnsQueryClass.md) | | [optional] **randomized_start_time** | **bool** | Indicates whether agents should randomize the start time in each test round. | [optional] [default to False] -**agents** | [**List[AgentResponse]**](AgentResponse.md) | Contains list of agents. | [optional] +**agents** | [**List[TestAgentResponse]**](TestAgentResponse.md) | Contains list of agents. | [optional] ## Example diff --git a/thousandeyes-sdk-tests/docs/FtpServerTestResponse.md b/thousandeyes-sdk-tests/docs/FtpServerTestResponse.md index 67b6b3aec..eaaea5d71 100644 --- a/thousandeyes-sdk-tests/docs/FtpServerTestResponse.md +++ b/thousandeyes-sdk-tests/docs/FtpServerTestResponse.md @@ -45,7 +45,7 @@ Name | Type | Description | Notes **bgp_measurements** | **bool** | Set to `true` to enable bgp measurements. | [optional] [default to True] **use_public_bgp** | **bool** | Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value. | [optional] [default to True] **monitors** | [**List[Monitor]**](Monitor.md) | Contains list of enabled BGP monitors. | [optional] [readonly] -**agents** | [**List[AgentResponse]**](AgentResponse.md) | Contains list of agents. | [optional] +**agents** | [**List[TestAgentResponse]**](TestAgentResponse.md) | Contains list of agents. | [optional] ## Example diff --git a/thousandeyes-sdk-tests/docs/HttpServerTestResponse.md b/thousandeyes-sdk-tests/docs/HttpServerTestResponse.md index 8a4f0d13d..cf2a5f407 100644 --- a/thousandeyes-sdk-tests/docs/HttpServerTestResponse.md +++ b/thousandeyes-sdk-tests/docs/HttpServerTestResponse.md @@ -67,7 +67,7 @@ Name | Type | Description | Notes **bgp_measurements** | **bool** | Set to `true` to enable bgp measurements. | [optional] [default to True] **use_public_bgp** | **bool** | Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value. | [optional] [default to True] **monitors** | [**List[Monitor]**](Monitor.md) | Contains list of enabled BGP monitors. | [optional] [readonly] -**agents** | [**List[AgentResponse]**](AgentResponse.md) | Contains list of agents. | [optional] +**agents** | [**List[TestAgentResponse]**](TestAgentResponse.md) | Contains list of agents. | [optional] ## Example diff --git a/thousandeyes-sdk-tests/docs/PageLoadTestResponse.md b/thousandeyes-sdk-tests/docs/PageLoadTestResponse.md index 21983866c..6d2a79dd8 100644 --- a/thousandeyes-sdk-tests/docs/PageLoadTestResponse.md +++ b/thousandeyes-sdk-tests/docs/PageLoadTestResponse.md @@ -78,7 +78,7 @@ Name | Type | Description | Notes **monitors** | [**List[Monitor]**](Monitor.md) | Contains list of enabled BGP monitors. | [optional] [readonly] **http_interval** | [**TestHttpInterval**](TestHttpInterval.md) | | [optional] **subinterval** | [**TestSubInterval**](TestSubInterval.md) | | [optional] -**agents** | [**List[AgentResponse]**](AgentResponse.md) | Contains list of agents. | [optional] +**agents** | [**List[TestAgentResponse]**](TestAgentResponse.md) | Contains list of agents. | [optional] ## Example diff --git a/thousandeyes-sdk-tests/docs/SipServerTestResponse.md b/thousandeyes-sdk-tests/docs/SipServerTestResponse.md index 458d4f803..e3dc54b7a 100644 --- a/thousandeyes-sdk-tests/docs/SipServerTestResponse.md +++ b/thousandeyes-sdk-tests/docs/SipServerTestResponse.md @@ -44,7 +44,7 @@ Name | Type | Description | Notes **protocol** | [**SipTestProtocol**](SipTestProtocol.md) | | [optional] **sip_registrar** | **str** | SIP server to be tested, specified by domain name or IP address. | [optional] **user** | **str** | Username for SIP registration, should be unique within a ThousandEyes account group. | [optional] -**agents** | [**List[AgentResponse]**](AgentResponse.md) | Contains list of agents. | [optional] +**agents** | [**List[TestAgentResponse]**](TestAgentResponse.md) | Contains list of agents. | [optional] ## Example diff --git a/thousandeyes-sdk-tests/docs/TestAgentResponse.md b/thousandeyes-sdk-tests/docs/TestAgentResponse.md new file mode 100644 index 000000000..13fb01c43 --- /dev/null +++ b/thousandeyes-sdk-tests/docs/TestAgentResponse.md @@ -0,0 +1,42 @@ +# TestAgentResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**agent_type** | [**CloudEnterpriseAgentType**](CloudEnterpriseAgentType.md) | | +**ip_addresses** | **List[str]** | Array of private IP addresses. | [optional] [readonly] +**public_ip_addresses** | **List[str]** | Array of public IP addresses. | [optional] [readonly] +**network** | **str** | Network (including ASN) of agent’s public IP. | [optional] [readonly] +**agent_id** | **str** | Unique ID of the agent. | [optional] [readonly] +**agent_name** | **str** | Name of the agent. | [optional] +**location** | **str** | Location of the agent. | [optional] [readonly] +**country_id** | **str** | 2-digit ISO country code | [optional] [readonly] +**coordinates** | [**Coordinates**](Coordinates.md) | | [optional] +**network_provider_info** | [**SimpleAgentAllOfNetworkProviderInfo**](SimpleAgentAllOfNetworkProviderInfo.md) | | [optional] +**enabled** | **bool** | Flag indicating if the agent is enabled. | [optional] +**verify_ssl_certificates** | **bool** | Flag indicating if has normal SSL operations or if instead it's set to ignore SSL errors on browserbot-based tests. | [optional] [readonly] +**prefix** | **str** | Prefix containing agents public IP address. | [optional] [readonly] +**source_ip_address** | **str** | IP address of the agent interface used as the source for the test. Returned when a source interface is selected. | [optional] [readonly] + +## Example + +```python +from thousandeyes_sdk.tests.models.test_agent_response import TestAgentResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of TestAgentResponse from a JSON string +test_agent_response_instance = TestAgentResponse.from_json(json) +# print the JSON string representation of the object +print(TestAgentResponse.to_json()) + +# convert the object into a dict +test_agent_response_dict = test_agent_response_instance.to_dict() +# create an instance of TestAgentResponse from a dict +test_agent_response_from_dict = TestAgentResponse.from_dict(test_agent_response_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-tests/docs/TestAgentResponseProperties.md b/thousandeyes-sdk-tests/docs/TestAgentResponseProperties.md new file mode 100644 index 000000000..450b1858d --- /dev/null +++ b/thousandeyes-sdk-tests/docs/TestAgentResponseProperties.md @@ -0,0 +1,29 @@ +# TestAgentResponseProperties + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**source_ip_address** | **str** | IP address of the agent interface used as the source for the test. Returned when a source interface is selected. | [optional] [readonly] + +## Example + +```python +from thousandeyes_sdk.tests.models.test_agent_response_properties import TestAgentResponseProperties + +# TODO update the JSON string below +json = "{}" +# create an instance of TestAgentResponseProperties from a JSON string +test_agent_response_properties_instance = TestAgentResponseProperties.from_json(json) +# print the JSON string representation of the object +print(TestAgentResponseProperties.to_json()) + +# convert the object into a dict +test_agent_response_properties_dict = test_agent_response_properties_instance.to_dict() +# create an instance of TestAgentResponseProperties from a dict +test_agent_response_properties_from_dict = TestAgentResponseProperties.from_dict(test_agent_response_properties_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-tests/docs/VoiceTestResponse.md b/thousandeyes-sdk-tests/docs/VoiceTestResponse.md index 4303ccfb7..bba223c4d 100644 --- a/thousandeyes-sdk-tests/docs/VoiceTestResponse.md +++ b/thousandeyes-sdk-tests/docs/VoiceTestResponse.md @@ -36,7 +36,7 @@ Name | Type | Description | Notes **bgp_measurements** | **bool** | Set to `true` to enable bgp measurements. | [optional] [default to True] **use_public_bgp** | **bool** | Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value. | [optional] [default to True] **monitors** | [**List[Monitor]**](Monitor.md) | Contains list of enabled BGP monitors. | [optional] [readonly] -**agents** | [**List[AgentResponse]**](AgentResponse.md) | Contains list of agents. | [optional] +**agents** | [**List[TestAgentResponse]**](TestAgentResponse.md) | Contains list of agents. | [optional] ## Example diff --git a/thousandeyes-sdk-tests/docs/WebTransactionTestResponse.md b/thousandeyes-sdk-tests/docs/WebTransactionTestResponse.md index 49fd191f8..ee81de945 100644 --- a/thousandeyes-sdk-tests/docs/WebTransactionTestResponse.md +++ b/thousandeyes-sdk-tests/docs/WebTransactionTestResponse.md @@ -80,7 +80,7 @@ Name | Type | Description | Notes **use_public_bgp** | **bool** | Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value. | [optional] [default to True] **monitors** | [**List[Monitor]**](Monitor.md) | Contains list of enabled BGP monitors. | [optional] [readonly] **subinterval** | [**TestSubInterval**](TestSubInterval.md) | | [optional] -**agents** | [**List[AgentResponse]**](AgentResponse.md) | Contains list of agents. | [optional] +**agents** | [**List[TestAgentResponse]**](TestAgentResponse.md) | Contains list of agents. | [optional] ## Example diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/__init__.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/__init__.py index 3f295c904..970381acb 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/__init__.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/__init__.py @@ -149,6 +149,8 @@ from thousandeyes_sdk.tests.models.sip_server_tests import SipServerTests from thousandeyes_sdk.tests.models.sip_test_protocol import SipTestProtocol from thousandeyes_sdk.tests.models.test_agent_request import TestAgentRequest +from thousandeyes_sdk.tests.models.test_agent_response import TestAgentResponse +from thousandeyes_sdk.tests.models.test_agent_response_properties import TestAgentResponseProperties from thousandeyes_sdk.tests.models.test_auth_type import TestAuthType from thousandeyes_sdk.tests.models.test_chromium_track import TestChromiumTrack from thousandeyes_sdk.tests.models.test_custom_headers import TestCustomHeaders diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/__init__.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/__init__.py index c42f213a6..ce4e78c73 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/__init__.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/__init__.py @@ -130,6 +130,8 @@ from thousandeyes_sdk.tests.models.sip_server_tests import SipServerTests from thousandeyes_sdk.tests.models.sip_test_protocol import SipTestProtocol from thousandeyes_sdk.tests.models.test_agent_request import TestAgentRequest +from thousandeyes_sdk.tests.models.test_agent_response import TestAgentResponse +from thousandeyes_sdk.tests.models.test_agent_response_properties import TestAgentResponseProperties from thousandeyes_sdk.tests.models.test_auth_type import TestAuthType from thousandeyes_sdk.tests.models.test_chromium_track import TestChromiumTrack from thousandeyes_sdk.tests.models.test_custom_headers import TestCustomHeaders diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_to_agent_test_response.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_to_agent_test_response.py index 18cc38d23..bf75348ab 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_to_agent_test_response.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_to_agent_test_response.py @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.tests.models.agent_response import AgentResponse from thousandeyes_sdk.tests.models.agent_to_agent_test_protocol import AgentToAgentTestProtocol from thousandeyes_sdk.tests.models.alert_rule import AlertRule from thousandeyes_sdk.tests.models.monitor import Monitor from thousandeyes_sdk.tests.models.shared_with_account import SharedWithAccount +from thousandeyes_sdk.tests.models.test_agent_response import TestAgentResponse from thousandeyes_sdk.tests.models.test_direction import TestDirection from thousandeyes_sdk.tests.models.test_dscp_id import TestDscpId from thousandeyes_sdk.tests.models.test_interval import TestInterval @@ -74,7 +74,7 @@ class AgentToAgentTestResponse(BaseModel): bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") use_public_bgp: Optional[StrictBool] = Field(default=True, description="Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value.", alias="usePublicBgp") monitors: Optional[List[Monitor]] = Field(default=None, description="Contains list of enabled BGP monitors.") - agents: Optional[List[AgentResponse]] = Field(default=None, description="Contains list of agents.") + agents: Optional[List[TestAgentResponse]] = Field(default=None, description="Contains list of agents.") __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "direction", "dscp", "dscpId", "mss", "numPathTraces", "pathTraceMode", "port", "protocol", "randomizedStartTime", "targetAgentId", "throughputMeasurements", "throughputDuration", "throughputRate", "fixedPacketRate", "bgpMeasurements", "usePublicBgp", "monitors", "agents"] model_config = ConfigDict( @@ -235,7 +235,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "bgpMeasurements": obj.get("bgpMeasurements") if obj.get("bgpMeasurements") is not None else True, "usePublicBgp": obj.get("usePublicBgp") if obj.get("usePublicBgp") is not None else True, "monitors": [Monitor.from_dict(_item) for _item in obj["monitors"]] if obj.get("monitors") is not None else None, - "agents": [AgentResponse.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + "agents": [TestAgentResponse.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None }) return _obj diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_to_server_test_response.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_to_server_test_response.py index 8a0662a42..490776ff9 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_to_server_test_response.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_to_server_test_response.py @@ -20,10 +20,10 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.tests.models.agent_response import AgentResponse from thousandeyes_sdk.tests.models.alert_rule import AlertRule from thousandeyes_sdk.tests.models.monitor import Monitor from thousandeyes_sdk.tests.models.shared_with_account import SharedWithAccount +from thousandeyes_sdk.tests.models.test_agent_response import TestAgentResponse from thousandeyes_sdk.tests.models.test_dscp_id import TestDscpId from thousandeyes_sdk.tests.models.test_interval import TestInterval from thousandeyes_sdk.tests.models.test_ipv6_policy import TestIpv6Policy @@ -76,7 +76,7 @@ class AgentToServerTestResponse(BaseModel): bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") use_public_bgp: Optional[StrictBool] = Field(default=True, description="Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value.", alias="usePublicBgp") monitors: Optional[List[Monitor]] = Field(default=None, description="Contains list of enabled BGP monitors.") - agents: Optional[List[AgentResponse]] = Field(default=None, description="Contains list of agents.") + agents: Optional[List[TestAgentResponse]] = Field(default=None, description="Contains list of agents.") __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "bandwidthMeasurements", "continuousMode", "fixedPacketRate", "mtuMeasurements", "numPathTraces", "pathTraceMode", "probeMode", "protocol", "randomizedStartTime", "server", "dscp", "dscpId", "ipv6Policy", "pingPayloadSize", "networkMeasurements", "bgpMeasurements", "usePublicBgp", "monitors", "agents"] model_config = ConfigDict( @@ -238,7 +238,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "bgpMeasurements": obj.get("bgpMeasurements") if obj.get("bgpMeasurements") is not None else True, "usePublicBgp": obj.get("usePublicBgp") if obj.get("usePublicBgp") is not None else True, "monitors": [Monitor.from_dict(_item) for _item in obj["monitors"]] if obj.get("monitors") is not None else None, - "agents": [AgentResponse.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + "agents": [TestAgentResponse.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None }) return _obj diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_test_response.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_test_response.py index 670f95aa5..13b9039b5 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_test_response.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_test_response.py @@ -20,12 +20,12 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.tests.models.agent_response import AgentResponse from thousandeyes_sdk.tests.models.alert_rule import AlertRule from thousandeyes_sdk.tests.models.api_predefined_variable import ApiPredefinedVariable from thousandeyes_sdk.tests.models.api_request import ApiRequest from thousandeyes_sdk.tests.models.monitor import Monitor from thousandeyes_sdk.tests.models.shared_with_account import SharedWithAccount +from thousandeyes_sdk.tests.models.test_agent_response import TestAgentResponse from thousandeyes_sdk.tests.models.test_interval import TestInterval from thousandeyes_sdk.tests.models.test_label import TestLabel from thousandeyes_sdk.tests.models.test_links import TestLinks @@ -85,7 +85,7 @@ class ApiTestResponse(BaseModel): bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") use_public_bgp: Optional[StrictBool] = Field(default=True, description="Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value.", alias="usePublicBgp") monitors: Optional[List[Monitor]] = Field(default=None, description="Contains list of enabled BGP monitors.") - agents: Optional[List[AgentResponse]] = Field(default=None, description="Contains list of agents.") + agents: Optional[List[TestAgentResponse]] = Field(default=None, description="Contains list of agents.") __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "clientCertificate", "clientCertDomainsAllowList", "collectProxyNetworkData", "distributedTracing", "followRedirects", "mtuMeasurements", "networkMeasurements", "numPathTraces", "overrideAgentProxy", "overrideProxyId", "pathTraceMode", "predefinedVariables", "probeMode", "protocol", "randomizedStartTime", "requests", "sslVersionId", "targetTime", "timeLimit", "url", "credentials", "vaultCredentials", "bgpMeasurements", "usePublicBgp", "monitors", "agents"] model_config = ConfigDict( @@ -273,7 +273,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "bgpMeasurements": obj.get("bgpMeasurements") if obj.get("bgpMeasurements") is not None else True, "usePublicBgp": obj.get("usePublicBgp") if obj.get("usePublicBgp") is not None else True, "monitors": [Monitor.from_dict(_item) for _item in obj["monitors"]] if obj.get("monitors") is not None else None, - "agents": [AgentResponse.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + "agents": [TestAgentResponse.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None }) return _obj diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_sec_test_response.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_sec_test_response.py index 543f595f3..601050368 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_sec_test_response.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_sec_test_response.py @@ -19,10 +19,10 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from thousandeyes_sdk.tests.models.agent_response import AgentResponse from thousandeyes_sdk.tests.models.alert_rule import AlertRule from thousandeyes_sdk.tests.models.dns_query_class import DnsQueryClass from thousandeyes_sdk.tests.models.shared_with_account import SharedWithAccount +from thousandeyes_sdk.tests.models.test_agent_response import TestAgentResponse from thousandeyes_sdk.tests.models.test_interval import TestInterval from thousandeyes_sdk.tests.models.test_label import TestLabel from thousandeyes_sdk.tests.models.test_links import TestLinks @@ -55,7 +55,7 @@ class DnsSecTestResponse(BaseModel): domain: StrictStr = Field(description="The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record.") dns_query_class: Optional[DnsQueryClass] = Field(default=None, alias="dnsQueryClass") randomized_start_time: Optional[StrictBool] = Field(default=False, description="Indicates whether agents should randomize the start time in each test round.", alias="randomizedStartTime") - agents: Optional[List[AgentResponse]] = Field(default=None, description="Contains list of agents.") + agents: Optional[List[TestAgentResponse]] = Field(default=None, description="Contains list of agents.") __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "domain", "dnsQueryClass", "randomizedStartTime", "agents"] model_config = ConfigDict( @@ -191,7 +191,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "domain": obj.get("domain"), "dnsQueryClass": obj.get("dnsQueryClass"), "randomizedStartTime": obj.get("randomizedStartTime") if obj.get("randomizedStartTime") is not None else False, - "agents": [AgentResponse.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + "agents": [TestAgentResponse.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None }) return _obj diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_server_test_response.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_server_test_response.py index e59619d5b..a1080ac47 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_server_test_response.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_server_test_response.py @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.tests.models.agent_response import AgentResponse from thousandeyes_sdk.tests.models.alert_rule import AlertRule from thousandeyes_sdk.tests.models.dns_query_class import DnsQueryClass from thousandeyes_sdk.tests.models.monitor import Monitor from thousandeyes_sdk.tests.models.shared_with_account import SharedWithAccount +from thousandeyes_sdk.tests.models.test_agent_response import TestAgentResponse from thousandeyes_sdk.tests.models.test_dns_server import TestDnsServer from thousandeyes_sdk.tests.models.test_dns_transport_protocol import TestDnsTransportProtocol from thousandeyes_sdk.tests.models.test_interval import TestInterval @@ -78,7 +78,7 @@ class DnsServerTestResponse(BaseModel): bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") use_public_bgp: Optional[StrictBool] = Field(default=True, description="Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value.", alias="usePublicBgp") monitors: Optional[List[Monitor]] = Field(default=None, description="Contains list of enabled BGP monitors.") - agents: Optional[List[AgentResponse]] = Field(default=None, description="Contains list of agents.") + agents: Optional[List[TestAgentResponse]] = Field(default=None, description="Contains list of agents.") __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "bandwidthMeasurements", "dnsServers", "dnsTransportProtocol", "domain", "mtuMeasurements", "networkMeasurements", "numPathTraces", "pathTraceMode", "probeMode", "protocol", "randomizedStartTime", "recursiveQueries", "ipv6Policy", "fixedPacketRate", "dnsQueryClass", "bgpMeasurements", "usePublicBgp", "monitors", "agents"] model_config = ConfigDict( @@ -245,7 +245,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "bgpMeasurements": obj.get("bgpMeasurements") if obj.get("bgpMeasurements") is not None else True, "usePublicBgp": obj.get("usePublicBgp") if obj.get("usePublicBgp") is not None else True, "monitors": [Monitor.from_dict(_item) for _item in obj["monitors"]] if obj.get("monitors") is not None else None, - "agents": [AgentResponse.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + "agents": [TestAgentResponse.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None }) return _obj diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_trace_test_response.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_trace_test_response.py index 81dbdff16..7a5eeab45 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_trace_test_response.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_trace_test_response.py @@ -19,10 +19,10 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from thousandeyes_sdk.tests.models.agent_response import AgentResponse from thousandeyes_sdk.tests.models.alert_rule import AlertRule from thousandeyes_sdk.tests.models.dns_query_class import DnsQueryClass from thousandeyes_sdk.tests.models.shared_with_account import SharedWithAccount +from thousandeyes_sdk.tests.models.test_agent_response import TestAgentResponse from thousandeyes_sdk.tests.models.test_dns_transport_protocol import TestDnsTransportProtocol from thousandeyes_sdk.tests.models.test_interval import TestInterval from thousandeyes_sdk.tests.models.test_label import TestLabel @@ -57,7 +57,7 @@ class DnsTraceTestResponse(BaseModel): domain: StrictStr = Field(description="The target record for the test, with the record type suffixed. If no record type is specified, the test defaults to an ANY record.") dns_query_class: Optional[DnsQueryClass] = Field(default=None, alias="dnsQueryClass") randomized_start_time: Optional[StrictBool] = Field(default=False, description="Indicates whether agents should randomize the start time in each test round.", alias="randomizedStartTime") - agents: Optional[List[AgentResponse]] = Field(default=None, description="Contains list of agents.") + agents: Optional[List[TestAgentResponse]] = Field(default=None, description="Contains list of agents.") __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "dnsTransportProtocol", "domain", "dnsQueryClass", "randomizedStartTime", "agents"] model_config = ConfigDict( @@ -194,7 +194,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "domain": obj.get("domain"), "dnsQueryClass": obj.get("dnsQueryClass"), "randomizedStartTime": obj.get("randomizedStartTime") if obj.get("randomizedStartTime") is not None else False, - "agents": [AgentResponse.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + "agents": [TestAgentResponse.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None }) return _obj diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/ftp_server_test_response.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/ftp_server_test_response.py index d050e8427..26c011f86 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/ftp_server_test_response.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/ftp_server_test_response.py @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.tests.models.agent_response import AgentResponse from thousandeyes_sdk.tests.models.alert_rule import AlertRule from thousandeyes_sdk.tests.models.ftp_server_request_type import FtpServerRequestType from thousandeyes_sdk.tests.models.monitor import Monitor from thousandeyes_sdk.tests.models.shared_with_account import SharedWithAccount +from thousandeyes_sdk.tests.models.test_agent_response import TestAgentResponse from thousandeyes_sdk.tests.models.test_interval import TestInterval from thousandeyes_sdk.tests.models.test_ipv6_policy import TestIpv6Policy from thousandeyes_sdk.tests.models.test_label import TestLabel @@ -80,7 +80,7 @@ class FtpServerTestResponse(BaseModel): bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") use_public_bgp: Optional[StrictBool] = Field(default=True, description="Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value.", alias="usePublicBgp") monitors: Optional[List[Monitor]] = Field(default=None, description="Contains list of enabled BGP monitors.") - agents: Optional[List[AgentResponse]] = Field(default=None, description="Contains list of agents.") + agents: Optional[List[TestAgentResponse]] = Field(default=None, description="Contains list of agents.") __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "bandwidthMeasurements", "downloadLimit", "ftpTargetTime", "ftpTimeLimit", "mtuMeasurements", "networkMeasurements", "numPathTraces", "password", "pathTraceMode", "probeMode", "protocol", "randomizedStartTime", "requestType", "url", "useActiveFtp", "useExplicitFtps", "username", "fixedPacketRate", "ipv6Policy", "bgpMeasurements", "usePublicBgp", "monitors", "agents"] model_config = ConfigDict( @@ -244,7 +244,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "bgpMeasurements": obj.get("bgpMeasurements") if obj.get("bgpMeasurements") is not None else True, "usePublicBgp": obj.get("usePublicBgp") if obj.get("usePublicBgp") is not None else True, "monitors": [Monitor.from_dict(_item) for _item in obj["monitors"]] if obj.get("monitors") is not None else None, - "agents": [AgentResponse.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + "agents": [TestAgentResponse.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None }) return _obj diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/http_server_test_response.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/http_server_test_response.py index 1c9dc28b6..2967d9393 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/http_server_test_response.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/http_server_test_response.py @@ -21,12 +21,12 @@ from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated from thousandeyes_sdk.tests.models.agent_interfaces import AgentInterfaces -from thousandeyes_sdk.tests.models.agent_response import AgentResponse from thousandeyes_sdk.tests.models.alert_rule import AlertRule from thousandeyes_sdk.tests.models.monitor import Monitor from thousandeyes_sdk.tests.models.o_auth import OAuth from thousandeyes_sdk.tests.models.request_method import RequestMethod from thousandeyes_sdk.tests.models.shared_with_account import SharedWithAccount +from thousandeyes_sdk.tests.models.test_agent_response import TestAgentResponse from thousandeyes_sdk.tests.models.test_auth_type import TestAuthType from thousandeyes_sdk.tests.models.test_custom_headers import TestCustomHeaders from thousandeyes_sdk.tests.models.test_interval import TestInterval @@ -108,7 +108,7 @@ class HttpServerTestResponse(BaseModel): bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") use_public_bgp: Optional[StrictBool] = Field(default=True, description="Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value.", alias="usePublicBgp") monitors: Optional[List[Monitor]] = Field(default=None, description="Contains list of enabled BGP monitors.") - agents: Optional[List[AgentResponse]] = Field(default=None, description="Contains list of agents.") + agents: Optional[List[TestAgentResponse]] = Field(default=None, description="Contains list of agents.") __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "authType", "agentInterfaces", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "headers", "randomizedStartTime", "requestMethod", "postBody", "ipv6Policy", "bgpMeasurements", "usePublicBgp", "monitors", "agents"] model_config = ConfigDict( @@ -312,7 +312,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "bgpMeasurements": obj.get("bgpMeasurements") if obj.get("bgpMeasurements") is not None else True, "usePublicBgp": obj.get("usePublicBgp") if obj.get("usePublicBgp") is not None else True, "monitors": [Monitor.from_dict(_item) for _item in obj["monitors"]] if obj.get("monitors") is not None else None, - "agents": [AgentResponse.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + "agents": [TestAgentResponse.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None }) return _obj diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/page_load_test_response.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/page_load_test_response.py index 99db258c5..78dd5ddc7 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/page_load_test_response.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/page_load_test_response.py @@ -21,11 +21,11 @@ from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated from thousandeyes_sdk.tests.models.agent_interfaces import AgentInterfaces -from thousandeyes_sdk.tests.models.agent_response import AgentResponse from thousandeyes_sdk.tests.models.alert_rule import AlertRule from thousandeyes_sdk.tests.models.monitor import Monitor from thousandeyes_sdk.tests.models.o_auth import OAuth from thousandeyes_sdk.tests.models.shared_with_account import SharedWithAccount +from thousandeyes_sdk.tests.models.test_agent_response import TestAgentResponse from thousandeyes_sdk.tests.models.test_auth_type import TestAuthType from thousandeyes_sdk.tests.models.test_chromium_track import TestChromiumTrack from thousandeyes_sdk.tests.models.test_custom_headers import TestCustomHeaders @@ -121,7 +121,7 @@ class PageLoadTestResponse(BaseModel): monitors: Optional[List[Monitor]] = Field(default=None, description="Contains list of enabled BGP monitors.") http_interval: Optional[TestHttpInterval] = Field(default=None, alias="httpInterval") subinterval: Optional[TestSubInterval] = None - agents: Optional[List[AgentResponse]] = Field(default=None, description="Contains list of agents.") + agents: Optional[List[TestAgentResponse]] = Field(default=None, description="Contains list of agents.") __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "authType", "agentInterfaces", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "emulatedDeviceId", "pageLoadTargetTime", "pageLoadTimeLimit", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "chromeOptions", "chromePolicies", "chromiumTrack", "pageLoadingStrategy", "randomizedStartTime", "identifyAgentTrafficWithUserAgent", "bgpMeasurements", "usePublicBgp", "monitors", "httpInterval", "subinterval", "agents"] model_config = ConfigDict( @@ -336,7 +336,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "monitors": [Monitor.from_dict(_item) for _item in obj["monitors"]] if obj.get("monitors") is not None else None, "httpInterval": obj.get("httpInterval"), "subinterval": obj.get("subinterval"), - "agents": [AgentResponse.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + "agents": [TestAgentResponse.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None }) return _obj diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/sip_server_test_response.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/sip_server_test_response.py index 5324a5928..b726e2710 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/sip_server_test_response.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/sip_server_test_response.py @@ -20,11 +20,11 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.tests.models.agent_response import AgentResponse from thousandeyes_sdk.tests.models.alert_rule import AlertRule from thousandeyes_sdk.tests.models.monitor import Monitor from thousandeyes_sdk.tests.models.shared_with_account import SharedWithAccount from thousandeyes_sdk.tests.models.sip_test_protocol import SipTestProtocol +from thousandeyes_sdk.tests.models.test_agent_response import TestAgentResponse from thousandeyes_sdk.tests.models.test_interval import TestInterval from thousandeyes_sdk.tests.models.test_ipv6_policy import TestIpv6Policy from thousandeyes_sdk.tests.models.test_label import TestLabel @@ -78,7 +78,7 @@ class SipServerTestResponse(BaseModel): protocol: Optional[SipTestProtocol] = None sip_registrar: Optional[StrictStr] = Field(default=None, description="SIP server to be tested, specified by domain name or IP address.", alias="sipRegistrar") user: Optional[StrictStr] = Field(default=None, description="Username for SIP registration, should be unique within a ThousandEyes account group.") - agents: Optional[List[AgentResponse]] = Field(default=None, description="Contains list of agents.") + agents: Optional[List[TestAgentResponse]] = Field(default=None, description="Contains list of agents.") __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "bgpMeasurements", "usePublicBgp", "monitors", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "mtuMeasurements", "networkMeasurements", "numPathTraces", "optionsRegex", "pathTraceMode", "probeMode", "randomizedStartTime", "registerEnabled", "sipTargetTime", "sipTimeLimit", "fixedPacketRate", "ipv6Policy", "authUser", "password", "port", "protocol", "sipRegistrar", "user", "agents"] model_config = ConfigDict( @@ -241,7 +241,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "protocol": obj.get("protocol"), "sipRegistrar": obj.get("sipRegistrar"), "user": obj.get("user"), - "agents": [AgentResponse.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + "agents": [TestAgentResponse.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None }) return _obj diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_agent_response.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_agent_response.py new file mode 100644 index 000000000..8a0d8c80d --- /dev/null +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_agent_response.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + Tests API + + **Note:** The Page Load Tests, API Tests, and Web Transaction Tests APIs are not available for ThousandEyes for Government instance. This API allows you to list, create, edit, and delete Network and Application Synthetics tests. + + 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, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from thousandeyes_sdk.tests.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType +from thousandeyes_sdk.tests.models.coordinates import Coordinates +from thousandeyes_sdk.tests.models.simple_agent_all_of_network_provider_info import SimpleAgentAllOfNetworkProviderInfo +from typing import Optional, Set +from typing_extensions import Self + +class TestAgentResponse(BaseModel): + """ + TestAgentResponse + """ # noqa: E501 + agent_type: CloudEnterpriseAgentType = Field(alias="agentType") + ip_addresses: Optional[List[StrictStr]] = Field(default=None, description="Array of private IP addresses.", alias="ipAddresses") + public_ip_addresses: Optional[List[StrictStr]] = Field(default=None, description="Array of public IP addresses.", alias="publicIpAddresses") + network: Optional[StrictStr] = Field(default=None, description="Network (including ASN) of agent’s public IP.") + agent_id: Optional[StrictStr] = Field(default=None, description="Unique ID of the agent.", alias="agentId") + agent_name: Optional[StrictStr] = Field(default=None, description="Name of the agent.", alias="agentName") + location: Optional[StrictStr] = Field(default=None, description="Location of the agent.") + country_id: Optional[StrictStr] = Field(default=None, description="2-digit ISO country code", alias="countryId") + coordinates: Optional[Coordinates] = None + network_provider_info: Optional[SimpleAgentAllOfNetworkProviderInfo] = Field(default=None, alias="networkProviderInfo") + enabled: Optional[StrictBool] = Field(default=None, description="Flag indicating if the agent is enabled.") + verify_ssl_certificates: Optional[StrictBool] = Field(default=None, description="Flag indicating if has normal SSL operations or if instead it's set to ignore SSL errors on browserbot-based tests.", alias="verifySslCertificates") + prefix: Optional[StrictStr] = Field(default=None, description="Prefix containing agents public IP address.") + source_ip_address: Optional[StrictStr] = Field(default=None, description="IP address of the agent interface used as the source for the test. Returned when a source interface is selected.", alias="sourceIpAddress") + __properties: ClassVar[List[str]] = ["agentType", "ipAddresses", "publicIpAddresses", "network", "agentId", "agentName", "location", "countryId", "coordinates", "networkProviderInfo", "enabled", "verifySslCertificates", "prefix", "sourceIpAddress"] + + 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 TestAgentResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "ip_addresses", + "public_ip_addresses", + "network", + "agent_id", + "location", + "country_id", + "verify_ssl_certificates", + "prefix", + "source_ip_address", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of coordinates + if self.coordinates: + _dict['coordinates'] = self.coordinates.to_dict() + # override the default output from pydantic by calling `to_dict()` of network_provider_info + if self.network_provider_info: + _dict['networkProviderInfo'] = self.network_provider_info.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TestAgentResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "agentType": obj.get("agentType"), + "ipAddresses": obj.get("ipAddresses"), + "publicIpAddresses": obj.get("publicIpAddresses"), + "network": obj.get("network"), + "agentId": obj.get("agentId"), + "agentName": obj.get("agentName"), + "location": obj.get("location"), + "countryId": obj.get("countryId"), + "coordinates": Coordinates.from_dict(obj["coordinates"]) if obj.get("coordinates") is not None else None, + "networkProviderInfo": SimpleAgentAllOfNetworkProviderInfo.from_dict(obj["networkProviderInfo"]) if obj.get("networkProviderInfo") is not None else None, + "enabled": obj.get("enabled"), + "verifySslCertificates": obj.get("verifySslCertificates"), + "prefix": obj.get("prefix"), + "sourceIpAddress": obj.get("sourceIpAddress") + }) + return _obj + + diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_agent_response_properties.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_agent_response_properties.py new file mode 100644 index 000000000..355bc5e65 --- /dev/null +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_agent_response_properties.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Tests API + + **Note:** The Page Load Tests, API Tests, and Web Transaction Tests APIs are not available for ThousandEyes for Government instance. This API allows you to list, create, edit, and delete Network and Application Synthetics tests. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class TestAgentResponseProperties(BaseModel): + """ + TestAgentResponseProperties + """ # noqa: E501 + source_ip_address: Optional[StrictStr] = Field(default=None, description="IP address of the agent interface used as the source for the test. Returned when a source interface is selected.", alias="sourceIpAddress") + __properties: ClassVar[List[str]] = ["sourceIpAddress"] + + 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 TestAgentResponseProperties from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "source_ip_address", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TestAgentResponseProperties from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sourceIpAddress": obj.get("sourceIpAddress") + }) + return _obj + + diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/voice_test_response.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/voice_test_response.py index 79e142d83..a9bff53cd 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/voice_test_response.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/voice_test_response.py @@ -20,10 +20,10 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from thousandeyes_sdk.tests.models.agent_response import AgentResponse from thousandeyes_sdk.tests.models.alert_rule import AlertRule from thousandeyes_sdk.tests.models.monitor import Monitor from thousandeyes_sdk.tests.models.shared_with_account import SharedWithAccount +from thousandeyes_sdk.tests.models.test_agent_response import TestAgentResponse from thousandeyes_sdk.tests.models.test_dscp_id import TestDscpId from thousandeyes_sdk.tests.models.test_interval import TestInterval from thousandeyes_sdk.tests.models.test_label import TestLabel @@ -67,7 +67,7 @@ class VoiceTestResponse(BaseModel): bgp_measurements: Optional[StrictBool] = Field(default=True, description="Set to `true` to enable bgp measurements.", alias="bgpMeasurements") use_public_bgp: Optional[StrictBool] = Field(default=True, description="Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value.", alias="usePublicBgp") monitors: Optional[List[Monitor]] = Field(default=None, description="Contains list of enabled BGP monitors.") - agents: Optional[List[AgentResponse]] = Field(default=None, description="Contains list of agents.") + agents: Optional[List[TestAgentResponse]] = Field(default=None, description="Contains list of agents.") __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "codec", "codecId", "dscp", "dscpId", "duration", "jitterBuffer", "numPathTraces", "port", "randomizedStartTime", "targetAgentId", "bgpMeasurements", "usePublicBgp", "monitors", "agents"] model_config = ConfigDict( @@ -226,7 +226,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "bgpMeasurements": obj.get("bgpMeasurements") if obj.get("bgpMeasurements") is not None else True, "usePublicBgp": obj.get("usePublicBgp") if obj.get("usePublicBgp") is not None else True, "monitors": [Monitor.from_dict(_item) for _item in obj["monitors"]] if obj.get("monitors") is not None else None, - "agents": [AgentResponse.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + "agents": [TestAgentResponse.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None }) return _obj diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/web_transaction_test_response.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/web_transaction_test_response.py index 7308a38ab..e5d3a7313 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/web_transaction_test_response.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/web_transaction_test_response.py @@ -21,11 +21,11 @@ from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated from thousandeyes_sdk.tests.models.agent_interfaces import AgentInterfaces -from thousandeyes_sdk.tests.models.agent_response import AgentResponse from thousandeyes_sdk.tests.models.alert_rule import AlertRule from thousandeyes_sdk.tests.models.monitor import Monitor from thousandeyes_sdk.tests.models.o_auth import OAuth from thousandeyes_sdk.tests.models.shared_with_account import SharedWithAccount +from thousandeyes_sdk.tests.models.test_agent_response import TestAgentResponse from thousandeyes_sdk.tests.models.test_auth_type import TestAuthType from thousandeyes_sdk.tests.models.test_chromium_track import TestChromiumTrack from thousandeyes_sdk.tests.models.test_custom_headers import TestCustomHeaders @@ -122,7 +122,7 @@ class WebTransactionTestResponse(BaseModel): use_public_bgp: Optional[StrictBool] = Field(default=True, description="Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value.", alias="usePublicBgp") monitors: Optional[List[Monitor]] = Field(default=None, description="Contains list of enabled BGP monitors.") subinterval: Optional[TestSubInterval] = None - agents: Optional[List[AgentResponse]] = Field(default=None, description="Contains list of agents.") + agents: Optional[List[TestAgentResponse]] = Field(default=None, description="Contains list of agents.") __properties: ClassVar[List[str]] = ["interval", "alertsEnabled", "enabled", "alertRules", "createdBy", "createdDate", "description", "liveShare", "modifiedBy", "modifiedDate", "savedEvent", "testId", "testName", "type", "_links", "labels", "tags", "sharedWithAccounts", "authType", "agentInterfaces", "bandwidthMeasurements", "clientCertificate", "contentRegex", "customHeaders", "desiredStatusCode", "distributedTracing", "downloadLimit", "dnsOverride", "httpTargetTime", "httpTimeLimit", "httpVersion", "includeHeaders", "mtuMeasurements", "networkMeasurements", "numPathTraces", "oAuth", "password", "pathTraceMode", "probeMode", "protocol", "sslVersion", "sslVersionId", "url", "useNtlm", "userAgent", "username", "verifyCertificate", "allowUnsafeLegacyRenegotiation", "followRedirects", "fixedPacketRate", "overrideAgentProxy", "overrideProxyId", "collectProxyNetworkData", "vaultCredentials", "emulatedDeviceId", "targetTime", "timeLimit", "transactionScript", "flagCollectConsoleLogs", "blockDomains", "disableScreenshot", "allowMicAndCamera", "allowGeolocation", "browserLanguage", "chromeOptions", "chromePolicies", "chromiumTrack", "pageLoadingStrategy", "randomizedStartTime", "identifyAgentTrafficWithUserAgent", "credentials", "bgpMeasurements", "usePublicBgp", "monitors", "subinterval", "agents"] model_config = ConfigDict( @@ -339,7 +339,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "usePublicBgp": obj.get("usePublicBgp") if obj.get("usePublicBgp") is not None else True, "monitors": [Monitor.from_dict(_item) for _item in obj["monitors"]] if obj.get("monitors") is not None else None, "subinterval": obj.get("subinterval"), - "agents": [AgentResponse.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + "agents": [TestAgentResponse.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None }) return _obj diff --git a/thousandeyes-sdk-tests/test/mock_manifest.py b/thousandeyes-sdk-tests/test/mock_manifest.py index 1921b44dc..39d9740ca 100644 --- a/thousandeyes-sdk-tests/test/mock_manifest.py +++ b/thousandeyes-sdk-tests/test/mock_manifest.py @@ -219,6 +219,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -240,6 +241,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -851,6 +853,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -872,6 +875,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -1595,6 +1599,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -1616,6 +1621,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -2037,6 +2043,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -2058,6 +2065,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -2469,6 +2477,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -2490,6 +2499,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -2929,6 +2939,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -2950,6 +2961,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -3270,6 +3282,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -3291,6 +3304,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -3705,6 +3719,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -3726,6 +3741,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -4168,6 +4184,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -4189,6 +4206,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -5460,6 +5478,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -5481,6 +5500,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -5850,6 +5870,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -5871,6 +5892,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -6256,6 +6278,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -6277,6 +6300,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -6577,6 +6601,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -6598,6 +6623,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -7017,6 +7043,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -7038,6 +7065,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -7498,6 +7526,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -7519,6 +7548,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -7824,6 +7854,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -7845,6 +7876,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -8216,6 +8248,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -8237,6 +8270,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -8625,6 +8659,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -8646,6 +8681,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -8943,6 +8979,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -8964,6 +9001,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -9372,6 +9410,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -9393,6 +9432,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -9847,6 +9887,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -9868,6 +9909,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -10271,6 +10313,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -10292,6 +10335,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -10815,6 +10859,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -10836,6 +10881,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -11443,6 +11489,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -11464,6 +11511,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -11904,6 +11952,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -11925,6 +11974,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -12470,6 +12520,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -12491,6 +12542,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -13131,6 +13183,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -13152,6 +13205,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -14003,6 +14057,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -14024,6 +14079,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -14432,6 +14488,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -14453,6 +14510,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -14904,6 +14962,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -14925,6 +14984,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -15512,6 +15572,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -15533,6 +15594,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -15936,6 +15998,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -15957,6 +16020,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -16384,6 +16448,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -16405,6 +16470,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -16808,6 +16874,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -16829,6 +16896,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -17378,6 +17446,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -17399,6 +17468,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -18043,6 +18113,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -18064,6 +18135,7 @@ "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", diff --git a/thousandeyes-sdk-tests/test/test_agent_to_agent_tests_api.py b/thousandeyes-sdk-tests/test/test_agent_to_agent_tests_api.py index 236498328..df599277a 100644 --- a/thousandeyes-sdk-tests/test/test_agent_to_agent_tests_api.py +++ b/thousandeyes-sdk-tests/test/test_agent_to_agent_tests_api.py @@ -193,6 +193,7 @@ def test_create_agent_to_agent_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -214,6 +215,7 @@ def test_create_agent_to_agent_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -366,6 +368,7 @@ def test_get_agent_to_agent_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -387,6 +390,7 @@ def test_get_agent_to_agent_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -719,6 +723,7 @@ def test_update_agent_to_agent_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -740,6 +745,7 @@ def test_update_agent_to_agent_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", diff --git a/thousandeyes-sdk-tests/test/test_agent_to_agent_tests_api_integration.py b/thousandeyes-sdk-tests/test/test_agent_to_agent_tests_api_integration.py index 8f298ad44..4fa32e417 100644 --- a/thousandeyes-sdk-tests/test/test_agent_to_agent_tests_api_integration.py +++ b/thousandeyes-sdk-tests/test/test_agent_to_agent_tests_api_integration.py @@ -194,6 +194,7 @@ def test_create_agent_to_agent_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -215,6 +216,7 @@ def test_create_agent_to_agent_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -1232,6 +1234,7 @@ def test_get_agent_to_agent_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -1253,6 +1256,7 @@ def test_get_agent_to_agent_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -1956,6 +1960,7 @@ def test_update_agent_to_agent_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -1977,6 +1982,7 @@ def test_update_agent_to_agent_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", diff --git a/thousandeyes-sdk-tests/test/test_agent_to_server_tests_api.py b/thousandeyes-sdk-tests/test/test_agent_to_server_tests_api.py index ade02f48a..f3a919a98 100644 --- a/thousandeyes-sdk-tests/test/test_agent_to_server_tests_api.py +++ b/thousandeyes-sdk-tests/test/test_agent_to_server_tests_api.py @@ -196,6 +196,7 @@ def test_create_agent_to_server_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -217,6 +218,7 @@ def test_create_agent_to_server_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -370,6 +372,7 @@ def test_get_agent_to_server_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -391,6 +394,7 @@ def test_get_agent_to_server_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -703,6 +707,7 @@ def test_update_agent_to_server_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -724,6 +729,7 @@ def test_update_agent_to_server_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", diff --git a/thousandeyes-sdk-tests/test/test_agent_to_server_tests_api_integration.py b/thousandeyes-sdk-tests/test/test_agent_to_server_tests_api_integration.py index 777d0af0e..8391a2cea 100644 --- a/thousandeyes-sdk-tests/test/test_agent_to_server_tests_api_integration.py +++ b/thousandeyes-sdk-tests/test/test_agent_to_server_tests_api_integration.py @@ -197,6 +197,7 @@ def test_create_agent_to_server_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -218,6 +219,7 @@ def test_create_agent_to_server_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -1250,6 +1252,7 @@ def test_get_agent_to_server_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -1271,6 +1274,7 @@ def test_get_agent_to_server_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -1954,6 +1958,7 @@ def test_update_agent_to_server_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -1975,6 +1980,7 @@ def test_update_agent_to_server_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", diff --git a/thousandeyes-sdk-tests/test/test_api_tests_api.py b/thousandeyes-sdk-tests/test/test_api_tests_api.py index eae69b660..e08df00cd 100644 --- a/thousandeyes-sdk-tests/test/test_api_tests_api.py +++ b/thousandeyes-sdk-tests/test/test_api_tests_api.py @@ -391,6 +391,7 @@ def test_create_api_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -412,6 +413,7 @@ def test_create_api_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -664,6 +666,7 @@ def test_get_api_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -685,6 +688,7 @@ def test_get_api_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -1401,6 +1405,7 @@ def test_update_api_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -1422,6 +1427,7 @@ def test_update_api_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", diff --git a/thousandeyes-sdk-tests/test/test_api_tests_api_integration.py b/thousandeyes-sdk-tests/test/test_api_tests_api_integration.py index 4f3b075fa..e92d8a3c4 100644 --- a/thousandeyes-sdk-tests/test/test_api_tests_api_integration.py +++ b/thousandeyes-sdk-tests/test/test_api_tests_api_integration.py @@ -392,6 +392,7 @@ def test_create_api_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -413,6 +414,7 @@ def test_create_api_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -2230,6 +2232,7 @@ def test_get_api_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -2251,6 +2254,7 @@ def test_get_api_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -3338,6 +3342,7 @@ def test_update_api_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -3359,6 +3364,7 @@ def test_update_api_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", diff --git a/thousandeyes-sdk-tests/test/test_dns_server_tests_api.py b/thousandeyes-sdk-tests/test/test_dns_server_tests_api.py index a70c8e8b8..985cdc788 100644 --- a/thousandeyes-sdk-tests/test/test_dns_server_tests_api.py +++ b/thousandeyes-sdk-tests/test/test_dns_server_tests_api.py @@ -202,6 +202,7 @@ def test_create_dns_server_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -223,6 +224,7 @@ def test_create_dns_server_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -382,6 +384,7 @@ def test_get_dns_server_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -403,6 +406,7 @@ def test_get_dns_server_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -757,6 +761,7 @@ def test_update_dns_server_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -778,6 +783,7 @@ def test_update_dns_server_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", diff --git a/thousandeyes-sdk-tests/test/test_dns_server_tests_api_integration.py b/thousandeyes-sdk-tests/test/test_dns_server_tests_api_integration.py index 4bf8d7690..cd940febb 100644 --- a/thousandeyes-sdk-tests/test/test_dns_server_tests_api_integration.py +++ b/thousandeyes-sdk-tests/test/test_dns_server_tests_api_integration.py @@ -203,6 +203,7 @@ def test_create_dns_server_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -224,6 +225,7 @@ def test_create_dns_server_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -1255,6 +1257,7 @@ def test_get_dns_server_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -1276,6 +1279,7 @@ def test_get_dns_server_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -2001,6 +2005,7 @@ def test_update_dns_server_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -2022,6 +2027,7 @@ def test_update_dns_server_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", diff --git a/thousandeyes-sdk-tests/test/test_dns_trace_tests_api.py b/thousandeyes-sdk-tests/test/test_dns_trace_tests_api.py index 42b62119b..009e9fe96 100644 --- a/thousandeyes-sdk-tests/test/test_dns_trace_tests_api.py +++ b/thousandeyes-sdk-tests/test/test_dns_trace_tests_api.py @@ -166,6 +166,7 @@ def test_create_dns_trace_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -187,6 +188,7 @@ def test_create_dns_trace_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -312,6 +314,7 @@ def test_get_dns_trace_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -333,6 +336,7 @@ def test_get_dns_trace_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -601,6 +605,7 @@ def test_update_dns_trace_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -622,6 +627,7 @@ def test_update_dns_trace_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", diff --git a/thousandeyes-sdk-tests/test/test_dns_trace_tests_api_integration.py b/thousandeyes-sdk-tests/test/test_dns_trace_tests_api_integration.py index 3912473df..77eff5f6d 100644 --- a/thousandeyes-sdk-tests/test/test_dns_trace_tests_api_integration.py +++ b/thousandeyes-sdk-tests/test/test_dns_trace_tests_api_integration.py @@ -167,6 +167,7 @@ def test_create_dns_trace_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -188,6 +189,7 @@ def test_create_dns_trace_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -1087,6 +1089,7 @@ def test_get_dns_trace_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -1108,6 +1111,7 @@ def test_get_dns_trace_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -1747,6 +1751,7 @@ def test_update_dns_trace_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -1768,6 +1773,7 @@ def test_update_dns_trace_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", diff --git a/thousandeyes-sdk-tests/test/test_dnssec_tests_api.py b/thousandeyes-sdk-tests/test/test_dnssec_tests_api.py index 21e2aa7cf..60b907bb3 100644 --- a/thousandeyes-sdk-tests/test/test_dnssec_tests_api.py +++ b/thousandeyes-sdk-tests/test/test_dnssec_tests_api.py @@ -164,6 +164,7 @@ def test_create_dns_sec_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -185,6 +186,7 @@ def test_create_dns_sec_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -309,6 +311,7 @@ def test_get_dns_sec_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -330,6 +333,7 @@ def test_get_dns_sec_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -594,6 +598,7 @@ def test_update_dns_sec_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -615,6 +620,7 @@ def test_update_dns_sec_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", diff --git a/thousandeyes-sdk-tests/test/test_dnssec_tests_api_integration.py b/thousandeyes-sdk-tests/test/test_dnssec_tests_api_integration.py index 5e89d74ef..550853dc6 100644 --- a/thousandeyes-sdk-tests/test/test_dnssec_tests_api_integration.py +++ b/thousandeyes-sdk-tests/test/test_dnssec_tests_api_integration.py @@ -165,6 +165,7 @@ def test_create_dns_sec_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -186,6 +187,7 @@ def test_create_dns_sec_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -1077,6 +1079,7 @@ def test_get_dns_sec_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -1098,6 +1101,7 @@ def test_get_dns_sec_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -1733,6 +1737,7 @@ def test_update_dns_sec_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -1754,6 +1759,7 @@ def test_update_dns_sec_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", diff --git a/thousandeyes-sdk-tests/test/test_ftp_server_tests_api.py b/thousandeyes-sdk-tests/test/test_ftp_server_tests_api.py index 468155438..5cdf89a02 100644 --- a/thousandeyes-sdk-tests/test/test_ftp_server_tests_api.py +++ b/thousandeyes-sdk-tests/test/test_ftp_server_tests_api.py @@ -202,6 +202,7 @@ def test_create_ftp_server_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -223,6 +224,7 @@ def test_create_ftp_server_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -380,6 +382,7 @@ def test_get_ftp_server_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -401,6 +404,7 @@ def test_get_ftp_server_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -753,6 +757,7 @@ def test_update_ftp_server_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -774,6 +779,7 @@ def test_update_ftp_server_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", diff --git a/thousandeyes-sdk-tests/test/test_ftp_server_tests_api_integration.py b/thousandeyes-sdk-tests/test/test_ftp_server_tests_api_integration.py index eeb9d9183..2345ffe85 100644 --- a/thousandeyes-sdk-tests/test/test_ftp_server_tests_api_integration.py +++ b/thousandeyes-sdk-tests/test/test_ftp_server_tests_api_integration.py @@ -203,6 +203,7 @@ def test_create_ftp_server_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -224,6 +225,7 @@ def test_create_ftp_server_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -1253,6 +1255,7 @@ def test_get_ftp_server_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -1274,6 +1277,7 @@ def test_get_ftp_server_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -1997,6 +2001,7 @@ def test_update_ftp_server_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -2018,6 +2023,7 @@ def test_update_ftp_server_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", diff --git a/thousandeyes-sdk-tests/test/test_http_server_tests_api.py b/thousandeyes-sdk-tests/test/test_http_server_tests_api.py index 4fef91017..8a098faec 100644 --- a/thousandeyes-sdk-tests/test/test_http_server_tests_api.py +++ b/thousandeyes-sdk-tests/test/test_http_server_tests_api.py @@ -327,6 +327,7 @@ def test_create_http_server_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -348,6 +349,7 @@ def test_create_http_server_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -556,6 +558,7 @@ def test_get_http_server_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -577,6 +580,7 @@ def test_get_http_server_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -1133,6 +1137,7 @@ def test_update_http_server_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -1154,6 +1159,7 @@ def test_update_http_server_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", diff --git a/thousandeyes-sdk-tests/test/test_http_server_tests_api_integration.py b/thousandeyes-sdk-tests/test/test_http_server_tests_api_integration.py index b8e0560b0..85f47509e 100644 --- a/thousandeyes-sdk-tests/test/test_http_server_tests_api_integration.py +++ b/thousandeyes-sdk-tests/test/test_http_server_tests_api_integration.py @@ -328,6 +328,7 @@ def test_create_http_server_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -349,6 +350,7 @@ def test_create_http_server_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -1814,6 +1816,7 @@ def test_get_http_server_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -1835,6 +1838,7 @@ def test_get_http_server_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -2762,6 +2766,7 @@ def test_update_http_server_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -2783,6 +2788,7 @@ def test_update_http_server_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", diff --git a/thousandeyes-sdk-tests/test/test_page_load_tests_api.py b/thousandeyes-sdk-tests/test/test_page_load_tests_api.py index 48ef7f444..e12d68165 100644 --- a/thousandeyes-sdk-tests/test/test_page_load_tests_api.py +++ b/thousandeyes-sdk-tests/test/test_page_load_tests_api.py @@ -347,6 +347,7 @@ def test_create_page_load_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -368,6 +369,7 @@ def test_create_page_load_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -587,6 +589,7 @@ def test_get_page_load_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -608,6 +611,7 @@ def test_get_page_load_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -1208,6 +1212,7 @@ def test_update_page_load_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -1229,6 +1234,7 @@ def test_update_page_load_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", diff --git a/thousandeyes-sdk-tests/test/test_page_load_tests_api_integration.py b/thousandeyes-sdk-tests/test/test_page_load_tests_api_integration.py index c1e5fe3fd..389d6121d 100644 --- a/thousandeyes-sdk-tests/test/test_page_load_tests_api_integration.py +++ b/thousandeyes-sdk-tests/test/test_page_load_tests_api_integration.py @@ -348,6 +348,7 @@ def test_create_page_load_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -369,6 +370,7 @@ def test_create_page_load_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -1922,6 +1924,7 @@ def test_get_page_load_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -1943,6 +1946,7 @@ def test_get_page_load_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -2914,6 +2918,7 @@ def test_update_page_load_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -2935,6 +2940,7 @@ def test_update_page_load_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", diff --git a/thousandeyes-sdk-tests/test/test_sip_server_tests_api.py b/thousandeyes-sdk-tests/test/test_sip_server_tests_api.py index 5a6532036..265ed03d5 100644 --- a/thousandeyes-sdk-tests/test/test_sip_server_tests_api.py +++ b/thousandeyes-sdk-tests/test/test_sip_server_tests_api.py @@ -202,6 +202,7 @@ def test_create_sip_server_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -223,6 +224,7 @@ def test_create_sip_server_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -379,6 +381,7 @@ def test_get_sip_server_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -400,6 +403,7 @@ def test_get_sip_server_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -750,6 +754,7 @@ def test_update_sip_server_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -771,6 +776,7 @@ def test_update_sip_server_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", diff --git a/thousandeyes-sdk-tests/test/test_sip_server_tests_api_integration.py b/thousandeyes-sdk-tests/test/test_sip_server_tests_api_integration.py index bc86345c1..b56eb67af 100644 --- a/thousandeyes-sdk-tests/test/test_sip_server_tests_api_integration.py +++ b/thousandeyes-sdk-tests/test/test_sip_server_tests_api_integration.py @@ -203,6 +203,7 @@ def test_create_sip_server_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -224,6 +225,7 @@ def test_create_sip_server_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -1259,6 +1261,7 @@ def test_get_sip_server_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -1280,6 +1283,7 @@ def test_get_sip_server_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -2001,6 +2005,7 @@ def test_update_sip_server_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -2022,6 +2027,7 @@ def test_update_sip_server_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", diff --git a/thousandeyes-sdk-tests/test/test_voice_tests_api.py b/thousandeyes-sdk-tests/test/test_voice_tests_api.py index dc756b750..925329c02 100644 --- a/thousandeyes-sdk-tests/test/test_voice_tests_api.py +++ b/thousandeyes-sdk-tests/test/test_voice_tests_api.py @@ -183,6 +183,7 @@ def test_create_voice_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -204,6 +205,7 @@ def test_create_voice_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -352,6 +354,7 @@ def test_get_voice_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -373,6 +376,7 @@ def test_get_voice_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -689,6 +693,7 @@ def test_update_voice_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -710,6 +715,7 @@ def test_update_voice_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", diff --git a/thousandeyes-sdk-tests/test/test_voice_tests_api_integration.py b/thousandeyes-sdk-tests/test/test_voice_tests_api_integration.py index 48e3e1fdd..322ab114f 100644 --- a/thousandeyes-sdk-tests/test/test_voice_tests_api_integration.py +++ b/thousandeyes-sdk-tests/test/test_voice_tests_api_integration.py @@ -184,6 +184,7 @@ def test_create_voice_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -205,6 +206,7 @@ def test_create_voice_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -1190,6 +1192,7 @@ def test_get_voice_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -1211,6 +1214,7 @@ def test_get_voice_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -1898,6 +1902,7 @@ def test_update_voice_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -1919,6 +1924,7 @@ def test_update_voice_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", diff --git a/thousandeyes-sdk-tests/test/test_web_transaction_tests_api.py b/thousandeyes-sdk-tests/test/test_web_transaction_tests_api.py index 25f0c20b6..22fe8bd98 100644 --- a/thousandeyes-sdk-tests/test/test_web_transaction_tests_api.py +++ b/thousandeyes-sdk-tests/test/test_web_transaction_tests_api.py @@ -348,6 +348,7 @@ def test_create_web_transactions_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -369,6 +370,7 @@ def test_create_web_transactions_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -590,6 +592,7 @@ def test_get_web_transactions_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -611,6 +614,7 @@ def test_get_web_transactions_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -1217,6 +1221,7 @@ def test_update_web_transactions_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -1238,6 +1243,7 @@ def test_update_web_transactions_test_models_validation(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", diff --git a/thousandeyes-sdk-tests/test/test_web_transaction_tests_api_integration.py b/thousandeyes-sdk-tests/test/test_web_transaction_tests_api_integration.py index ff9709909..84d352a90 100644 --- a/thousandeyes-sdk-tests/test/test_web_transaction_tests_api_integration.py +++ b/thousandeyes-sdk-tests/test/test_web_transaction_tests_api_integration.py @@ -349,6 +349,7 @@ def test_create_web_transactions_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -370,6 +371,7 @@ def test_create_web_transactions_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -1939,6 +1941,7 @@ def test_get_web_transactions_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -1960,6 +1963,7 @@ def test_get_web_transactions_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -2937,6 +2941,7 @@ def test_update_web_transactions_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", @@ -2958,6 +2963,7 @@ def test_update_web_transactions_test_happy_path(self) -> None: "longitude" : -122.41942 }, "agentName" : "thousandeyes-stg-va-254", + "sourceIpAddress" : "1.1.1.1", "networkProviderInfo" : { "asn" : 7018, "name" : "AT&T Services, Inc.", diff --git a/thousandeyes-sdk-usage/README.md b/thousandeyes-sdk-usage/README.md index 8d7d99187..df0d11932 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.99 +- API version: 7.0.101 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator