From e9ebb5f4b5422cddba996faefd02951dd354cf5b Mon Sep 17 00:00:00 2001 From: API Team Date: Tue, 4 Jun 2024 09:14:54 +0000 Subject: [PATCH] [GitHub Bot] Generated python SDK --- .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 115 + .../.openapi-generator/VERSION | 1 + thousandeyes-sdk-administrative/README.md | 191 ++ .../docs/AccountGroup.md | 30 + .../docs/AccountGroupDetail.md | 36 + .../docs/AccountGroupInfo.md | 33 + .../docs/AccountGroupRequest.md | 30 + .../docs/AccountGroupRole.md | 30 + .../docs/AccountGroups.md | 30 + .../docs/AccountGroupsApi.md | 443 ++++ thousandeyes-sdk-administrative/docs/Agent.md | 39 + .../docs/AgentBase.md | 31 + .../docs/AuditUserEvents.md | 32 + .../docs/BaseRole.md | 31 + .../docs/CloudEnterpriseAgentType.md | 12 + .../docs/ClusterMember.md | 38 + .../docs/CreatedAccountGroup.md | 35 + .../docs/CreatedUser.md | 36 + .../docs/EnterpriseAgent.md | 52 + .../docs/EnterpriseAgentData.md | 41 + .../docs/EnterpriseAgentIpv6Policy.md | 12 + .../docs/EnterpriseAgentState.md | 12 + thousandeyes-sdk-administrative/docs/Error.md | 33 + .../docs/ErrorDetail.md | 30 + .../docs/ErrorDetailCode.md | 12 + .../docs/Expand.md | 11 + .../docs/ExtendedUser.md | 34 + .../docs/InterfaceIpMapping.md | 30 + thousandeyes-sdk-administrative/docs/Link.md | 37 + .../docs/PaginationLinks.md | 32 + .../docs/Permission.md | 32 + .../docs/Permissions.md | 30 + .../docs/PermissionsApi.md | 93 + .../docs/Resource.md | 30 + thousandeyes-sdk-administrative/docs/Role.md | 32 + .../docs/RoleDetail.md | 33 + .../docs/RoleRequestBody.md | 30 + thousandeyes-sdk-administrative/docs/Roles.md | 30 + .../docs/RolesApi.md | 442 ++++ .../docs/SelfLinks.md | 30 + .../docs/SimpleAgent.md | 38 + .../docs/UnauthorizedError.md | 30 + thousandeyes-sdk-administrative/docs/User.md | 33 + .../docs/UserAccountGroup.md | 34 + .../docs/UserAccountGroupRole.md | 30 + .../docs/UserDetail.md | 37 + .../docs/UserEvent.md | 36 + .../docs/UserEventsApi.md | 103 + .../docs/UserRequest.md | 33 + thousandeyes-sdk-administrative/docs/Users.md | 30 + .../docs/UsersApi.md | 442 ++++ .../docs/ValidationError.md | 34 + .../docs/ValidationErrorItem.md | 31 + .../pyproject.toml | 80 + thousandeyes-sdk-administrative/setup.cfg | 2 + .../src/thousandeyes_sdk/admin/__init__.py | 70 + .../thousandeyes_sdk/admin/api/__init__.py | 9 + .../admin/api/account_groups_api.py | 1543 +++++++++++++ .../admin/api/permissions_api.py | 325 +++ .../thousandeyes_sdk/admin/api/roles_api.py | 1555 +++++++++++++ .../admin/api/user_events_api.py | 429 ++++ .../thousandeyes_sdk/admin/api/users_api.py | 1556 +++++++++++++ .../thousandeyes_sdk/admin/models/__init__.py | 61 + .../admin/models/account_group.py | 90 + .../admin/models/account_group_detail.py | 122 + .../admin/models/account_group_info.py | 96 + .../admin/models/account_group_request.py | 90 + .../admin/models/account_group_role.py | 102 + .../admin/models/account_groups.py | 102 + .../thousandeyes_sdk/admin/models/agent.py | 125 + .../admin/models/agent_base.py | 98 + .../admin/models/audit_user_events.py | 111 + .../admin/models/base_role.py | 92 + .../models/cloud_enterprise_agent_type.py | 38 + .../admin/models/cluster_member.py | 132 ++ .../admin/models/created_account_group.py | 112 + .../admin/models/created_user.py | 127 + .../admin/models/enterprise_agent.py | 200 ++ .../admin/models/enterprise_agent_data.py | 161 ++ .../models/enterprise_agent_ipv6_policy.py | 38 + .../admin/models/enterprise_agent_state.py | 38 + .../thousandeyes_sdk/admin/models/error.py | 96 + .../admin/models/error_detail.py | 93 + .../admin/models/error_detail_code.py | 43 + .../thousandeyes_sdk/admin/models/expand.py | 37 + .../admin/models/extended_user.py | 103 + .../admin/models/interface_ip_mapping.py | 94 + .../src/thousandeyes_sdk/admin/models/link.py | 102 + .../admin/models/pagination_links.py | 102 + .../admin/models/permission.py | 94 + .../admin/models/permissions.py | 102 + .../thousandeyes_sdk/admin/models/resource.py | 90 + .../src/thousandeyes_sdk/admin/models/role.py | 94 + .../admin/models/role_detail.py | 108 + .../admin/models/role_request_body.py | 90 + .../thousandeyes_sdk/admin/models/roles.py | 102 + .../admin/models/self_links.py | 92 + .../admin/models/simple_agent.py | 122 + .../admin/models/unauthorized_error.py | 90 + .../src/thousandeyes_sdk/admin/models/user.py | 101 + .../admin/models/user_account_group.py | 107 + .../admin/models/user_account_group_role.py | 90 + .../admin/models/user_detail.py | 129 ++ .../admin/models/user_event.py | 111 + .../admin/models/user_request.py | 104 + .../thousandeyes_sdk/admin/models/users.py | 102 + .../admin/models/validation_error.py | 111 + .../admin/models/validation_error_item.py | 92 + .../src/thousandeyes_sdk/admin/py.typed | 0 .../test/__init__.py | 0 .../test/test_account_groups_api.py | 591 +++++ .../test/test_permissions_api.py | 68 + .../test/test_roles_api.py | 201 ++ .../test/test_user_events_api.py | 103 + .../test/test_users_api.py | 345 +++ .../test/test_utils.py | 16 + .../.openapi-generator/FILES | 56 +- thousandeyes-sdk-agents/README.md | 19 +- ...dAndEnterpriseAgentNotificationRulesApi.md | 4 +- .../docs/CloudAndEnterpriseAgentsApi.md | 42 +- .../docs/EnterpriseAgentClusterApi.md | 28 +- thousandeyes-sdk-agents/docs/ProxiesApi.md | 14 +- .../docs/ValidationErrorItem.md | 2 +- thousandeyes-sdk-agents/pyproject.toml | 7 +- .../src/thousandeyes_sdk/agents/__init__.py | 4 +- ...enterprise_agent_notification_rules_api.py | 6 +- .../api/cloud_and_enterprise_agents_api.py | 50 +- .../api/enterprise_agent_cluster_api.py | 34 +- .../agents/api/proxies_api.py | 19 +- .../agents/models/__init__.py | 2 +- .../agents/models/account_group.py | 5 +- .../thousandeyes_sdk/agents/models/agent.py | 5 +- .../agents/models/agent_base.py | 5 +- .../models/agent_cluster_assign_request.py | 5 +- .../models/agent_cluster_unassign_request.py | 5 +- .../agents/models/agent_details.py | 8 +- .../agents/models/agent_details_expand.py | 2 +- .../agents/models/agent_ipv6_policy.py | 2 +- .../agents/models/agent_list_expand.py | 2 +- .../agents/models/agent_proxies.py | 5 +- .../agents/models/agent_proxy.py | 5 +- .../agents/models/agent_request.py | 5 +- .../agents/models/alert_email.py | 5 +- .../agents/models/alert_integration_base.py | 5 +- .../agents/models/alert_integration_type.py | 2 +- .../agents/models/cloud_agent_detail.py | 5 +- .../agents/models/cloud_enterprise_agent.py | 8 +- .../models/cloud_enterprise_agent_type.py | 2 +- .../agents/models/cloud_enterprise_agents.py | 5 +- .../agents/models/cluster_member.py | 5 +- .../agents/models/enterprise_agent.py | 5 +- .../models/enterprise_agent_cluster_detail.py | 5 +- .../agents/models/enterprise_agent_data.py | 5 +- .../agents/models/enterprise_agent_detail.py | 5 +- .../models/enterprise_agent_ipv6_policy.py | 2 +- .../enterprise_agent_response_expands.py | 5 +- .../agents/models/enterprise_agent_state.py | 2 +- .../thousandeyes_sdk/agents/models/error.py | 5 +- .../agents/models/error_detail.py | 5 +- .../agents/models/error_detail_code.py | 2 +- .../agents/models/interface_ip_mapping.py | 5 +- .../thousandeyes_sdk/agents/models/labels.py | 5 +- .../thousandeyes_sdk/agents/models/link.py | 5 +- .../list_notification_rules_response.py | 5 +- .../agents/models/notification.py | 5 +- .../agents/models/notification_rule.py | 5 +- .../agents/models/notification_rule_detail.py | 5 +- .../agents/models/notification_rules.py | 5 +- .../agents/models/proxy_auth_type.py | 2 +- .../agents/models/proxy_type.py | 2 +- .../agents/models/self_links.py | 5 +- .../agents/models/simple_agent.py | 5 +- .../agents/models/simple_enterprise_agent.py | 5 +- .../agents/models/simple_test.py | 5 +- .../agents/models/test_interval.py | 2 +- .../agents/models/test_links.py | 5 +- .../agents/models/test_self_link.py | 5 +- .../agents/models/test_type.py | 3 +- .../agents/models/unauthorized_error.py | 5 +- .../agents/models/validation_error.py | 5 +- .../agents/models/validation_error_item.py | 9 +- ...enterprise_agent_notification_rules_api.py | 167 ++ .../test_cloud_and_enterprise_agents_api.py | 309 +++ .../test/test_enterprise_agent_cluster_api.py | 202 ++ .../test/test_proxies_api.py | 82 + thousandeyes-sdk-agents/test/test_utils.py | 16 + .../.openapi-generator/FILES | 54 +- thousandeyes-sdk-alerts/README.md | 21 +- thousandeyes-sdk-alerts/docs/Alert.md | 2 +- thousandeyes-sdk-alerts/docs/AlertDetail.md | 2 +- thousandeyes-sdk-alerts/docs/AlertRulesApi.md | 22 +- .../docs/AlertSuppressionWindowsApi.md | 68 +- thousandeyes-sdk-alerts/docs/AlertsApi.md | 20 +- thousandeyes-sdk-alerts/docs/BaseAlert.md | 2 +- .../docs/ValidationErrorItem.md | 2 +- thousandeyes-sdk-alerts/pyproject.toml | 7 +- .../src/thousandeyes_sdk/alerts/__init__.py | 4 +- .../alerts/api/alert_rules_api.py | 23 +- .../api/alert_suppression_windows_api.py | 79 +- .../thousandeyes_sdk/alerts/api/alerts_api.py | 36 +- .../alerts/models/__init__.py | 2 +- .../thousandeyes_sdk/alerts/models/alert.py | 11 +- .../alerts/models/alert_detail.py | 11 +- .../alerts/models/alert_direction.py | 2 +- .../alerts/models/alert_links.py | 5 +- .../alerts/models/alert_meta.py | 5 +- .../alerts/models/alert_metric_detail.py | 5 +- .../models/alert_rounds_violation_mode.py | 2 +- .../alerts/models/alert_rule.py | 5 +- .../alerts/models/alert_suppression_window.py | 5 +- .../models/alert_suppression_window_detail.py | 5 +- .../alert_suppression_window_request.py | 5 +- .../models/alert_suppression_window_state.py | 2 +- .../models/alert_suppression_windows.py | 5 +- .../alerts/models/alert_type.py | 2 +- .../thousandeyes_sdk/alerts/models/alerts.py | 5 +- .../alerts/models/base_alert.py | 11 +- .../models/base_alert_suppression_window.py | 5 +- .../alerts/models/base_rule.py | 5 +- .../alerts/models/base_test.py | 5 +- .../alerts/models/days_of_week.py | 2 +- .../alerts/models/end_alert_metrics.py | 5 +- .../alerts/models/end_repeat.py | 5 +- .../alerts/models/end_repeat_type.py | 2 +- .../thousandeyes_sdk/alerts/models/error.py | 5 +- .../thousandeyes_sdk/alerts/models/expand.py | 2 +- .../alerts/models/interval_type.py | 2 +- .../alerts/models/legacy_alert.py | 5 +- .../thousandeyes_sdk/alerts/models/link.py | 5 +- .../alerts/models/notification.py | 5 +- .../alerts/models/notification_email.py | 5 +- .../alerts/models/notification_third_party.py | 5 +- .../alerts/models/notification_webhook.py | 5 +- .../alerts/models/pagination_links.py | 5 +- .../thousandeyes_sdk/alerts/models/repeat.py | 5 +- .../alerts/models/repeat_type.py | 2 +- .../thousandeyes_sdk/alerts/models/rule.py | 5 +- .../alerts/models/rule_detail.py | 5 +- .../alerts/models/rule_detail_update.py | 5 +- .../thousandeyes_sdk/alerts/models/rules.py | 5 +- .../alerts/models/self_links.py | 5 +- .../alerts/models/severity.py | 2 +- .../alerts/models/start_alert_metrics.py | 5 +- .../thousandeyes_sdk/alerts/models/state.py | 2 +- .../alerts/models/test_interval.py | 2 +- .../models/third_party_integration_type.py | 2 +- .../alerts/models/unauthorized_error.py | 5 +- .../alerts/models/unexpanded_test.py | 5 +- .../alerts/models/validation_error.py | 5 +- .../alerts/models/validation_error_item.py | 9 +- .../alerts/models/webhook_integration_type.py | 2 +- .../test/test_alert_rules_api.py | 412 ++++ .../test_alert_suppression_windows_api.py | 481 ++++ .../test/test_alerts_api.py | 302 +++ thousandeyes-sdk-alerts/test/test_utils.py | 16 + .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 27 + .../.openapi-generator/VERSION | 1 + thousandeyes-sdk-bgp-monitors/README.md | 132 ++ thousandeyes-sdk-bgp-monitors/docs/Error.md | 33 + thousandeyes-sdk-bgp-monitors/docs/Link.md | 37 + .../docs/ListBGPMonitorsApi.md | 92 + thousandeyes-sdk-bgp-monitors/docs/Monitor.md | 34 + .../docs/MonitorType.md | 12 + .../docs/Monitors.md | 30 + .../docs/SelfLinks.md | 30 + .../docs/UnauthorizedError.md | 30 + thousandeyes-sdk-bgp-monitors/pyproject.toml | 80 + thousandeyes-sdk-bgp-monitors/setup.cfg | 2 + .../thousandeyes_sdk/bgp_monitors/__init__.py | 28 + .../bgp_monitors/api/__init__.py | 5 + .../bgp_monitors/api/list_bgp_monitors_api.py | 322 +++ .../bgp_monitors/models/__init__.py | 23 + .../bgp_monitors/models/error.py | 96 + .../bgp_monitors/models/link.py | 102 + .../bgp_monitors/models/monitor.py | 103 + .../bgp_monitors/models/monitor_type.py | 37 + .../bgp_monitors/models/monitors.py | 102 + .../bgp_monitors/models/self_links.py | 92 + .../bgp_monitors/models/unauthorized_error.py | 90 + .../thousandeyes_sdk/bgp_monitors/py.typed | 0 .../test/__init__.py | 0 .../test/test_list_bgp_monitors_api.py | 72 + .../test/test_utils.py | 16 + .../.openapi-generator/FILES | 12 +- thousandeyes-sdk-credentials/README.md | 23 +- .../docs/CredentialsApi.md | 68 +- .../docs/ValidationErrorItem.md | 2 +- thousandeyes-sdk-credentials/pyproject.toml | 7 +- .../thousandeyes_sdk/credentials/__init__.py | 4 +- .../credentials/api/credentials_api.py | 79 +- .../credentials/models/__init__.py | 2 +- .../credentials/models/credential.py | 5 +- .../credentials/models/credential_request.py | 5 +- .../models/credential_without_value.py | 5 +- .../credentials/models/credentials.py | 5 +- .../credentials/models/error.py | 5 +- .../credentials/models/link.py | 5 +- .../credentials/models/self_links.py | 5 +- .../credentials/models/unauthorized_error.py | 5 +- .../credentials/models/validation_error.py | 5 +- .../models/validation_error_item.py | 9 +- .../test/test_credentials_api.py | 188 ++ .../test/test_utils.py | 16 + .../.openapi-generator/FILES | 116 +- thousandeyes-sdk-dashboards/README.md | 29 +- .../docs/DashboardSnapshotsApi.md | 382 +-- .../docs/DashboardsApi.md | 48 +- .../docs/DashboardsFiltersApi.md | 216 +- .../docs/ValidationErrorItem.md | 2 +- thousandeyes-sdk-dashboards/pyproject.toml | 7 +- .../thousandeyes_sdk/dashboards/__init__.py | 4 +- .../dashboards/api/dashboard_snapshots_api.py | 1260 +++++----- .../dashboards/api/dashboards_api.py | 52 +- .../dashboards/api/dashboards_filters_api.py | 643 +++--- .../dashboards/models/__init__.py | 2 +- .../dashboards/models/active_within.py | 5 +- .../models/agent_status_datasource.py | 2 +- .../models/alert_list_alert_type.py | 2 +- .../models/alert_list_datasource.py | 2 +- .../dashboards/models/api_agent_location.py | 5 +- .../models/api_agent_status_agent.py | 5 +- .../models/api_agent_status_ip_info.py | 5 +- .../models/api_agent_status_summary.py | 5 +- .../models/api_agent_status_widget.py | 5 +- .../models/api_agent_widget_show.py | 2 +- .../models/api_agent_widget_type.py | 2 +- .../models/api_aggregate_property.py | 2 +- .../dashboards/models/api_alert_list_alert.py | 5 +- .../models/api_alert_list_widget.py | 5 +- .../models/api_box_and_whiskers_widget.py | 5 +- .../models/api_color_grid_widget.py | 5 +- .../models/api_context_filter_request.py | 5 +- .../models/api_context_filter_response.py | 5 +- .../models/api_context_filters_response.py | 5 +- .../dashboards/models/api_dashboard.py | 5 +- .../dashboards/models/api_dashboard_asw.py | 5 +- .../api_dashboard_filter_user_details.py | 5 +- .../models/api_dashboard_snapshot.py | 5 +- .../dashboards/models/api_data_point_group.py | 5 +- .../models/api_data_source_filter.py | 5 +- .../models/api_data_source_filters.py | 5 +- .../dashboards/models/api_default_timespan.py | 5 +- .../dashboards/models/api_duration.py | 5 +- .../dashboards/models/api_duration_unit.py | 2 +- .../dashboards/models/api_geo_map_widget.py | 5 +- .../dashboards/models/api_graphlet_point.py | 5 +- .../models/api_grouped_barchart_widget.py | 5 +- .../models/api_multi_metric_column.py | 5 +- .../models/api_multi_metric_column_data.py | 5 +- .../models/api_multi_metric_table_widget.py | 5 +- ...search_filter_api_test_table_filter_key.py | 5 +- .../dashboards/models/api_numbers_card.py | 5 +- .../models/api_numbers_card_data.py | 5 +- .../models/api_numbers_card_widget.py | 5 +- .../dashboards/models/api_pie_chart_widget.py | 5 +- .../api_report_data_component_label_map.py | 5 +- ...i_report_data_component_label_map_entry.py | 5 +- .../models/api_report_snapshot_time_span.py | 5 +- .../models/api_stacked_area_chart_widget.py | 5 +- .../models/api_stacked_barchart_widget.py | 5 +- .../dashboards/models/api_table_widget.py | 5 +- .../dashboards/models/api_test_table_data.py | 5 +- .../models/api_test_table_graphlets_data.py | 5 +- .../models/api_test_table_widget.py | 5 +- .../models/api_timeseries_widget.py | 5 +- .../dashboards/models/api_widget.py | 8 +- .../dashboards/models/api_widget_data.py | 5 +- .../models/api_widget_data_point.py | 5 +- .../models/api_widget_data_response.py | 5 +- .../api_widget_data_snapshot_response.py | 5 +- ...widget_filter_api_test_table_filter_key.py | 5 +- .../models/api_widget_fixed_y_scale_prefix.py | 2 +- .../dashboards/models/api_widget_measure.py | 5 +- .../models/api_widget_sort_direction.py | 2 +- .../models/api_widget_sort_property.py | 2 +- .../dashboards/models/api_widgets_data_v2.py | 5 +- .../dashboards/models/app_and_self_links.py | 5 +- .../dashboards/models/asw_repeat.py | 2 +- .../dashboards/models/asw_repeat_unit.py | 2 +- .../models/box_and_whiskers_datasource.py | 2 +- .../models/color_grid_datasource.py | 2 +- .../dashboards/models/dashboard.py | 5 +- .../models/dashboard_global_filter_id.py | 5 +- .../dashboards/models/dashboard_links.py | 5 +- .../dashboards/models/dashboard_metric.py | 2 +- .../models/dashboard_metric_direction.py | 2 +- .../dashboards/models/dashboard_order.py | 2 +- .../models/dashboard_snapshot_response.py | 5 +- .../models/dashboard_snapshots_page.py | 5 +- .../dashboards/models/default_timespan.py | 5 +- .../models/enterprise_agent_state.py | 2 +- .../dashboards/models/error.py | 5 +- .../generate_dashboard_snapshot_request.py | 5 +- .../dashboards/models/geo_map_datasource.py | 2 +- .../models/grouped_bar_chart_datasource.py | 2 +- .../models/legacy_agent_widget_show.py | 2 +- .../models/legacy_agent_widget_type.py | 2 +- .../models/legacy_alert_list_alert_type.py | 2 +- .../dashboards/models/legacy_api_dashboard.py | 5 +- .../models/legacy_dashboard_snapshot.py | 5 +- .../models/legacy_default_timespan.py | 5 +- .../dashboards/models/legacy_duration_unit.py | 2 +- .../models/legacy_widget_sort_direction.py | 2 +- .../models/legacy_widget_sort_property.py | 2 +- .../dashboards/models/link.py | 5 +- .../dashboards/models/metric_group.py | 2 +- .../models/multi_metrics_table_datasource.py | 2 +- .../models/numbers_card_datasource.py | 2 +- .../dashboards/models/pagination_links.py | 5 +- .../dashboards/models/pie_chart_datasource.py | 2 +- .../dashboards/models/scalable_widget.py | 5 +- .../dashboards/models/self_links.py | 5 +- .../models/stacked_area_chart_datasource.py | 2 +- .../models/stacked_bar_chart_datasource.py | 2 +- .../dashboards/models/table_datasource.py | 2 +- .../models/test_table_datasource.py | 2 +- .../models/test_table_filter_key.py | 2 +- .../models/test_table_filter_type.py | 2 +- .../models/timeseries_datasource.py | 2 +- .../dashboards/models/unauthorized_error.py | 5 +- ...te_snapshot_expiration_date_api_request.py | 5 +- .../dashboards/models/validation_error.py | 5 +- .../models/validation_error_item.py | 9 +- .../dashboards/models/visual_mode.py | 2 +- .../dashboards/models/widget.py | 5 +- .../dashboards/models/widget_measure_type.py | 2 +- .../dashboards/models/widget_type.py | 2 +- .../test/test_dashboard_snapshots_api.py | 1258 ++++++++++ .../test/test_dashboards_api.py | 1345 +++++++++++ .../test/test_dashboards_filters_api.py | 394 ++++ .../test/test_utils.py | 16 + .../.openapi-generator/FILES | 50 +- thousandeyes-sdk-endpoint-agents/README.md | 33 +- .../docs/AdministrativeEndpointsApi.md | 14 +- .../docs/ManageAgentsApi.md | 452 ++-- .../docs/TransferApi.md | 186 +- .../docs/ValidationErrorItem.md | 2 +- .../pyproject.toml | 7 +- .../endpoint_agents/__init__.py | 4 +- .../api/administrative_endpoints_api.py | 19 +- .../endpoint_agents/api/manage_agents_api.py | 947 ++++---- .../endpoint_agents/api/transfer_api.py | 636 ++--- .../endpoint_agents/models/__init__.py | 2 +- .../endpoint_agents/models/address_profile.py | 5 +- .../endpoint_agents/models/address_type.py | 2 +- .../models/agent_license_type.py | 2 +- .../models/agent_search_filters.py | 5 +- .../models/agent_search_request.py | 5 +- .../models/agent_search_sort.py | 5 +- .../models/agent_search_sort_key.py | 2 +- .../models/agent_threshold_filter.py | 5 +- .../models/agent_threshold_filters.py | 5 +- .../endpoint_agents/models/agent_transfer.py | 5 +- .../models/agent_transfer_request.py | 5 +- .../models/agent_transfer_status.py | 5 +- .../endpoint_agents/models/browser_type.py | 2 +- .../models/bulk_agent_transfer_request.py | 5 +- .../models/bulk_agent_transfer_response.py | 5 +- .../models/conditional_operator.py | 2 +- .../models/connection_string.py | 5 +- .../endpoint_agents/models/endpoint_agent.py | 5 +- .../models/endpoint_agent_location.py | 5 +- .../models/endpoint_agent_update.py | 5 +- .../endpoint_agents/models/endpoint_agents.py | 5 +- .../models/endpoint_asn_details.py | 5 +- .../models/endpoint_browser_extension.py | 5 +- .../endpoint_agents/models/endpoint_client.py | 5 +- .../models/endpoint_user_profile.py | 5 +- .../models/endpoint_vpn_profile.py | 5 +- .../endpoint_agents/models/error.py | 5 +- .../models/ethernet_profile.py | 5 +- .../endpoint_agents/models/expand.py | 2 +- .../models/filter_endpoint_agents_response.py | 5 +- .../models/interface_hardware_type.py | 2 +- .../models/interface_profile.py | 5 +- .../endpoint_agents/models/link.py | 5 +- .../models/list_endpoint_agents_response.py | 5 +- .../models/pagination_next_and_self_link.py | 5 +- .../models/pagination_next_link.py | 5 +- .../endpoint_agents/models/platform.py | 2 +- .../endpoint_agents/models/self_links.py | 5 +- .../endpoint_agents/models/sort_order.py | 2 +- .../endpoint_agents/models/status.py | 2 +- .../models/threshold_filter_operator.py | 2 +- .../models/unauthorized_error.py | 5 +- .../models/validation_error.py | 5 +- .../models/validation_error_item.py | 9 +- .../endpoint_agents/models/vpn_type.py | 2 +- .../models/wireless_profile.py | 5 +- .../test/test_administrative_endpoints_api.py | 58 + .../test/test_manage_agents_api.py | 1369 +++++++++++ .../test/test_transfer_api.py | 98 + .../test/test_utils.py | 16 + .../.openapi-generator/FILES | 35 +- .../README.md | 19 +- .../AgentToServerInstantScheduledTestApi.md | 14 +- .../docs/EndpointHttpServerTest.md | 2 +- .../docs/HttpServerInstantScheduledTestApi.md | 14 +- .../docs/RunExistingTestApi.md | 10 +- .../docs/ValidationErrorItem.md | 2 +- .../pyproject.toml | 7 +- .../endpoint_instant_tests/__init__.py | 4 +- ...nt_to_server_instant_scheduled_test_api.py | 19 +- .../http_server_instant_scheduled_test_api.py | 19 +- .../api/run_existing_test_api.py | 18 +- .../endpoint_instant_tests/models/__init__.py | 2 +- .../models/alert_direction.py | 2 +- .../models/alert_rounds_violation_mode.py | 2 +- .../models/alert_rule.py | 5 +- .../models/alert_type.py | 2 +- .../endpoint_agent_labels_selector_config.py | 5 +- .../models/endpoint_agent_selector_config.py | 8 +- .../endpoint_agent_to_server_instant_test.py | 5 +- .../models/endpoint_agent_to_server_test.py | 5 +- .../endpoint_all_agents_selector_config.py | 5 +- .../models/endpoint_http_server_base_test.py | 5 +- .../endpoint_http_server_instant_test.py | 5 +- .../models/endpoint_http_server_test.py | 7 +- .../models/endpoint_instant_test.py | 5 +- .../models/endpoint_scheduled_test_type.py | 2 +- ...ndpoint_specific_agents_selector_config.py | 5 +- .../models/endpoint_test.py | 5 +- .../endpoint_test_agent_selector_type.py | 2 +- .../models/endpoint_test_auth_type.py | 2 +- .../models/endpoint_test_links.py | 5 +- .../models/endpoint_test_protocol.py | 2 +- .../models/endpoint_test_self_link.py | 5 +- .../endpoint_instant_tests/models/error.py | 5 +- .../endpoint_instant_tests/models/link.py | 5 +- .../endpoint_instant_tests/models/severity.py | 2 +- .../models/test_interval.py | 2 +- .../models/test_label.py | 5 +- .../models/test_probe_mode_response.py | 2 +- .../models/test_ssl_version_id.py | 2 +- .../models/unauthorized_error.py | 5 +- .../models/validation_error.py | 5 +- .../models/validation_error_item.py | 9 +- ...nt_to_server_instant_scheduled_test_api.py | 133 ++ ..._http_server_instant_scheduled_test_api.py | 157 ++ .../test/test_run_existing_test_api.py | 38 + .../test/test_utils.py | 16 + .../.openapi-generator/FILES | 18 +- thousandeyes-sdk-endpoint-labels/README.md | 27 +- .../docs/ManageLabelsApi.md | 390 ++-- .../docs/ValidationErrorItem.md | 2 +- .../pyproject.toml | 7 +- .../endpoint_labels/__init__.py | 4 +- .../endpoint_labels/api/manage_labels_api.py | 775 +++---- .../endpoint_labels/models/__init__.py | 2 +- .../endpoint_labels/models/error.py | 5 +- .../endpoint_labels/models/expand.py | 2 +- .../endpoint_labels/models/filter.py | 5 +- .../endpoint_labels/models/filter_type.py | 2 +- .../endpoint_labels/models/label.py | 5 +- .../models/label_filter_mode.py | 2 +- .../endpoint_labels/models/label_request.py | 5 +- .../endpoint_labels/models/label_response.py | 5 +- .../endpoint_labels/models/labels.py | 5 +- .../endpoint_labels/models/link.py | 5 +- .../endpoint_labels/models/match_type.py | 2 +- .../models/pagination_next_and_self_link.py | 5 +- .../endpoint_labels/models/self_links.py | 5 +- .../models/unauthorized_error.py | 5 +- .../models/validation_error.py | 5 +- .../models/validation_error_item.py | 9 +- .../test/test_manage_labels_api.py | 272 +++ .../test/test_utils.py | 16 + .../.openapi-generator/FILES | 139 +- .../README.md | 54 +- .../docs/AsnDetails.md | 2 +- .../docs/CpuUtilization.md | 2 +- .../docs/DynamicBaseTestResult.md | 3 + .../docs/EndpointHttpServerTest.md | 2 +- .../docs/EndpointScheduledTest.md | 2 +- .../docs/EthernetProfile.md | 2 +- .../docs/LocalNetworkTestsResultsApi.md | 358 +-- .../docs/LocalNetworkTopologyResult.md | 2 +- .../docs/LocalNetworkTopologyResultBase.md | 2 +- .../docs/MultiTestIdNetworkTestResults.md | 2 +- .../docs/NetworkDynamicTestResult.md | 3 + .../docs/NetworkDynamicTestResults.md | 2 +- .../docs/NetworkDynamicTestsResultsApi.md | 388 ++-- .../docs/NetworkScheduledTestsResultsApi.md | 404 ++-- .../docs/NetworkTestResults.md | 2 +- .../docs/PathVisDetailDynamicTestResult.md | 3 + .../docs/PathVisDynamicTestResult.md | 3 + .../docs/PhysicalMemoryUsedBytes.md | 2 +- .../docs/RealUserTestsResultsApi.md | 574 ++--- .../docs/SystemMetrics.md | 6 +- .../docs/TargetProfile.md | 2 +- .../docs/UdpProbeModeResponse.md | 12 + .../docs/ValidationErrorItem.md | 2 +- .../WebHTTPServerScheduledTestResultsApi.md | 14 +- .../pyproject.toml | 7 +- .../endpoint_test_results/__init__.py | 5 +- .../api/local_network_tests_results_api.py | 1175 +++++----- .../api/network_dynamic_tests_results_api.py | 1443 ++++++------ .../network_scheduled_tests_results_api.py | 1468 ++++++------ .../api/real_user_tests_results_api.py | 2047 +++++++++-------- ..._http_server_scheduled_test_results_api.py | 19 +- .../endpoint_test_results/models/__init__.py | 3 +- .../models/alert_direction.py | 2 +- .../models/alert_rounds_violation_mode.py | 2 +- .../models/alert_rule.py | 5 +- .../models/alert_type.py | 2 +- .../models/application_score_quality.py | 2 +- .../models/asn_details.py | 11 +- .../models/conditional_operator.py | 2 +- .../models/cpu_utilization.py | 9 +- .../models/dynamic_base_test_result.py | 16 +- .../models/dynamic_test.py | 5 +- .../models/dynamic_test_links.py | 5 +- .../models/dynamic_test_self_link.py | 5 +- .../models/dynamic_test_webex.py | 5 +- .../models/dynamic_tests_data_round_search.py | 5 +- .../dynamic_tests_data_search_filter.py | 5 +- .../endpoint_agent_labels_selector_config.py | 5 +- .../models/endpoint_agent_selector_config.py | 8 +- .../models/endpoint_agent_to_server_test.py | 5 +- .../endpoint_all_agents_selector_config.py | 5 +- .../models/endpoint_browser.py | 5 +- .../models/endpoint_http_data_point_score.py | 5 +- .../models/endpoint_http_server_base_test.py | 5 +- .../models/endpoint_http_server_test.py | 7 +- ...ndpoint_network_topology_result_request.py | 5 +- ..._network_topology_result_request_filter.py | 5 +- .../models/endpoint_ping_data_point_score.py | 5 +- .../models/endpoint_real_user_test.py | 5 +- .../models/endpoint_real_user_test_base.py | 5 +- .../models/endpoint_real_user_test_detail.py | 5 +- .../endpoint_real_user_test_detail_results.py | 5 +- ...nt_real_user_test_result_request_filter.py | 5 +- .../models/endpoint_real_user_test_results.py | 5 +- ...endpoint_real_user_test_results_request.py | 5 +- .../models/endpoint_result_request_filter.py | 5 +- .../models/endpoint_scheduled_test.py | 8 +- .../models/endpoint_scheduled_test_type.py | 2 +- ...ndpoint_specific_agents_selector_config.py | 5 +- .../models/endpoint_test.py | 5 +- .../models/endpoint_test_auth_type.py | 2 +- .../models/endpoint_test_links.py | 5 +- .../models/endpoint_test_protocol.py | 2 +- .../models/endpoint_test_self_link.py | 5 +- .../endpoint_test_results/models/error.py | 5 +- .../models/ethernet_profile.py | 11 +- .../endpoint_test_results/models/expand.py | 2 +- .../models/gateway_network_ping.py | 5 +- .../endpoint_test_results/models/hop.py | 5 +- .../models/http_error_type.py | 2 +- .../models/http_test_result.py | 5 +- .../models/http_test_result_headers.py | 5 +- .../models/http_test_results.py | 5 +- .../models/interface_hardware_type.py | 2 +- .../endpoint_test_results/models/link.py | 5 +- .../models/local_network_result.py | 5 +- .../models/local_network_results.py | 5 +- .../local_network_topology_detail_results.py | 5 +- .../models/local_network_topology_result.py | 11 +- .../local_network_topology_result_base.py | 11 +- .../models/local_network_topology_results.py | 5 +- .../multi_test_id_network_test_results.py | 11 +- .../multi_test_id_tests_data_rounds_search.py | 5 +- .../multi_test_id_tests_data_search_filter.py | 5 +- .../models/network_dynamic_test_result.py | 16 +- .../models/network_dynamic_test_results.py | 11 +- .../models/network_interface.py | 5 +- .../models/network_metrics.py | 5 +- .../models/network_ping.py | 5 +- .../models/network_profile.py | 5 +- .../models/network_proxy.py | 5 +- .../models/network_proxy_profile.py | 5 +- .../models/network_test_result.py | 5 +- .../models/network_test_results.py | 11 +- .../models/network_topology_type.py | 2 +- .../models/network_wireless_profile.py | 5 +- .../models/pagination_next_and_self_link.py | 5 +- .../models/pagination_next_link.py | 5 +- .../models/path_vis_base_test_result.py | 5 +- .../path_vis_detail_dynamic_test_result.py | 16 +- .../path_vis_detail_dynamic_test_results.py | 5 +- .../models/path_vis_detail_test_result.py | 5 +- .../models/path_vis_detail_test_results.py | 5 +- .../models/path_vis_dynamic_test_result.py | 16 +- .../models/path_vis_dynamic_test_results.py | 5 +- .../models/path_vis_endpoint.py | 5 +- .../models/path_vis_hop.py | 5 +- .../models/path_vis_route.py | 5 +- .../models/path_vis_test_result.py | 5 +- .../models/path_vis_test_results.py | 5 +- .../models/physical_memory_used_bytes.py | 7 +- .../endpoint_test_results/models/platform.py | 2 +- .../models/real_user_test_coordinates.py | 5 +- .../models/real_user_test_network.py | 5 +- .../models/real_user_test_network_result.py | 5 +- .../models/real_user_test_network_results.py | 5 +- .../models/real_user_test_page.py | 5 +- .../real_user_test_page_detail_result.py | 5 +- .../models/real_user_test_page_result.py | 5 +- .../models/real_user_test_page_results.py | 5 +- .../models/real_user_test_page_timings.py | 5 +- .../models/self_links.py | 5 +- .../endpoint_test_results/models/severity.py | 2 +- .../models/sort_order.py | 2 +- .../models/system_metrics.py | 15 +- .../models/target_network_ping.py | 5 +- .../models/target_profile.py | 11 +- .../models/target_traceroute.py | 5 +- .../models/tcp_connect.py | 5 +- .../models/test_interval.py | 2 +- .../models/test_label.py | 5 +- .../models/test_probe_mode_response.py | 2 +- .../models/test_protocol.py | 2 +- .../models/test_result.py | 5 +- .../models/test_ssl_version_id.py | 2 +- .../models/tests_data_rounds_search.py | 5 +- .../models/tests_data_search_filter.py | 5 +- .../models/tests_data_search_sort.py | 5 +- .../models/tests_data_search_sort_key.py | 2 +- .../models/tests_data_threshold_filter.py | 5 +- .../models/tests_data_threshold_filters.py | 5 +- .../models/threshold_filter_name.py | 2 +- .../models/threshold_filter_operator.py | 2 +- .../models/traceroute.py | 5 +- .../models/traceroute_hop.py | 5 +- .../endpoint_test_results/models/trigger.py | 2 +- .../models/udp_probe_mode_response.py | 37 + .../models/unauthorized_error.py | 5 +- .../models/validation_error.py | 5 +- .../models/validation_error_item.py | 9 +- .../models/vpn_network_ping.py | 5 +- .../models/vpn_profile.py | 5 +- .../models/vpn_traceroute.py | 5 +- .../endpoint_test_results/models/vpn_type.py | 2 +- .../test_local_network_tests_results_api.py | 560 +++++ .../test_network_dynamic_tests_results_api.py | 1069 +++++++++ ...est_network_scheduled_tests_results_api.py | 1329 +++++++++++ .../test/test_real_user_tests_results_api.py | 1017 ++++++++ .../test/test_utils.py | 16 + ..._http_server_scheduled_test_results_api.py | 358 +++ .../.openapi-generator/FILES | 52 +- thousandeyes-sdk-endpoint-tests/README.md | 49 +- .../docs/DynamicTestsAgentToServerApi.md | 546 ++--- .../docs/EndpointHttpServerTest.md | 2 +- .../docs/ListEndpointScheduledTestsApi.md | 14 +- .../docs/ScheduledTestsAgentToServerApi.md | 546 ++--- .../docs/ScheduledTestsHTTPServerApi.md | 546 ++--- .../docs/ValidationErrorItem.md | 2 +- .../pyproject.toml | 7 +- .../endpoint_tests/__init__.py | 4 +- .../api/dynamic_tests_agent_to_server_api.py | 689 +++--- .../api/list_endpoint_scheduled_tests_api.py | 19 +- .../scheduled_tests_agent_to_server_api.py | 689 +++--- .../api/scheduled_tests_http_server_api.py | 689 +++--- .../endpoint_tests/models/__init__.py | 2 +- .../endpoint_tests/models/alert_direction.py | 2 +- .../models/alert_rounds_violation_mode.py | 2 +- .../endpoint_tests/models/alert_rule.py | 5 +- .../endpoint_tests/models/alert_type.py | 2 +- .../endpoint_tests/models/dynamic_test.py | 5 +- .../models/dynamic_test_links.py | 5 +- .../models/dynamic_test_request.py | 5 +- .../models/dynamic_test_self_link.py | 5 +- .../endpoint_tests/models/dynamic_tests.py | 5 +- .../endpoint_agent_labels_selector_config.py | 5 +- .../models/endpoint_agent_selector_config.py | 8 +- .../endpoint_agent_to_server_instant_test.py | 5 +- .../models/endpoint_agent_to_server_test.py | 5 +- .../endpoint_agent_to_server_test_request.py | 5 +- .../models/endpoint_agent_to_server_tests.py | 5 +- .../endpoint_all_agents_selector_config.py | 5 +- .../models/endpoint_dynamic_test_update.py | 5 +- .../models/endpoint_http_server_base_test.py | 5 +- .../endpoint_http_server_instant_test.py | 5 +- .../models/endpoint_http_server_test.py | 7 +- .../endpoint_http_server_test_request.py | 5 +- .../models/endpoint_http_server_tests.py | 5 +- .../models/endpoint_http_test_update.py | 5 +- .../models/endpoint_instant_test.py | 5 +- .../models/endpoint_network_test_update.py | 5 +- .../models/endpoint_scheduled_test_type.py | 2 +- ...ndpoint_specific_agents_selector_config.py | 5 +- .../endpoint_tests/models/endpoint_test.py | 5 +- .../endpoint_test_agent_selector_type.py | 2 +- .../models/endpoint_test_auth_type.py | 2 +- .../models/endpoint_test_links.py | 5 +- .../models/endpoint_test_protocol.py | 2 +- .../models/endpoint_test_self_link.py | 5 +- .../endpoint_tests/models/endpoint_tests.py | 5 +- .../endpoint_tests/models/error.py | 5 +- .../endpoint_tests/models/link.py | 5 +- .../endpoint_tests/models/self_links.py | 5 +- .../endpoint_tests/models/severity.py | 2 +- .../endpoint_tests/models/test_interval.py | 2 +- .../endpoint_tests/models/test_label.py | 5 +- .../endpoint_tests/models/test_probe_mode.py | 2 +- .../models/test_probe_mode_response.py | 2 +- .../models/test_ssl_version_id.py | 2 +- .../endpoint_tests/models/test_update.py | 5 +- .../models/unauthorized_error.py | 5 +- .../endpoint_tests/models/validation_error.py | 5 +- .../models/validation_error_item.py | 9 +- .../test_dynamic_tests_agent_to_server_api.py | 385 ++++ .../test_list_endpoint_scheduled_tests_api.py | 186 ++ ...est_scheduled_tests_agent_to_server_api.py | 488 ++++ .../test_scheduled_tests_http_server_api.py | 567 +++++ .../test/test_utils.py | 16 + .../.openapi-generator/FILES | 98 +- thousandeyes-sdk-instant-tests/README.md | 39 +- thousandeyes-sdk-instant-tests/docs/APIApi.md | 14 +- .../docs/AgentToAgentApi.md | 14 +- .../docs/AgentToServerApi.md | 14 +- .../docs/ApiInstantTest.md | 2 +- .../docs/ApiInstantTestRequest.md | 2 +- .../docs/ApiProperties.md | 2 +- .../docs/ApiRequest.md | 4 +- .../docs/DNSSecurityApi.md | 14 +- .../docs/DNSServerApi.md | 14 +- .../docs/DNSTraceApi.md | 14 +- .../docs/FTPServerApi.md | 14 +- .../docs/HTTPPageLoadApi.md | 14 +- .../docs/HTTPServerApi.md | 14 +- .../docs/PageLoadInstantTest.md | 2 +- .../docs/PageLoadInstantTestRequest.md | 2 +- .../docs/PageLoadProperties.md | 2 +- thousandeyes-sdk-instant-tests/docs/RunApi.md | 12 +- .../docs/SIPServerApi.md | 14 +- .../docs/ValidationErrorItem.md | 2 +- .../docs/VoiceApi.md | 14 +- .../docs/WebTransactionApi.md | 14 +- .../docs/WebTransactionInstantTest.md | 2 +- .../docs/WebTransactionInstantTestRequest.md | 2 +- .../docs/WebTransactionProperties.md | 2 +- thousandeyes-sdk-instant-tests/pyproject.toml | 7 +- .../instant_tests/__init__.py | 4 +- .../instant_tests/api/agent_to_agent_api.py | 19 +- .../instant_tests/api/agent_to_server_api.py | 19 +- .../instant_tests/api/api_api.py | 19 +- .../instant_tests/api/dns_security_api.py | 19 +- .../instant_tests/api/dns_server_api.py | 19 +- .../instant_tests/api/dns_trace_api.py | 19 +- .../instant_tests/api/ftp_server_api.py | 19 +- .../instant_tests/api/http_page_load_api.py | 19 +- .../instant_tests/api/http_server_api.py | 19 +- .../instant_tests/api/run_api.py | 19 +- .../instant_tests/api/sip_server_api.py | 19 +- .../instant_tests/api/voice_api.py | 19 +- .../instant_tests/api/web_transaction_api.py | 19 +- .../instant_tests/models/__init__.py | 2 +- .../instant_tests/models/agent.py | 5 +- .../instant_tests/models/agent_base.py | 5 +- .../models/agent_to_agent_instant_test.py | 5 +- .../agent_to_agent_instant_test_request.py | 5 +- .../models/agent_to_agent_properties.py | 5 +- .../models/agent_to_agent_test_protocol.py | 2 +- .../models/agent_to_server_instant_test.py | 5 +- .../agent_to_server_instant_test_request.py | 5 +- .../models/agent_to_server_properties.py | 5 +- .../instant_tests/models/api_instant_test.py | 7 +- .../models/api_instant_test_request.py | 7 +- .../models/api_predefined_variable.py | 5 +- .../instant_tests/models/api_properties.py | 7 +- .../instant_tests/models/api_request.py | 15 +- .../models/api_request_assertion.py | 5 +- .../models/api_request_assertion_name.py | 2 +- .../models/api_request_assertion_operator.py | 2 +- .../models/api_request_auth_type.py | 2 +- .../models/api_request_header.py | 5 +- .../models/api_request_method.py | 2 +- .../models/api_request_variable.py | 5 +- .../models/cloud_enterprise_agent_type.py | 2 +- .../instant_tests/models/dns_query_class.py | 2 +- .../models/dns_sec_instant_test.py | 5 +- .../models/dns_sec_instant_test_request.py | 5 +- .../models/dns_sec_properties.py | 5 +- .../models/dns_server_instant_test.py | 5 +- .../models/dns_server_instant_test_request.py | 5 +- .../models/dns_server_properties.py | 5 +- .../models/dns_servers_request.py | 5 +- .../models/dns_trace_instant_test.py | 5 +- .../models/dns_trace_instant_test_request.py | 5 +- .../models/dns_trace_properties.py | 5 +- .../instant_tests/models/error.py | 5 +- .../instant_tests/models/expand.py | 2 +- .../models/ftp_server_instant_test.py | 5 +- .../models/ftp_server_properties.py | 5 +- .../models/ftp_server_request_type.py | 2 +- .../models/http_server_instant_test.py | 5 +- .../http_server_instant_test_request.py | 5 +- .../models/http_server_properties.py | 5 +- .../instant_tests/models/instant_test.py | 5 +- .../models/instant_test_request.py | 5 +- .../instant_tests/models/link.py | 5 +- .../models/page_load_instant_test.py | 7 +- .../models/page_load_instant_test_request.py | 7 +- .../models/page_load_properties.py | 7 +- .../models/server_instant_test_request.py | 5 +- .../models/shared_with_account.py | 5 +- .../instant_tests/models/simple_agent.py | 5 +- .../models/sip_server_instant_test.py | 5 +- .../models/sip_server_instant_test_request.py | 5 +- .../sip_server_instant_test_request1.py | 5 +- .../sip_server_instant_test_response.py | 5 +- .../models/sip_server_properties.py | 5 +- .../instant_tests/models/sip_test_protocol.py | 2 +- .../instant_tests/models/test_agent.py | 5 +- .../instant_tests/models/test_auth_type.py | 2 +- .../models/test_custom_headers.py | 5 +- .../instant_tests/models/test_direction.py | 2 +- .../instant_tests/models/test_dns_server.py | 5 +- .../models/test_dns_transport_protocol.py | 2 +- .../instant_tests/models/test_dscp_id.py | 2 +- .../instant_tests/models/test_ipv6_policy.py | 2 +- .../instant_tests/models/test_label.py | 5 +- .../instant_tests/models/test_links.py | 5 +- .../models/test_page_loading_strategy.py | 2 +- .../models/test_path_trace_mode.py | 2 +- .../instant_tests/models/test_probe_mode.py | 2 +- .../instant_tests/models/test_protocol.py | 2 +- .../instant_tests/models/test_self_link.py | 5 +- .../models/test_sip_credentials.py | 5 +- .../models/test_ssl_version_id.py | 2 +- .../instant_tests/models/test_type.py | 3 +- .../models/unauthorized_error.py | 5 +- .../models/unexpanded_instant_test.py | 5 +- .../instant_tests/models/validation_error.py | 5 +- .../models/validation_error_item.py | 9 +- .../models/voice_instant_test.py | 5 +- .../models/voice_instant_test_request.py | 5 +- .../instant_tests/models/voice_properties.py | 5 +- .../models/web_transaction_instant_test.py | 7 +- .../web_transaction_instant_test_request.py | 7 +- .../models/web_transaction_properties.py | 7 +- .../test/test_agent_to_agent_api.py | 182 ++ .../test/test_agent_to_server_api.py | 186 ++ .../test/test_api_api.py | 332 +++ .../test/test_dns_security_api.py | 160 ++ .../test/test_dns_server_api.py | 190 ++ .../test/test_dns_trace_api.py | 162 ++ .../test/test_ftp_server_api.py | 192 ++ .../test/test_http_page_load_api.py | 252 ++ .../test/test_http_server_api.py | 244 ++ .../test/test_run_api.py | 38 + .../test/test_sip_server_api.py | 192 ++ .../test/test_utils.py | 16 + .../test/test_voice_api.py | 174 ++ .../test/test_web_transaction_api.py | 256 +++ .../.openapi-generator/FILES | 26 +- thousandeyes-sdk-internet-insights/README.md | 21 +- .../docs/CatalogProvidersApi.md | 16 +- .../docs/OutagesAPIPublicApi.md | 206 +- .../docs/ValidationErrorItem.md | 2 +- .../pyproject.toml | 7 +- .../internet_insights/__init__.py | 4 +- .../api/catalog_providers_api.py | 20 +- .../api/outages_api_public_api.py | 633 ++--- .../internet_insights/models/__init__.py | 2 +- .../models/api_affected_agent.py | 5 +- .../models/api_affected_test.py | 5 +- ...pi_application_outage_affected_location.py | 5 +- .../api_application_outage_affected_server.py | 5 +- .../models/api_application_outage_details.py | 5 +- .../internet_insights/models/api_asn.py | 5 +- .../models/api_catalog_provider.py | 5 +- .../models/api_catalog_provider_details.py | 5 +- .../models/api_catalog_provider_filter.py | 5 +- .../models/api_catalog_provider_response.py | 5 +- .../api_network_outage_affected_location.py | 5 +- .../models/api_network_outage_details.py | 5 +- .../internet_insights/models/api_outage.py | 5 +- .../models/api_outage_filter.py | 5 +- .../models/api_outages_response.py | 5 +- .../internet_insights/models/error.py | 5 +- .../internet_insights/models/link.py | 5 +- .../internet_insights/models/outage_scope.py | 2 +- .../models/provider_location.py | 5 +- .../internet_insights/models/self_links.py | 5 +- .../models/unauthorized_error.py | 5 +- .../models/validation_error.py | 5 +- .../models/validation_error_item.py | 9 +- .../test/test_catalog_providers_api.py | 159 ++ .../test/test_outages_api_public_api.py | 249 ++ .../test/test_utils.py | 16 + .../.openapi-generator/FILES | 17 +- thousandeyes-sdk-labels/README.md | 9 +- thousandeyes-sdk-labels/docs/AgentApi.md | 10 +- thousandeyes-sdk-labels/docs/AllLabelsApi.md | 2 +- thousandeyes-sdk-labels/docs/DashboardApi.md | 10 +- .../docs/EndpointTestApi.md | 22 +- thousandeyes-sdk-labels/docs/TestApi.md | 10 +- .../docs/ValidationErrorItem.md | 2 +- thousandeyes-sdk-labels/pyproject.toml | 7 +- .../src/thousandeyes_sdk/labels/__init__.py | 4 +- .../thousandeyes_sdk/labels/api/agent_api.py | 9 +- .../labels/api/all_labels_api.py | 5 +- .../labels/api/dashboard_api.py | 9 +- .../labels/api/endpoint_test_api.py | 23 +- .../thousandeyes_sdk/labels/api/test_api.py | 9 +- .../labels/models/__init__.py | 2 +- .../thousandeyes_sdk/labels/models/error.py | 5 +- .../thousandeyes_sdk/labels/models/label.py | 5 +- .../labels/models/label_detail.py | 5 +- .../labels/models/label_request.py | 5 +- .../labels/models/label_type.py | 2 +- .../thousandeyes_sdk/labels/models/labels.py | 5 +- .../thousandeyes_sdk/labels/models/link.py | 5 +- .../labels/models/self_links.py | 5 +- .../labels/models/unauthorized_error.py | 5 +- .../labels/models/validation_error.py | 5 +- .../labels/models/validation_error_item.py | 9 +- .../test/test_agent_api.py | 174 ++ .../test/test_all_labels_api.py | 68 + .../test/test_dashboard_api.py | 174 ++ .../test/test_endpoint_test_api.py | 174 ++ thousandeyes-sdk-labels/test/test_test_api.py | 174 ++ thousandeyes-sdk-labels/test/test_utils.py | 16 + .../.openapi-generator/FILES | 18 +- thousandeyes-sdk-snapshots/README.md | 7 +- .../docs/CreateTestSnapshotApi.md | 2 +- .../docs/ValidationErrorItem.md | 2 +- thousandeyes-sdk-snapshots/pyproject.toml | 7 +- .../thousandeyes_sdk/snapshots/__init__.py | 4 +- .../snapshots/api/create_test_snapshot_api.py | 5 +- .../snapshots/models/__init__.py | 2 +- .../snapshots/models/app_and_self_links.py | 5 +- .../snapshots/models/error.py | 5 +- .../thousandeyes_sdk/snapshots/models/link.py | 5 +- .../snapshots/models/snapshot_links.py | 5 +- .../snapshots/models/snapshot_request.py | 5 +- .../snapshots/models/snapshot_response.py | 5 +- .../snapshots/models/snapshot_test.py | 5 +- .../snapshots/models/test_interval.py | 2 +- .../snapshots/models/test_links.py | 5 +- .../snapshots/models/test_self_link.py | 5 +- .../snapshots/models/test_type.py | 3 +- .../snapshots/models/unauthorized_error.py | 5 +- .../models/unexpanded_instant_test.py | 5 +- .../snapshots/models/unexpanded_test.py | 5 +- .../snapshots/models/validation_error.py | 5 +- .../snapshots/models/validation_error_item.py | 9 +- .../test/test_create_test_snapshot_api.py | 120 + thousandeyes-sdk-snapshots/test/test_utils.py | 16 + .../.openapi-generator/FILES | 23 +- thousandeyes-sdk-streaming/README.md | 11 +- .../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 | 22 +- thousandeyes-sdk-streaming/docs/TestMatch.md | 30 + .../docs/TestMatchDomain.md | 12 + thousandeyes-sdk-streaming/pyproject.toml | 7 +- .../thousandeyes_sdk/streaming/__init__.py | 6 +- .../streaming/api/streaming_api.py | 23 +- .../streaming/models/__init__.py | 4 +- .../streaming/models/api_error.py | 5 +- .../models/api_error_integration_limits.py | 5 +- .../streaming/models/audit_operation.py | 5 +- .../models/audit_operation_with_update.py | 5 +- .../streaming/models/bad_request_error.py | 5 +- .../models/create_stream_response.py | 17 +- .../streaming/models/endpoint_type.py | 2 +- .../streaming/models/get_stream_response.py | 17 +- .../streaming/models/put_stream.py | 17 +- .../streaming/models/stream.py | 17 +- .../streaming/models/stream_links.py | 5 +- .../streaming/models/stream_response.py | 5 +- .../streaming/models/stream_self_link.py | 5 +- .../streaming/models/stream_type.py | 2 +- .../streaming/models/tag_match.py | 5 +- .../streaming/models/tag_match_object_type.py | 2 +- .../streaming/models/test_match.py | 91 + .../streaming/models/test_match_domain.py | 37 + .../streaming/models/unauthorized_error.py | 5 +- .../test/test_streaming_api.py | 323 +++ thousandeyes-sdk-streaming/test/test_utils.py | 16 + .../.openapi-generator/FILES | 23 +- thousandeyes-sdk-tags/README.md | 17 +- .../docs/TagAssignmentApi.md | 195 +- thousandeyes-sdk-tags/docs/TagsApi.md | 50 +- .../docs/ValidationErrorItem.md | 2 +- thousandeyes-sdk-tags/pyproject.toml | 7 +- .../src/thousandeyes_sdk/tags/__init__.py | 4 +- .../tags/api/tag_assignment_api.py | 655 +++--- .../src/thousandeyes_sdk/tags/api/tags_api.py | 74 +- .../thousandeyes_sdk/tags/models/__init__.py | 2 +- .../tags/models/access_type.py | 2 +- .../thousandeyes_sdk/tags/models/api_error.py | 5 +- .../tags/models/assignment.py | 5 +- .../tags/models/assignment_type.py | 2 +- .../tags/models/bulk_tag_assignment.py | 5 +- .../tags/models/bulk_tag_assignments.py | 5 +- .../tags/models/bulk_tag_response.py | 5 +- .../src/thousandeyes_sdk/tags/models/error.py | 5 +- .../thousandeyes_sdk/tags/models/expand.py | 2 +- .../src/thousandeyes_sdk/tags/models/link.py | 5 +- .../tags/models/object_type.py | 2 +- .../tags/models/self_links.py | 5 +- .../src/thousandeyes_sdk/tags/models/tag.py | 5 +- .../tags/models/tag_assignment.py | 5 +- .../tags/models/tag_bulk_create_error.py | 5 +- .../thousandeyes_sdk/tags/models/tag_info.py | 5 +- .../src/thousandeyes_sdk/tags/models/tags.py | 5 +- .../tags/models/unauthorized_error.py | 5 +- .../tags/models/validation_error.py | 5 +- .../tags/models/validation_error_item.py | 9 +- .../test/test_tag_assignment_api.py | 130 ++ thousandeyes-sdk-tags/test/test_tags_api.py | 223 ++ thousandeyes-sdk-tags/test/test_utils.py | 16 + .../.openapi-generator/FILES | 85 +- thousandeyes-sdk-test-results/README.md | 61 +- .../docs/APITestMetricsApi.md | 200 +- .../docs/ApiDetailTestResult.md | 2 + .../docs/ApiTestResult.md | 2 + thousandeyes-sdk-test-results/docs/BgpHop.md | 2 +- .../docs/DNSSECTestMetricsApi.md | 14 +- .../docs/DNSServerTestMetricsApi.md | 28 +- .../docs/DNSTraceTestMetricsApi.md | 14 +- .../docs/FtpServerTestResult.md | 4 +- .../docs/NetworkBGPTestMetricsApi.md | 28 +- .../docs/NetworkTestMetricsApi.md | 220 +- .../docs/ValidationErrorItem.md | 2 +- .../docs/VoiceRTPServerTestMetricsApi.md | 14 +- .../docs/VoiceSIPServerTestMetricsApi.md | 14 +- .../docs/WebFTPServerTestMetricsApi.md | 14 +- .../docs/WebHTTPServerTestMetricsApi.md | 14 +- .../docs/WebPageLoadTestMetricsApi.md | 200 +- .../docs/WebTransactionsTestMetricsApi.md | 390 ++-- thousandeyes-sdk-test-results/pyproject.toml | 7 +- .../thousandeyes_sdk/test_results/__init__.py | 4 +- .../test_results/api/api_test_metrics_api.py | 678 +++--- .../api/dns_server_test_metrics_api.py | 34 +- .../api/dns_trace_test_metrics_api.py | 19 +- .../api/dnssec_test_metrics_api.py | 19 +- .../api/network_bgp_test_metrics_api.py | 34 +- .../api/network_test_metrics_api.py | 727 +++--- .../api/voice_rtp_server_test_metrics_api.py | 19 +- .../api/voice_sip_server_test_metrics_api.py | 19 +- .../api/web_ftp_server_test_metrics_api.py | 19 +- .../api/web_http_server_test_metrics_api.py | 19 +- .../api/web_page_load_test_metrics_api.py | 678 +++--- .../api/web_transactions_test_metrics_api.py | 1367 +++++------ .../test_results/models/__init__.py | 2 +- .../test_results/models/agent.py | 5 +- .../models/api_detail_test_result.py | 15 +- .../models/api_detail_test_results.py | 5 +- .../test_results/models/api_request_detail.py | 5 +- .../models/api_request_detail_assertion.py | 5 +- .../test_results/models/api_test_result.py | 15 +- .../test_results/models/api_test_results.py | 5 +- .../test_results/models/app_links.py | 5 +- .../models/bgp_basic_test_result.py | 5 +- .../test_results/models/bgp_hop.py | 11 +- .../test_results/models/bgp_test_result.py | 5 +- .../test_results/models/bgp_test_results.py | 5 +- .../bgp_test_route_information_result.py | 5 +- .../bgp_test_route_information_results.py | 5 +- .../models/dns_server_test_result.py | 5 +- .../models/dns_server_test_results.py | 5 +- .../models/dns_trace_test_result.py | 5 +- .../models/dns_trace_test_results.py | 5 +- .../test_results/models/dnssec_test_result.py | 5 +- .../models/dnssec_test_results.py | 5 +- .../test_results/models/epoch_time_window.py | 5 +- .../test_results/models/error.py | 5 +- .../test_results/models/expand.py | 2 +- .../models/ftp_server_test_result.py | 9 +- .../models/ftp_server_test_results.py | 5 +- .../test_results/models/http_test_result.py | 5 +- .../models/http_test_result_headers.py | 5 +- .../test_results/models/http_test_results.py | 5 +- .../test_results/models/link.py | 5 +- .../test_results/models/marker.py | 5 +- .../test_results/models/monitor.py | 5 +- .../models/network_test_result.py | 5 +- .../models/network_test_results.py | 5 +- .../test_results/models/page.py | 5 +- .../models/page_load_detail_test_result.py | 5 +- .../models/page_load_detail_test_results.py | 5 +- .../models/page_load_test_result.py | 5 +- .../models/page_load_test_results.py | 5 +- .../test_results/models/pagination_links.py | 5 +- .../models/path_vis_base_test_result.py | 5 +- .../models/path_vis_detail_test_result.py | 5 +- .../models/path_vis_detail_test_results.py | 5 +- .../test_results/models/path_vis_direction.py | 2 +- .../test_results/models/path_vis_endpoint.py | 5 +- .../test_results/models/path_vis_hop.py | 5 +- .../test_results/models/path_vis_route.py | 5 +- .../models/path_vis_test_result.py | 5 +- .../models/path_vis_test_results.py | 5 +- .../models/rtp_stream_test_result.py | 5 +- .../models/rtp_stream_test_results.py | 5 +- .../test_results/models/self_links.py | 5 +- .../test_results/models/simple_test.py | 5 +- .../models/sip_server_error_type.py | 2 +- .../models/sip_server_test_result.py | 5 +- .../models/sip_server_test_results.py | 5 +- .../test_results/models/ssl_cert.py | 5 +- .../test_results/models/test_direction.py | 2 +- .../test_results/models/test_interval.py | 2 +- .../test_results/models/test_links.py | 5 +- .../test_results/models/test_result.py | 5 +- .../models/test_result_app_links.py | 5 +- .../test_results/models/test_self_link.py | 5 +- .../test_results/models/test_type.py | 3 +- .../test_results/models/unauthorized_error.py | 5 +- .../test_results/models/validation_error.py | 5 +- .../models/validation_error_item.py | 9 +- .../web_transaction_detail_test_result.py | 5 +- .../web_transaction_detail_test_results.py | 5 +- ...web_transaction_page_detail_test_result.py | 5 +- ...eb_transaction_page_detail_test_results.py | 5 +- .../models/web_transaction_test_result.py | 5 +- .../models/web_transaction_test_results.py | 5 +- .../test/test_api_test_metrics_api.py | 390 ++++ .../test/test_dns_server_test_metrics_api.py | 302 +++ .../test/test_dns_trace_test_metrics_api.py | 172 ++ .../test/test_dnssec_test_metrics_api.py | 162 ++ .../test/test_network_bgp_test_metrics_api.py | 282 +++ .../test/test_network_test_metrics_api.py | 548 +++++ .../test/test_utils.py | 16 + .../test_voice_rtp_server_test_metrics_api.py | 180 ++ .../test_voice_sip_server_test_metrics_api.py | 190 ++ .../test_web_ftp_server_test_metrics_api.py | 184 ++ .../test_web_http_server_test_metrics_api.py | 238 ++ .../test_web_page_load_test_metrics_api.py | 736 ++++++ .../test_web_transactions_test_metrics_api.py | 938 ++++++++ .../.openapi-generator/FILES | 163 +- thousandeyes-sdk-tests/README.md | 7 +- thousandeyes-sdk-tests/docs/APIApi.md | 10 +- .../docs/AgentToAgentApi.md | 10 +- .../docs/AgentToServerApi.md | 10 +- .../docs/AllTestTypesApi.md | 2 +- thousandeyes-sdk-tests/docs/ApiInstantTest.md | 2 +- thousandeyes-sdk-tests/docs/ApiProperties.md | 2 +- thousandeyes-sdk-tests/docs/ApiRequest.md | 4 +- thousandeyes-sdk-tests/docs/ApiTest.md | 2 +- thousandeyes-sdk-tests/docs/BGPApi.md | 10 +- thousandeyes-sdk-tests/docs/DNSSECApi.md | 10 +- thousandeyes-sdk-tests/docs/DNSServerApi.md | 10 +- thousandeyes-sdk-tests/docs/DNSTraceApi.md | 10 +- thousandeyes-sdk-tests/docs/FTPServerApi.md | 10 +- thousandeyes-sdk-tests/docs/HTTPServerApi.md | 10 +- thousandeyes-sdk-tests/docs/PageLoadApi.md | 10 +- .../docs/PageLoadInstantTest.md | 2 +- .../docs/PageLoadProperties.md | 2 +- thousandeyes-sdk-tests/docs/PageLoadTest.md | 2 +- .../PathVisualizationInterfaceGroupsApi.md | 8 +- thousandeyes-sdk-tests/docs/SIPServerApi.md | 10 +- .../docs/UnexpandedApiTest.md | 2 +- .../docs/UnexpandedPageLoadTest.md | 2 +- .../docs/UnexpandedWebTransactionTest.md | 2 +- thousandeyes-sdk-tests/docs/UpdateApiTest.md | 2 +- .../docs/UpdatePageLoadTest.md | 2 +- .../docs/UpdateWebTransactionTest.md | 2 +- .../docs/ValidationErrorItem.md | 2 +- thousandeyes-sdk-tests/docs/VoiceApi.md | 10 +- .../docs/WebTransactionApi.md | 10 +- .../docs/WebTransactionInstantTest.md | 2 +- .../docs/WebTransactionProperties.md | 2 +- .../docs/WebTransactionTest.md | 2 +- thousandeyes-sdk-tests/pyproject.toml | 7 +- .../src/thousandeyes_sdk/tests/__init__.py | 4 +- .../tests/api/agent_to_agent_api.py | 9 +- .../tests/api/agent_to_server_api.py | 9 +- .../tests/api/all_test_types_api.py | 5 +- .../src/thousandeyes_sdk/tests/api/api_api.py | 9 +- .../src/thousandeyes_sdk/tests/api/bgp_api.py | 9 +- .../tests/api/dns_server_api.py | 9 +- .../tests/api/dns_trace_api.py | 9 +- .../thousandeyes_sdk/tests/api/dnssec_api.py | 9 +- .../tests/api/ftp_server_api.py | 9 +- .../tests/api/http_server_api.py | 9 +- .../tests/api/page_load_api.py | 9 +- ...path_visualization_interface_groups_api.py | 8 +- .../tests/api/sip_server_api.py | 9 +- .../thousandeyes_sdk/tests/api/voice_api.py | 9 +- .../tests/api/web_transaction_api.py | 9 +- .../thousandeyes_sdk/tests/models/__init__.py | 2 +- .../thousandeyes_sdk/tests/models/agent.py | 5 +- .../tests/models/agent_base.py | 5 +- .../tests/models/agent_request.py | 5 +- .../models/agent_to_agent_instant_test.py | 5 +- .../tests/models/agent_to_agent_properties.py | 5 +- .../tests/models/agent_to_agent_test.py | 5 +- .../models/agent_to_agent_test_protocol.py | 2 +- .../tests/models/agent_to_agent_tests.py | 5 +- .../models/agent_to_server_instant_test.py | 5 +- .../models/agent_to_server_properties.py | 5 +- .../tests/models/agent_to_server_test.py | 5 +- .../tests/models/agent_to_server_tests.py | 5 +- .../tests/models/alert_direction.py | 2 +- .../models/alert_rounds_violation_mode.py | 2 +- .../tests/models/alert_rule.py | 5 +- .../tests/models/alert_type.py | 2 +- .../tests/models/api_instant_test.py | 7 +- .../tests/models/api_predefined_variable.py | 5 +- .../tests/models/api_properties.py | 7 +- .../tests/models/api_request.py | 15 +- .../tests/models/api_request_assertion.py | 5 +- .../models/api_request_assertion_name.py | 2 +- .../models/api_request_assertion_operator.py | 2 +- .../tests/models/api_request_auth_type.py | 2 +- .../tests/models/api_request_header.py | 5 +- .../tests/models/api_request_method.py | 2 +- .../tests/models/api_request_variable.py | 5 +- .../thousandeyes_sdk/tests/models/api_test.py | 7 +- .../tests/models/api_tests.py | 5 +- .../tests/models/base_bgp_test.py | 5 +- .../tests/models/base_request.py | 5 +- .../tests/models/base_test.py | 5 +- .../thousandeyes_sdk/tests/models/bgp_test.py | 5 +- .../tests/models/bgp_tests.py | 5 +- .../models/cloud_enterprise_agent_type.py | 2 +- .../tests/models/dns_query_class.py | 2 +- .../tests/models/dns_sec_instant_test.py | 5 +- .../tests/models/dns_sec_properties.py | 5 +- .../tests/models/dns_sec_test.py | 5 +- .../tests/models/dns_sec_tests.py | 5 +- .../tests/models/dns_server_instant_test.py | 5 +- .../tests/models/dns_server_properties.py | 5 +- .../tests/models/dns_server_test.py | 5 +- .../tests/models/dns_server_tests.py | 5 +- .../tests/models/dns_servers_request.py | 5 +- .../tests/models/dns_trace_instant_test.py | 5 +- .../tests/models/dns_trace_properties.py | 5 +- .../tests/models/dns_trace_test.py | 5 +- .../tests/models/dns_trace_tests.py | 5 +- .../thousandeyes_sdk/tests/models/error.py | 5 +- .../thousandeyes_sdk/tests/models/expand.py | 2 +- .../tests/models/ftp_server_instant_test.py | 5 +- .../tests/models/ftp_server_properties.py | 5 +- .../tests/models/ftp_server_request_type.py | 2 +- .../tests/models/ftp_server_test.py | 5 +- .../tests/models/ftp_server_tests.py | 5 +- .../tests/models/http_server_instant_test.py | 5 +- .../tests/models/http_server_properties.py | 5 +- .../tests/models/http_server_test.py | 5 +- .../tests/models/http_server_tests.py | 5 +- .../tests/models/instant_test.py | 5 +- .../tests/models/interface_group.py | 5 +- .../tests/models/interface_groups.py | 5 +- .../src/thousandeyes_sdk/tests/models/link.py | 5 +- .../thousandeyes_sdk/tests/models/monitor.py | 5 +- .../tests/models/monitor_type.py | 2 +- .../tests/models/monitors_request.py | 5 +- .../tests/models/page_load_instant_test.py | 7 +- .../tests/models/page_load_properties.py | 7 +- .../tests/models/page_load_test.py | 7 +- .../tests/models/page_load_tests.py | 5 +- .../tests/models/self_links.py | 5 +- .../thousandeyes_sdk/tests/models/severity.py | 2 +- .../tests/models/shared_with_account.py | 5 +- .../tests/models/simple_agent.py | 5 +- .../tests/models/simple_test.py | 5 +- .../tests/models/sip_server_instant_test.py | 5 +- .../models/sip_server_instant_test_request.py | 5 +- .../sip_server_instant_test_response.py | 5 +- .../tests/models/sip_server_properties.py | 5 +- .../tests/models/sip_server_test.py | 5 +- .../tests/models/sip_server_tests.py | 5 +- .../tests/models/sip_test_protocol.py | 2 +- .../tests/models/test_auth_type.py | 2 +- .../tests/models/test_custom_headers.py | 5 +- .../tests/models/test_direction.py | 2 +- .../tests/models/test_dns_server.py | 5 +- .../models/test_dns_transport_protocol.py | 2 +- .../tests/models/test_dscp_id.py | 2 +- .../tests/models/test_http_interval.py | 2 +- .../tests/models/test_interval.py | 2 +- .../tests/models/test_ipv6_policy.py | 2 +- .../tests/models/test_label.py | 5 +- .../tests/models/test_links.py | 5 +- .../tests/models/test_monitors_properties.py | 5 +- .../models/test_page_loading_strategy.py | 2 +- .../tests/models/test_path_trace_mode.py | 2 +- .../tests/models/test_probe_mode.py | 2 +- .../tests/models/test_protocol.py | 2 +- .../tests/models/test_request.py | 5 +- .../tests/models/test_self_link.py | 5 +- .../tests/models/test_sip_credentials.py | 5 +- .../tests/models/test_ssl_version_id.py | 2 +- .../tests/models/test_sub_interval.py | 2 +- .../tests/models/test_type.py | 3 +- .../thousandeyes_sdk/tests/models/tests.py | 5 +- .../tests/models/unauthorized_error.py | 5 +- .../models/unexpanded_agent_to_agent_test.py | 5 +- .../models/unexpanded_agent_to_server_test.py | 5 +- .../tests/models/unexpanded_api_test.py | 7 +- .../tests/models/unexpanded_bgp_test.py | 5 +- .../tests/models/unexpanded_dns_sec_test.py | 5 +- .../models/unexpanded_dns_server_test.py | 5 +- .../tests/models/unexpanded_dns_trace_test.py | 5 +- .../models/unexpanded_ftp_server_test.py | 5 +- .../models/unexpanded_http_server_test.py | 5 +- .../tests/models/unexpanded_instant_test.py | 5 +- .../tests/models/unexpanded_page_load_test.py | 7 +- .../models/unexpanded_sip_server_test.py | 5 +- .../tests/models/unexpanded_test.py | 5 +- .../tests/models/unexpanded_voice_test.py | 5 +- .../models/unexpanded_web_transaction_test.py | 7 +- .../models/update_agent_to_agent_test.py | 5 +- .../models/update_agent_to_server_test.py | 5 +- .../tests/models/update_api_test.py | 7 +- .../tests/models/update_bgp_test.py | 5 +- .../tests/models/update_bgp_test_request.py | 5 +- .../tests/models/update_dns_sec_test.py | 5 +- .../tests/models/update_dns_server_test.py | 5 +- .../tests/models/update_dns_trace_test.py | 5 +- .../tests/models/update_ftp_server_test.py | 5 +- .../tests/models/update_http_server_test.py | 5 +- .../tests/models/update_page_load_test.py | 7 +- .../tests/models/update_sip_server_test.py | 5 +- .../tests/models/update_sip_server_test1.py | 5 +- .../tests/models/update_voice_test.py | 5 +- .../models/update_web_transaction_test.py | 7 +- .../tests/models/validation_error.py | 5 +- .../tests/models/validation_error_item.py | 9 +- .../tests/models/voice_instant_test.py | 5 +- .../tests/models/voice_properties.py | 5 +- .../tests/models/voice_test.py | 5 +- .../tests/models/voice_tests.py | 5 +- .../models/web_transaction_instant_test.py | 7 +- .../models/web_transaction_properties.py | 7 +- .../tests/models/web_transaction_test.py | 7 +- .../tests/models/web_transaction_tests.py | 5 +- .../test/test_agent_to_agent_api.py | 697 ++++++ .../test/test_agent_to_server_api.py | 711 ++++++ .../test/test_all_test_types_api.py | 120 + thousandeyes-sdk-tests/test/test_api_api.py | 1248 ++++++++++ thousandeyes-sdk-tests/test/test_bgp_api.py | 516 +++++ .../test/test_dns_server_api.py | 734 ++++++ .../test/test_dns_trace_api.py | 566 +++++ .../test/test_dnssec_api.py | 559 +++++ .../test/test_ftp_server_api.py | 732 ++++++ .../test/test_http_server_api.py | 914 ++++++++ .../test/test_page_load_api.py | 956 ++++++++ ...path_visualization_interface_groups_api.py | 130 ++ .../test/test_sip_server_api.py | 757 ++++++ thousandeyes-sdk-tests/test/test_utils.py | 16 + thousandeyes-sdk-tests/test/test_voice_api.py | 697 ++++++ .../test/test_web_transaction_api.py | 961 ++++++++ .../.openapi-generator/FILES | 35 +- thousandeyes-sdk-usage/README.md | 9 +- thousandeyes-sdk-usage/docs/QuotasApi.md | 10 +- thousandeyes-sdk-usage/docs/UsageApi.md | 22 +- .../docs/ValidationErrorItem.md | 2 +- thousandeyes-sdk-usage/pyproject.toml | 7 +- .../src/thousandeyes_sdk/usage/__init__.py | 4 +- .../thousandeyes_sdk/usage/api/quotas_api.py | 9 +- .../thousandeyes_sdk/usage/api/usage_api.py | 33 +- .../thousandeyes_sdk/usage/models/__init__.py | 2 +- .../usage/models/account_group_quota.py | 5 +- .../usage/models/endpoint_agents.py | 5 +- .../usage/models/endpoint_agents_embedded.py | 5 +- .../models/endpoint_agents_essentials.py | 5 +- .../usage/models/enterprise_agent_units.py | 5 +- ...agent_units_by_test_owner_account_group.py | 5 +- .../usage/models/enterprise_agents.py | 5 +- .../usage/models/enterprise_agents_usage.py | 5 +- .../thousandeyes_sdk/usage/models/error.py | 5 +- .../thousandeyes_sdk/usage/models/expand.py | 2 +- .../src/thousandeyes_sdk/usage/models/link.py | 5 +- .../usage/models/organization_quota.py | 5 +- .../models/organization_quota_assignment.py | 5 +- .../models/organization_quota_unassignment.py | 5 +- .../models/organizations_quotas_assign.py | 5 +- .../models/organizations_quotas_unassign.py | 5 +- .../usage/models/pagination_links.py | 5 +- .../thousandeyes_sdk/usage/models/quota.py | 5 +- .../thousandeyes_sdk/usage/models/quotas.py | 5 +- .../usage/models/quotas_assign_request.py | 5 +- .../usage/models/quotas_assign_response.py | 5 +- .../usage/models/quotas_unassign.py | 5 +- .../usage/models/self_links.py | 5 +- .../thousandeyes_sdk/usage/models/tests.py | 5 +- .../usage/models/tests_usage.py | 5 +- .../usage/models/unauthorized_error.py | 5 +- .../usage/models/units_by_tests.py | 5 +- .../thousandeyes_sdk/usage/models/usage.py | 5 +- .../usage/models/usage_details.py | 5 +- .../usage/models/usage_quota.py | 5 +- .../usage/models/validation_error.py | 5 +- .../usage/models/validation_error_item.py | 9 +- .../test/test_quotas_api.py | 199 ++ thousandeyes-sdk-usage/test/test_usage_api.py | 272 +++ thousandeyes-sdk-usage/test/test_utils.py | 16 + 1489 files changed, 65955 insertions(+), 15849 deletions(-) create mode 100644 thousandeyes-sdk-administrative/.openapi-generator-ignore create mode 100644 thousandeyes-sdk-administrative/.openapi-generator/FILES create mode 100644 thousandeyes-sdk-administrative/.openapi-generator/VERSION create mode 100644 thousandeyes-sdk-administrative/README.md create mode 100644 thousandeyes-sdk-administrative/docs/AccountGroup.md create mode 100644 thousandeyes-sdk-administrative/docs/AccountGroupDetail.md create mode 100644 thousandeyes-sdk-administrative/docs/AccountGroupInfo.md create mode 100644 thousandeyes-sdk-administrative/docs/AccountGroupRequest.md create mode 100644 thousandeyes-sdk-administrative/docs/AccountGroupRole.md create mode 100644 thousandeyes-sdk-administrative/docs/AccountGroups.md create mode 100644 thousandeyes-sdk-administrative/docs/AccountGroupsApi.md create mode 100644 thousandeyes-sdk-administrative/docs/Agent.md create mode 100644 thousandeyes-sdk-administrative/docs/AgentBase.md create mode 100644 thousandeyes-sdk-administrative/docs/AuditUserEvents.md create mode 100644 thousandeyes-sdk-administrative/docs/BaseRole.md create mode 100644 thousandeyes-sdk-administrative/docs/CloudEnterpriseAgentType.md create mode 100644 thousandeyes-sdk-administrative/docs/ClusterMember.md create mode 100644 thousandeyes-sdk-administrative/docs/CreatedAccountGroup.md create mode 100644 thousandeyes-sdk-administrative/docs/CreatedUser.md create mode 100644 thousandeyes-sdk-administrative/docs/EnterpriseAgent.md create mode 100644 thousandeyes-sdk-administrative/docs/EnterpriseAgentData.md create mode 100644 thousandeyes-sdk-administrative/docs/EnterpriseAgentIpv6Policy.md create mode 100644 thousandeyes-sdk-administrative/docs/EnterpriseAgentState.md create mode 100644 thousandeyes-sdk-administrative/docs/Error.md create mode 100644 thousandeyes-sdk-administrative/docs/ErrorDetail.md create mode 100644 thousandeyes-sdk-administrative/docs/ErrorDetailCode.md create mode 100644 thousandeyes-sdk-administrative/docs/Expand.md create mode 100644 thousandeyes-sdk-administrative/docs/ExtendedUser.md create mode 100644 thousandeyes-sdk-administrative/docs/InterfaceIpMapping.md create mode 100644 thousandeyes-sdk-administrative/docs/Link.md create mode 100644 thousandeyes-sdk-administrative/docs/PaginationLinks.md create mode 100644 thousandeyes-sdk-administrative/docs/Permission.md create mode 100644 thousandeyes-sdk-administrative/docs/Permissions.md create mode 100644 thousandeyes-sdk-administrative/docs/PermissionsApi.md create mode 100644 thousandeyes-sdk-administrative/docs/Resource.md create mode 100644 thousandeyes-sdk-administrative/docs/Role.md create mode 100644 thousandeyes-sdk-administrative/docs/RoleDetail.md create mode 100644 thousandeyes-sdk-administrative/docs/RoleRequestBody.md create mode 100644 thousandeyes-sdk-administrative/docs/Roles.md create mode 100644 thousandeyes-sdk-administrative/docs/RolesApi.md create mode 100644 thousandeyes-sdk-administrative/docs/SelfLinks.md create mode 100644 thousandeyes-sdk-administrative/docs/SimpleAgent.md create mode 100644 thousandeyes-sdk-administrative/docs/UnauthorizedError.md create mode 100644 thousandeyes-sdk-administrative/docs/User.md create mode 100644 thousandeyes-sdk-administrative/docs/UserAccountGroup.md create mode 100644 thousandeyes-sdk-administrative/docs/UserAccountGroupRole.md create mode 100644 thousandeyes-sdk-administrative/docs/UserDetail.md create mode 100644 thousandeyes-sdk-administrative/docs/UserEvent.md create mode 100644 thousandeyes-sdk-administrative/docs/UserEventsApi.md create mode 100644 thousandeyes-sdk-administrative/docs/UserRequest.md create mode 100644 thousandeyes-sdk-administrative/docs/Users.md create mode 100644 thousandeyes-sdk-administrative/docs/UsersApi.md create mode 100644 thousandeyes-sdk-administrative/docs/ValidationError.md create mode 100644 thousandeyes-sdk-administrative/docs/ValidationErrorItem.md create mode 100644 thousandeyes-sdk-administrative/pyproject.toml create mode 100644 thousandeyes-sdk-administrative/setup.cfg create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/__init__.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/api/__init__.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/api/account_groups_api.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/api/permissions_api.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/api/roles_api.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/api/user_events_api.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/api/users_api.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/__init__.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/account_group.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/account_group_detail.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/account_group_info.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/account_group_request.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/account_group_role.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/account_groups.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/agent.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/agent_base.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/audit_user_events.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/base_role.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/cloud_enterprise_agent_type.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/cluster_member.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/created_account_group.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/created_user.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/enterprise_agent.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/enterprise_agent_data.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/enterprise_agent_ipv6_policy.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/enterprise_agent_state.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/error.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/error_detail.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/error_detail_code.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/expand.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/extended_user.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/interface_ip_mapping.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/link.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/pagination_links.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/permission.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/permissions.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/resource.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/role.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/role_detail.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/role_request_body.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/roles.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/self_links.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/simple_agent.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/unauthorized_error.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/user.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/user_account_group.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/user_account_group_role.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/user_detail.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/user_event.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/user_request.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/users.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/validation_error.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/validation_error_item.py create mode 100644 thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/py.typed create mode 100644 thousandeyes-sdk-administrative/test/__init__.py create mode 100644 thousandeyes-sdk-administrative/test/test_account_groups_api.py create mode 100644 thousandeyes-sdk-administrative/test/test_permissions_api.py create mode 100644 thousandeyes-sdk-administrative/test/test_roles_api.py create mode 100644 thousandeyes-sdk-administrative/test/test_user_events_api.py create mode 100644 thousandeyes-sdk-administrative/test/test_users_api.py create mode 100644 thousandeyes-sdk-administrative/test/test_utils.py create mode 100644 thousandeyes-sdk-agents/test/test_cloud_and_enterprise_agent_notification_rules_api.py create mode 100644 thousandeyes-sdk-agents/test/test_cloud_and_enterprise_agents_api.py create mode 100644 thousandeyes-sdk-agents/test/test_enterprise_agent_cluster_api.py create mode 100644 thousandeyes-sdk-agents/test/test_proxies_api.py create mode 100644 thousandeyes-sdk-agents/test/test_utils.py create mode 100644 thousandeyes-sdk-alerts/test/test_alert_rules_api.py create mode 100644 thousandeyes-sdk-alerts/test/test_alert_suppression_windows_api.py create mode 100644 thousandeyes-sdk-alerts/test/test_alerts_api.py create mode 100644 thousandeyes-sdk-alerts/test/test_utils.py create mode 100644 thousandeyes-sdk-bgp-monitors/.openapi-generator-ignore create mode 100644 thousandeyes-sdk-bgp-monitors/.openapi-generator/FILES create mode 100644 thousandeyes-sdk-bgp-monitors/.openapi-generator/VERSION create mode 100644 thousandeyes-sdk-bgp-monitors/README.md create mode 100644 thousandeyes-sdk-bgp-monitors/docs/Error.md create mode 100644 thousandeyes-sdk-bgp-monitors/docs/Link.md create mode 100644 thousandeyes-sdk-bgp-monitors/docs/ListBGPMonitorsApi.md create mode 100644 thousandeyes-sdk-bgp-monitors/docs/Monitor.md create mode 100644 thousandeyes-sdk-bgp-monitors/docs/MonitorType.md create mode 100644 thousandeyes-sdk-bgp-monitors/docs/Monitors.md create mode 100644 thousandeyes-sdk-bgp-monitors/docs/SelfLinks.md create mode 100644 thousandeyes-sdk-bgp-monitors/docs/UnauthorizedError.md create mode 100644 thousandeyes-sdk-bgp-monitors/pyproject.toml create mode 100644 thousandeyes-sdk-bgp-monitors/setup.cfg create mode 100644 thousandeyes-sdk-bgp-monitors/src/thousandeyes_sdk/bgp_monitors/__init__.py create mode 100644 thousandeyes-sdk-bgp-monitors/src/thousandeyes_sdk/bgp_monitors/api/__init__.py create mode 100644 thousandeyes-sdk-bgp-monitors/src/thousandeyes_sdk/bgp_monitors/api/list_bgp_monitors_api.py create mode 100644 thousandeyes-sdk-bgp-monitors/src/thousandeyes_sdk/bgp_monitors/models/__init__.py create mode 100644 thousandeyes-sdk-bgp-monitors/src/thousandeyes_sdk/bgp_monitors/models/error.py create mode 100644 thousandeyes-sdk-bgp-monitors/src/thousandeyes_sdk/bgp_monitors/models/link.py create mode 100644 thousandeyes-sdk-bgp-monitors/src/thousandeyes_sdk/bgp_monitors/models/monitor.py create mode 100644 thousandeyes-sdk-bgp-monitors/src/thousandeyes_sdk/bgp_monitors/models/monitor_type.py create mode 100644 thousandeyes-sdk-bgp-monitors/src/thousandeyes_sdk/bgp_monitors/models/monitors.py create mode 100644 thousandeyes-sdk-bgp-monitors/src/thousandeyes_sdk/bgp_monitors/models/self_links.py create mode 100644 thousandeyes-sdk-bgp-monitors/src/thousandeyes_sdk/bgp_monitors/models/unauthorized_error.py create mode 100644 thousandeyes-sdk-bgp-monitors/src/thousandeyes_sdk/bgp_monitors/py.typed create mode 100644 thousandeyes-sdk-bgp-monitors/test/__init__.py create mode 100644 thousandeyes-sdk-bgp-monitors/test/test_list_bgp_monitors_api.py create mode 100644 thousandeyes-sdk-bgp-monitors/test/test_utils.py create mode 100644 thousandeyes-sdk-credentials/test/test_credentials_api.py create mode 100644 thousandeyes-sdk-credentials/test/test_utils.py create mode 100644 thousandeyes-sdk-dashboards/test/test_dashboard_snapshots_api.py create mode 100644 thousandeyes-sdk-dashboards/test/test_dashboards_api.py create mode 100644 thousandeyes-sdk-dashboards/test/test_dashboards_filters_api.py create mode 100644 thousandeyes-sdk-dashboards/test/test_utils.py create mode 100644 thousandeyes-sdk-endpoint-agents/test/test_administrative_endpoints_api.py create mode 100644 thousandeyes-sdk-endpoint-agents/test/test_manage_agents_api.py create mode 100644 thousandeyes-sdk-endpoint-agents/test/test_transfer_api.py create mode 100644 thousandeyes-sdk-endpoint-agents/test/test_utils.py create mode 100644 thousandeyes-sdk-endpoint-instant-tests/test/test_agent_to_server_instant_scheduled_test_api.py create mode 100644 thousandeyes-sdk-endpoint-instant-tests/test/test_http_server_instant_scheduled_test_api.py create mode 100644 thousandeyes-sdk-endpoint-instant-tests/test/test_run_existing_test_api.py create mode 100644 thousandeyes-sdk-endpoint-instant-tests/test/test_utils.py create mode 100644 thousandeyes-sdk-endpoint-labels/test/test_manage_labels_api.py create mode 100644 thousandeyes-sdk-endpoint-labels/test/test_utils.py create mode 100644 thousandeyes-sdk-endpoint-test-results/docs/UdpProbeModeResponse.md create mode 100644 thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/udp_probe_mode_response.py create mode 100644 thousandeyes-sdk-endpoint-test-results/test/test_local_network_tests_results_api.py create mode 100644 thousandeyes-sdk-endpoint-test-results/test/test_network_dynamic_tests_results_api.py create mode 100644 thousandeyes-sdk-endpoint-test-results/test/test_network_scheduled_tests_results_api.py create mode 100644 thousandeyes-sdk-endpoint-test-results/test/test_real_user_tests_results_api.py create mode 100644 thousandeyes-sdk-endpoint-test-results/test/test_utils.py create mode 100644 thousandeyes-sdk-endpoint-test-results/test/test_web_http_server_scheduled_test_results_api.py create mode 100644 thousandeyes-sdk-endpoint-tests/test/test_dynamic_tests_agent_to_server_api.py create mode 100644 thousandeyes-sdk-endpoint-tests/test/test_list_endpoint_scheduled_tests_api.py create mode 100644 thousandeyes-sdk-endpoint-tests/test/test_scheduled_tests_agent_to_server_api.py create mode 100644 thousandeyes-sdk-endpoint-tests/test/test_scheduled_tests_http_server_api.py create mode 100644 thousandeyes-sdk-endpoint-tests/test/test_utils.py create mode 100644 thousandeyes-sdk-instant-tests/test/test_agent_to_agent_api.py create mode 100644 thousandeyes-sdk-instant-tests/test/test_agent_to_server_api.py create mode 100644 thousandeyes-sdk-instant-tests/test/test_api_api.py create mode 100644 thousandeyes-sdk-instant-tests/test/test_dns_security_api.py create mode 100644 thousandeyes-sdk-instant-tests/test/test_dns_server_api.py create mode 100644 thousandeyes-sdk-instant-tests/test/test_dns_trace_api.py create mode 100644 thousandeyes-sdk-instant-tests/test/test_ftp_server_api.py create mode 100644 thousandeyes-sdk-instant-tests/test/test_http_page_load_api.py create mode 100644 thousandeyes-sdk-instant-tests/test/test_http_server_api.py create mode 100644 thousandeyes-sdk-instant-tests/test/test_run_api.py create mode 100644 thousandeyes-sdk-instant-tests/test/test_sip_server_api.py create mode 100644 thousandeyes-sdk-instant-tests/test/test_utils.py create mode 100644 thousandeyes-sdk-instant-tests/test/test_voice_api.py create mode 100644 thousandeyes-sdk-instant-tests/test/test_web_transaction_api.py create mode 100644 thousandeyes-sdk-internet-insights/test/test_catalog_providers_api.py create mode 100644 thousandeyes-sdk-internet-insights/test/test_outages_api_public_api.py create mode 100644 thousandeyes-sdk-internet-insights/test/test_utils.py create mode 100644 thousandeyes-sdk-labels/test/test_agent_api.py create mode 100644 thousandeyes-sdk-labels/test/test_all_labels_api.py create mode 100644 thousandeyes-sdk-labels/test/test_dashboard_api.py create mode 100644 thousandeyes-sdk-labels/test/test_endpoint_test_api.py create mode 100644 thousandeyes-sdk-labels/test/test_test_api.py create mode 100644 thousandeyes-sdk-labels/test/test_utils.py create mode 100644 thousandeyes-sdk-snapshots/test/test_create_test_snapshot_api.py create mode 100644 thousandeyes-sdk-snapshots/test/test_utils.py create mode 100644 thousandeyes-sdk-streaming/docs/TestMatch.md create mode 100644 thousandeyes-sdk-streaming/docs/TestMatchDomain.md create mode 100644 thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/test_match.py create mode 100644 thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/test_match_domain.py create mode 100644 thousandeyes-sdk-streaming/test/test_streaming_api.py create mode 100644 thousandeyes-sdk-streaming/test/test_utils.py create mode 100644 thousandeyes-sdk-tags/test/test_tag_assignment_api.py create mode 100644 thousandeyes-sdk-tags/test/test_tags_api.py create mode 100644 thousandeyes-sdk-tags/test/test_utils.py create mode 100644 thousandeyes-sdk-test-results/test/test_api_test_metrics_api.py create mode 100644 thousandeyes-sdk-test-results/test/test_dns_server_test_metrics_api.py create mode 100644 thousandeyes-sdk-test-results/test/test_dns_trace_test_metrics_api.py create mode 100644 thousandeyes-sdk-test-results/test/test_dnssec_test_metrics_api.py create mode 100644 thousandeyes-sdk-test-results/test/test_network_bgp_test_metrics_api.py create mode 100644 thousandeyes-sdk-test-results/test/test_network_test_metrics_api.py create mode 100644 thousandeyes-sdk-test-results/test/test_utils.py create mode 100644 thousandeyes-sdk-test-results/test/test_voice_rtp_server_test_metrics_api.py create mode 100644 thousandeyes-sdk-test-results/test/test_voice_sip_server_test_metrics_api.py create mode 100644 thousandeyes-sdk-test-results/test/test_web_ftp_server_test_metrics_api.py create mode 100644 thousandeyes-sdk-test-results/test/test_web_http_server_test_metrics_api.py create mode 100644 thousandeyes-sdk-test-results/test/test_web_page_load_test_metrics_api.py create mode 100644 thousandeyes-sdk-test-results/test/test_web_transactions_test_metrics_api.py create mode 100644 thousandeyes-sdk-tests/test/test_agent_to_agent_api.py create mode 100644 thousandeyes-sdk-tests/test/test_agent_to_server_api.py create mode 100644 thousandeyes-sdk-tests/test/test_all_test_types_api.py create mode 100644 thousandeyes-sdk-tests/test/test_api_api.py create mode 100644 thousandeyes-sdk-tests/test/test_bgp_api.py create mode 100644 thousandeyes-sdk-tests/test/test_dns_server_api.py create mode 100644 thousandeyes-sdk-tests/test/test_dns_trace_api.py create mode 100644 thousandeyes-sdk-tests/test/test_dnssec_api.py create mode 100644 thousandeyes-sdk-tests/test/test_ftp_server_api.py create mode 100644 thousandeyes-sdk-tests/test/test_http_server_api.py create mode 100644 thousandeyes-sdk-tests/test/test_page_load_api.py create mode 100644 thousandeyes-sdk-tests/test/test_path_visualization_interface_groups_api.py create mode 100644 thousandeyes-sdk-tests/test/test_sip_server_api.py create mode 100644 thousandeyes-sdk-tests/test/test_utils.py create mode 100644 thousandeyes-sdk-tests/test/test_voice_api.py create mode 100644 thousandeyes-sdk-tests/test/test_web_transaction_api.py create mode 100644 thousandeyes-sdk-usage/test/test_quotas_api.py create mode 100644 thousandeyes-sdk-usage/test/test_usage_api.py create mode 100644 thousandeyes-sdk-usage/test/test_utils.py diff --git a/thousandeyes-sdk-administrative/.openapi-generator-ignore b/thousandeyes-sdk-administrative/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/thousandeyes-sdk-administrative/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/thousandeyes-sdk-administrative/.openapi-generator/FILES b/thousandeyes-sdk-administrative/.openapi-generator/FILES new file mode 100644 index 00000000..d47fcc6c --- /dev/null +++ b/thousandeyes-sdk-administrative/.openapi-generator/FILES @@ -0,0 +1,115 @@ +.openapi-generator-ignore +README.md +docs/AccountGroup.md +docs/AccountGroupDetail.md +docs/AccountGroupInfo.md +docs/AccountGroupRequest.md +docs/AccountGroupRole.md +docs/AccountGroups.md +docs/AccountGroupsApi.md +docs/Agent.md +docs/AgentBase.md +docs/AuditUserEvents.md +docs/BaseRole.md +docs/CloudEnterpriseAgentType.md +docs/ClusterMember.md +docs/CreatedAccountGroup.md +docs/CreatedUser.md +docs/EnterpriseAgent.md +docs/EnterpriseAgentData.md +docs/EnterpriseAgentIpv6Policy.md +docs/EnterpriseAgentState.md +docs/Error.md +docs/ErrorDetail.md +docs/ErrorDetailCode.md +docs/Expand.md +docs/ExtendedUser.md +docs/InterfaceIpMapping.md +docs/Link.md +docs/PaginationLinks.md +docs/Permission.md +docs/Permissions.md +docs/PermissionsApi.md +docs/Resource.md +docs/Role.md +docs/RoleDetail.md +docs/RoleRequestBody.md +docs/Roles.md +docs/RolesApi.md +docs/SelfLinks.md +docs/SimpleAgent.md +docs/UnauthorizedError.md +docs/User.md +docs/UserAccountGroup.md +docs/UserAccountGroupRole.md +docs/UserDetail.md +docs/UserEvent.md +docs/UserEventsApi.md +docs/UserRequest.md +docs/Users.md +docs/UsersApi.md +docs/ValidationError.md +docs/ValidationErrorItem.md +pyproject.toml +setup.cfg +src/thousandeyes_sdk/admin/__init__.py +src/thousandeyes_sdk/admin/api/__init__.py +src/thousandeyes_sdk/admin/api/account_groups_api.py +src/thousandeyes_sdk/admin/api/permissions_api.py +src/thousandeyes_sdk/admin/api/roles_api.py +src/thousandeyes_sdk/admin/api/user_events_api.py +src/thousandeyes_sdk/admin/api/users_api.py +src/thousandeyes_sdk/admin/models/__init__.py +src/thousandeyes_sdk/admin/models/account_group.py +src/thousandeyes_sdk/admin/models/account_group_detail.py +src/thousandeyes_sdk/admin/models/account_group_info.py +src/thousandeyes_sdk/admin/models/account_group_request.py +src/thousandeyes_sdk/admin/models/account_group_role.py +src/thousandeyes_sdk/admin/models/account_groups.py +src/thousandeyes_sdk/admin/models/agent.py +src/thousandeyes_sdk/admin/models/agent_base.py +src/thousandeyes_sdk/admin/models/audit_user_events.py +src/thousandeyes_sdk/admin/models/base_role.py +src/thousandeyes_sdk/admin/models/cloud_enterprise_agent_type.py +src/thousandeyes_sdk/admin/models/cluster_member.py +src/thousandeyes_sdk/admin/models/created_account_group.py +src/thousandeyes_sdk/admin/models/created_user.py +src/thousandeyes_sdk/admin/models/enterprise_agent.py +src/thousandeyes_sdk/admin/models/enterprise_agent_data.py +src/thousandeyes_sdk/admin/models/enterprise_agent_ipv6_policy.py +src/thousandeyes_sdk/admin/models/enterprise_agent_state.py +src/thousandeyes_sdk/admin/models/error.py +src/thousandeyes_sdk/admin/models/error_detail.py +src/thousandeyes_sdk/admin/models/error_detail_code.py +src/thousandeyes_sdk/admin/models/expand.py +src/thousandeyes_sdk/admin/models/extended_user.py +src/thousandeyes_sdk/admin/models/interface_ip_mapping.py +src/thousandeyes_sdk/admin/models/link.py +src/thousandeyes_sdk/admin/models/pagination_links.py +src/thousandeyes_sdk/admin/models/permission.py +src/thousandeyes_sdk/admin/models/permissions.py +src/thousandeyes_sdk/admin/models/resource.py +src/thousandeyes_sdk/admin/models/role.py +src/thousandeyes_sdk/admin/models/role_detail.py +src/thousandeyes_sdk/admin/models/role_request_body.py +src/thousandeyes_sdk/admin/models/roles.py +src/thousandeyes_sdk/admin/models/self_links.py +src/thousandeyes_sdk/admin/models/simple_agent.py +src/thousandeyes_sdk/admin/models/unauthorized_error.py +src/thousandeyes_sdk/admin/models/user.py +src/thousandeyes_sdk/admin/models/user_account_group.py +src/thousandeyes_sdk/admin/models/user_account_group_role.py +src/thousandeyes_sdk/admin/models/user_detail.py +src/thousandeyes_sdk/admin/models/user_event.py +src/thousandeyes_sdk/admin/models/user_request.py +src/thousandeyes_sdk/admin/models/users.py +src/thousandeyes_sdk/admin/models/validation_error.py +src/thousandeyes_sdk/admin/models/validation_error_item.py +src/thousandeyes_sdk/admin/py.typed +test/__init__.py +test/test_account_groups_api.py +test/test_permissions_api.py +test/test_roles_api.py +test/test_user_events_api.py +test/test_users_api.py +test/test_utils.py diff --git a/thousandeyes-sdk-administrative/.openapi-generator/VERSION b/thousandeyes-sdk-administrative/.openapi-generator/VERSION new file mode 100644 index 00000000..93c8ddab --- /dev/null +++ b/thousandeyes-sdk-administrative/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.6.0 diff --git a/thousandeyes-sdk-administrative/README.md b/thousandeyes-sdk-administrative/README.md new file mode 100644 index 00000000..90a69020 --- /dev/null +++ b/thousandeyes-sdk-administrative/README.md @@ -0,0 +1,191 @@ +# thousandeyes-sdk-administrative +## Overview +Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. +This API provides the following endpoints that define the operations to manage your organization: + + * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. + * `/users`: Create, retrieve, update and delete users within an organization. + * `/roles`: Create, retrieve and update roles for the current user. + * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. + * `/audit-user-events`: Retrieve all activity log events. + + For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + +This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: 7.0.6 +- Generator version: 7.6.0 +- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator + +## Requirements. + +Python 3.7+ + +## Installation & Usage +### pip install + +If the python package is hosted on a repository, you can install directly using: + +```sh +pip install -e git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git#egg=thousandeyes-sdk-administrative\&subdirectory=thousandeyes-sdk-administrative +``` +(you may need to run `pip` with root permission: `sudo pip install -e git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git#egg=thousandeyes-sdk-administrative\&subdirectory=thousandeyes-sdk-administrative`) + +Then import the package: +```python +import thousandeyes_sdk.admin +``` + +### Setuptools + +Install via [Setuptools](http://pypi.python.org/pypi/setuptools). + +```sh +python setup.py install --user +``` +(or `sudo python setup.py install` to install the package for all users) + +Then import the package: +```python +import thousandeyes_sdk.admin +``` + +### Tests + +Execute `pytest` to run the tests. + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```python + +import thousandeyes_sdk.client +import thousandeyes_sdk.admin +from thousandeyes_sdk.client.exceptions import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + + +# Enter a context with an instance of the API client +with thousandeyes_sdk.client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.admin.AccountGroupsApi(api_client) + account_group_request = thousandeyes_sdk.admin.AccountGroupRequest() # AccountGroupRequest | + expand = [thousandeyes_sdk.admin.Expand()] # List[Expand] | Optional parameter that specifies whether or not account group related resources should be expanded. By default, no expansion takes place if the query parameter is not passed. For example, to expand the `users` resource, pass the `?expand=user` query. (optional) + + try: + # Create account group + api_response = api_instance.create_account_group(account_group_request, expand=expand) + print("The response of AccountGroupsApi->create_account_group:\n") + pprint(api_response) + except ApiException as e: + print("Exception when calling AccountGroupsApi->create_account_group: %s\n" % e) + +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.thousandeyes.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AccountGroupsApi* | [**create_account_group**](docs/AccountGroupsApi.md#create_account_group) | **POST** /v7/account-groups | Create account group +*AccountGroupsApi* | [**delete_account_group**](docs/AccountGroupsApi.md#delete_account_group) | **DELETE** /v7/account-groups/{id} | Delete account group +*AccountGroupsApi* | [**get_account_group**](docs/AccountGroupsApi.md#get_account_group) | **GET** /v7/account-groups/{id} | Retrieve account group +*AccountGroupsApi* | [**get_account_groups**](docs/AccountGroupsApi.md#get_account_groups) | **GET** /v7/account-groups | List account groups +*AccountGroupsApi* | [**update_account_group**](docs/AccountGroupsApi.md#update_account_group) | **PUT** /v7/account-groups/{id} | Update account group +*PermissionsApi* | [**get_permissions**](docs/PermissionsApi.md#get_permissions) | **GET** /v7/permissions | List assignable permissions +*RolesApi* | [**create_role**](docs/RolesApi.md#create_role) | **POST** /v7/roles | Create role +*RolesApi* | [**delete_role**](docs/RolesApi.md#delete_role) | **DELETE** /v7/roles/{id} | Delete role +*RolesApi* | [**get_role**](docs/RolesApi.md#get_role) | **GET** /v7/roles/{id} | Retrieve role +*RolesApi* | [**get_roles**](docs/RolesApi.md#get_roles) | **GET** /v7/roles | List roles +*RolesApi* | [**update_role**](docs/RolesApi.md#update_role) | **PUT** /v7/roles/{id} | Update role +*UserEventsApi* | [**get_user_events**](docs/UserEventsApi.md#get_user_events) | **GET** /v7/audit-user-events | List activity log events +*UsersApi* | [**create_user**](docs/UsersApi.md#create_user) | **POST** /v7/users | Create user +*UsersApi* | [**delete_user**](docs/UsersApi.md#delete_user) | **DELETE** /v7/users/{id} | Delete user +*UsersApi* | [**get_user**](docs/UsersApi.md#get_user) | **GET** /v7/users/{id} | Retrieve user +*UsersApi* | [**get_users**](docs/UsersApi.md#get_users) | **GET** /v7/users | List users +*UsersApi* | [**update_user**](docs/UsersApi.md#update_user) | **PUT** /v7/users/{id} | Update user + + +## Documentation For Models + + - [AccountGroup](docs/AccountGroup.md) + - [AccountGroupDetail](docs/AccountGroupDetail.md) + - [AccountGroupInfo](docs/AccountGroupInfo.md) + - [AccountGroupRequest](docs/AccountGroupRequest.md) + - [AccountGroupRole](docs/AccountGroupRole.md) + - [AccountGroups](docs/AccountGroups.md) + - [Agent](docs/Agent.md) + - [AgentBase](docs/AgentBase.md) + - [AuditUserEvents](docs/AuditUserEvents.md) + - [BaseRole](docs/BaseRole.md) + - [CloudEnterpriseAgentType](docs/CloudEnterpriseAgentType.md) + - [ClusterMember](docs/ClusterMember.md) + - [CreatedAccountGroup](docs/CreatedAccountGroup.md) + - [CreatedUser](docs/CreatedUser.md) + - [EnterpriseAgent](docs/EnterpriseAgent.md) + - [EnterpriseAgentData](docs/EnterpriseAgentData.md) + - [EnterpriseAgentIpv6Policy](docs/EnterpriseAgentIpv6Policy.md) + - [EnterpriseAgentState](docs/EnterpriseAgentState.md) + - [Error](docs/Error.md) + - [ErrorDetail](docs/ErrorDetail.md) + - [ErrorDetailCode](docs/ErrorDetailCode.md) + - [Expand](docs/Expand.md) + - [ExtendedUser](docs/ExtendedUser.md) + - [InterfaceIpMapping](docs/InterfaceIpMapping.md) + - [Link](docs/Link.md) + - [PaginationLinks](docs/PaginationLinks.md) + - [Permission](docs/Permission.md) + - [Permissions](docs/Permissions.md) + - [Resource](docs/Resource.md) + - [Role](docs/Role.md) + - [RoleDetail](docs/RoleDetail.md) + - [RoleRequestBody](docs/RoleRequestBody.md) + - [Roles](docs/Roles.md) + - [SelfLinks](docs/SelfLinks.md) + - [SimpleAgent](docs/SimpleAgent.md) + - [UnauthorizedError](docs/UnauthorizedError.md) + - [User](docs/User.md) + - [UserAccountGroup](docs/UserAccountGroup.md) + - [UserAccountGroupRole](docs/UserAccountGroupRole.md) + - [UserDetail](docs/UserDetail.md) + - [UserEvent](docs/UserEvent.md) + - [UserRequest](docs/UserRequest.md) + - [Users](docs/Users.md) + - [ValidationError](docs/ValidationError.md) + - [ValidationErrorItem](docs/ValidationErrorItem.md) + + + +## Documentation For Authorization + + +Authentication schemes defined for the API: + +### BearerAuth + +- **Type**: Bearer authentication + + +## Author + + + + diff --git a/thousandeyes-sdk-administrative/docs/AccountGroup.md b/thousandeyes-sdk-administrative/docs/AccountGroup.md new file mode 100644 index 00000000..fbd92583 --- /dev/null +++ b/thousandeyes-sdk-administrative/docs/AccountGroup.md @@ -0,0 +1,30 @@ +# AccountGroup + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**aid** | **str** | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. | [optional] +**account_group_name** | **str** | Account group name | [optional] + +## Example + +```python +from thousandeyes_sdk.admin.models.account_group import AccountGroup + +# TODO update the JSON string below +json = "{}" +# create an instance of AccountGroup from a JSON string +account_group_instance = AccountGroup.from_json(json) +# print the JSON string representation of the object +print(AccountGroup.to_json()) + +# convert the object into a dict +account_group_dict = account_group_instance.to_dict() +# create an instance of AccountGroup from a dict +account_group_from_dict = AccountGroup.from_dict(account_group_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-administrative/docs/AccountGroupDetail.md b/thousandeyes-sdk-administrative/docs/AccountGroupDetail.md new file mode 100644 index 00000000..4a3810c0 --- /dev/null +++ b/thousandeyes-sdk-administrative/docs/AccountGroupDetail.md @@ -0,0 +1,36 @@ +# AccountGroupDetail + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**aid** | **str** | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. | [optional] +**account_group_name** | **str** | Account group name | [optional] +**is_current_account_group** | **bool** | Indicates whether the requested aid is the context of the current account. | [optional] +**is_default_account_group** | **bool** | Indicates whether the aid is the default one for the requesting user. | [optional] +**organization_name** | **str** | (Optional) Indicates whether the aid is the default one for the requesting user. | [optional] +**users** | [**List[UserAccountGroup]**](UserAccountGroup.md) | | [optional] +**links** | [**SelfLinks**](SelfLinks.md) | | [optional] +**agents** | [**List[EnterpriseAgent]**](EnterpriseAgent.md) | | [optional] + +## Example + +```python +from thousandeyes_sdk.admin.models.account_group_detail import AccountGroupDetail + +# TODO update the JSON string below +json = "{}" +# create an instance of AccountGroupDetail from a JSON string +account_group_detail_instance = AccountGroupDetail.from_json(json) +# print the JSON string representation of the object +print(AccountGroupDetail.to_json()) + +# convert the object into a dict +account_group_detail_dict = account_group_detail_instance.to_dict() +# create an instance of AccountGroupDetail from a dict +account_group_detail_from_dict = AccountGroupDetail.from_dict(account_group_detail_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-administrative/docs/AccountGroupInfo.md b/thousandeyes-sdk-administrative/docs/AccountGroupInfo.md new file mode 100644 index 00000000..e69997fc --- /dev/null +++ b/thousandeyes-sdk-administrative/docs/AccountGroupInfo.md @@ -0,0 +1,33 @@ +# AccountGroupInfo + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**aid** | **str** | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. | [optional] +**account_group_name** | **str** | Account group name | [optional] +**is_current_account_group** | **bool** | Indicates whether the requested aid is the context of the current account. | [optional] +**is_default_account_group** | **bool** | Indicates whether the aid is the default one for the requesting user. | [optional] +**organization_name** | **str** | (Optional) Indicates whether the aid is the default one for the requesting user. | [optional] + +## Example + +```python +from thousandeyes_sdk.admin.models.account_group_info import AccountGroupInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of AccountGroupInfo from a JSON string +account_group_info_instance = AccountGroupInfo.from_json(json) +# print the JSON string representation of the object +print(AccountGroupInfo.to_json()) + +# convert the object into a dict +account_group_info_dict = account_group_info_instance.to_dict() +# create an instance of AccountGroupInfo from a dict +account_group_info_from_dict = AccountGroupInfo.from_dict(account_group_info_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-administrative/docs/AccountGroupRequest.md b/thousandeyes-sdk-administrative/docs/AccountGroupRequest.md new file mode 100644 index 00000000..122f12a4 --- /dev/null +++ b/thousandeyes-sdk-administrative/docs/AccountGroupRequest.md @@ -0,0 +1,30 @@ +# AccountGroupRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**account_group_name** | **str** | The name of the account group | +**agents** | **List[str]** | To grant access to enterprise agents, specify the agent list. Note that this is not an additive list - the full list must be specified if changing access to agents. | [optional] + +## Example + +```python +from thousandeyes_sdk.admin.models.account_group_request import AccountGroupRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of AccountGroupRequest from a JSON string +account_group_request_instance = AccountGroupRequest.from_json(json) +# print the JSON string representation of the object +print(AccountGroupRequest.to_json()) + +# convert the object into a dict +account_group_request_dict = account_group_request_instance.to_dict() +# create an instance of AccountGroupRequest from a dict +account_group_request_from_dict = AccountGroupRequest.from_dict(account_group_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-administrative/docs/AccountGroupRole.md b/thousandeyes-sdk-administrative/docs/AccountGroupRole.md new file mode 100644 index 00000000..0d8c87c8 --- /dev/null +++ b/thousandeyes-sdk-administrative/docs/AccountGroupRole.md @@ -0,0 +1,30 @@ +# AccountGroupRole + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**account_group** | [**AccountGroup**](AccountGroup.md) | | [optional] +**roles** | [**List[Role]**](Role.md) | | [optional] + +## Example + +```python +from thousandeyes_sdk.admin.models.account_group_role import AccountGroupRole + +# TODO update the JSON string below +json = "{}" +# create an instance of AccountGroupRole from a JSON string +account_group_role_instance = AccountGroupRole.from_json(json) +# print the JSON string representation of the object +print(AccountGroupRole.to_json()) + +# convert the object into a dict +account_group_role_dict = account_group_role_instance.to_dict() +# create an instance of AccountGroupRole from a dict +account_group_role_from_dict = AccountGroupRole.from_dict(account_group_role_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-administrative/docs/AccountGroups.md b/thousandeyes-sdk-administrative/docs/AccountGroups.md new file mode 100644 index 00000000..8123d820 --- /dev/null +++ b/thousandeyes-sdk-administrative/docs/AccountGroups.md @@ -0,0 +1,30 @@ +# AccountGroups + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**account_groups** | [**List[AccountGroupInfo]**](AccountGroupInfo.md) | | [optional] +**links** | [**SelfLinks**](SelfLinks.md) | | [optional] + +## Example + +```python +from thousandeyes_sdk.admin.models.account_groups import AccountGroups + +# TODO update the JSON string below +json = "{}" +# create an instance of AccountGroups from a JSON string +account_groups_instance = AccountGroups.from_json(json) +# print the JSON string representation of the object +print(AccountGroups.to_json()) + +# convert the object into a dict +account_groups_dict = account_groups_instance.to_dict() +# create an instance of AccountGroups from a dict +account_groups_from_dict = AccountGroups.from_dict(account_groups_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-administrative/docs/AccountGroupsApi.md b/thousandeyes-sdk-administrative/docs/AccountGroupsApi.md new file mode 100644 index 00000000..7027ac5b --- /dev/null +++ b/thousandeyes-sdk-administrative/docs/AccountGroupsApi.md @@ -0,0 +1,443 @@ +# thousandeyes_sdk.admin.AccountGroupsApi + +All URIs are relative to *https://api.thousandeyes.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_account_group**](AccountGroupsApi.md#create_account_group) | **POST** /v7/account-groups | Create account group +[**delete_account_group**](AccountGroupsApi.md#delete_account_group) | **DELETE** /v7/account-groups/{id} | Delete account group +[**get_account_group**](AccountGroupsApi.md#get_account_group) | **GET** /v7/account-groups/{id} | Retrieve account group +[**get_account_groups**](AccountGroupsApi.md#get_account_groups) | **GET** /v7/account-groups | List account groups +[**update_account_group**](AccountGroupsApi.md#update_account_group) | **PUT** /v7/account-groups/{id} | Update account group + + +# **create_account_group** +> CreatedAccountGroup create_account_group(account_group_request, expand=expand) + +Create account group + +Creates a new account group. This operation requires the `Edit all account groups` permission. **Note:** Any user assigned to `All Account Groups` is automatically assigned to the new account group. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.admin +from thousandeyes_sdk.admin.models.account_group_request import AccountGroupRequest +from thousandeyes_sdk.admin.models.created_account_group import CreatedAccountGroup +from thousandeyes_sdk.admin.models.expand import Expand +from thousandeyes_sdk.admin.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.admin.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.admin.AccountGroupsApi(api_client) + account_group_request = thousandeyes_sdk.admin.AccountGroupRequest() # AccountGroupRequest | + expand = [thousandeyes_sdk.admin.Expand()] # List[Expand] | Optional parameter that specifies whether or not account group related resources should be expanded. By default, no expansion takes place if the query parameter is not passed. For example, to expand the `users` resource, pass the `?expand=user` query. (optional) + + try: + # Create account group + api_response = api_instance.create_account_group(account_group_request, expand=expand) + print("The response of AccountGroupsApi->create_account_group:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AccountGroupsApi->create_account_group: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **account_group_request** | [**AccountGroupRequest**](AccountGroupRequest.md)| | + **expand** | [**List[Expand]**](Expand.md)| Optional parameter that specifies whether or not account group related resources should be expanded. By default, no expansion takes place if the query parameter is not passed. For example, to expand the `users` resource, pass the `?expand=user` query. | [optional] + +### Return type + +[**CreatedAccountGroup**](CreatedAccountGroup.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** | Created | * 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) + +# **delete_account_group** +> delete_account_group(id) + +Delete account group + +Deletes an account group using its ID. This operation requires the following permissions: * Assign management permissions * Delete account * Edit all account groups + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.admin +from thousandeyes_sdk.admin.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.admin.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.admin.AccountGroupsApi(api_client) + id = '1234' # str | Identifier for the account group. + + try: + # Delete account group + api_instance.delete_account_group(id) + except Exception as e: + print("Exception when calling AccountGroupsApi->delete_account_group: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| Identifier for the account group. | + +### 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 | - | +**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_account_group** +> AccountGroupDetail get_account_group(id, expand=expand) + +Retrieve account group + +Retrieves detailed information about an account group using its ID. This operation requires the `View all account groups settings` permission. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.admin +from thousandeyes_sdk.admin.models.account_group_detail import AccountGroupDetail +from thousandeyes_sdk.admin.models.expand import Expand +from thousandeyes_sdk.admin.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.admin.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.admin.AccountGroupsApi(api_client) + id = '1234' # str | Identifier for the account group. + expand = [thousandeyes_sdk.admin.Expand()] # List[Expand] | Optional parameter that specifies whether or not account group related resources should be expanded. By default, no expansion takes place if the query parameter is not passed. For example, to expand the `users` resource, pass the `?expand=user` query. (optional) + + try: + # Retrieve account group + api_response = api_instance.get_account_group(id, expand=expand) + print("The response of AccountGroupsApi->get_account_group:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AccountGroupsApi->get_account_group: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| Identifier for the account group. | + **expand** | [**List[Expand]**](Expand.md)| Optional parameter that specifies whether or not account group related resources should be expanded. By default, no expansion takes place if the query parameter is not passed. For example, to expand the `users` resource, pass the `?expand=user` query. | [optional] + +### Return type + +[**AccountGroupDetail**](AccountGroupDetail.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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 | - | +**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_account_groups** +> AccountGroups get_account_groups(aid=aid) + +List account groups + +Retrieves a list of account groups available to the current user. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.admin +from thousandeyes_sdk.admin.models.account_groups import AccountGroups +from thousandeyes_sdk.admin.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.admin.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.admin.AccountGroupsApi(api_client) + 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: + # List account groups + api_response = api_instance.get_account_groups(aid=aid) + print("The response of AccountGroupsApi->get_account_groups:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AccountGroupsApi->get_account_groups: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **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 + +[**AccountGroups**](AccountGroups.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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 | - | +**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) + +# **update_account_group** +> AccountGroupDetail update_account_group(id, account_group_request, expand=expand) + +Update account group + +Updates an account group using its ID. You can modify the account group’s name or the list of agents assigned to the account group. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.admin +from thousandeyes_sdk.admin.models.account_group_detail import AccountGroupDetail +from thousandeyes_sdk.admin.models.account_group_request import AccountGroupRequest +from thousandeyes_sdk.admin.models.expand import Expand +from thousandeyes_sdk.admin.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.admin.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.admin.AccountGroupsApi(api_client) + id = '1234' # str | Identifier for the account group. + account_group_request = thousandeyes_sdk.admin.AccountGroupRequest() # AccountGroupRequest | + expand = [thousandeyes_sdk.admin.Expand()] # List[Expand] | Optional parameter that specifies whether or not account group related resources should be expanded. By default, no expansion takes place if the query parameter is not passed. For example, to expand the `users` resource, pass the `?expand=user` query. (optional) + + try: + # Update account group + api_response = api_instance.update_account_group(id, account_group_request, expand=expand) + print("The response of AccountGroupsApi->update_account_group:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AccountGroupsApi->update_account_group: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| Identifier for the account group. | + **account_group_request** | [**AccountGroupRequest**](AccountGroupRequest.md)| | + **expand** | [**List[Expand]**](Expand.md)| Optional parameter that specifies whether or not account group related resources should be expanded. By default, no expansion takes place if the query parameter is not passed. For example, to expand the `users` resource, pass the `?expand=user` query. | [optional] + +### Return type + +[**AccountGroupDetail**](AccountGroupDetail.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 | - | +**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-administrative/docs/Agent.md b/thousandeyes-sdk-administrative/docs/Agent.md new file mode 100644 index 00000000..35c9485a --- /dev/null +++ b/thousandeyes-sdk-administrative/docs/Agent.md @@ -0,0 +1,39 @@ +# Agent + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] +**enabled** | **bool** | Flag indicating if the agent is enabled. | [optional] +**prefix** | **str** | Prefix containing agents public IP address. | [optional] [readonly] +**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] +**agent_type** | [**CloudEnterpriseAgentType**](CloudEnterpriseAgentType.md) | | + +## Example + +```python +from thousandeyes_sdk.admin.models.agent import Agent + +# TODO update the JSON string below +json = "{}" +# create an instance of Agent from a JSON string +agent_instance = Agent.from_json(json) +# print the JSON string representation of the object +print(Agent.to_json()) + +# convert the object into a dict +agent_dict = agent_instance.to_dict() +# create an instance of Agent from a dict +agent_from_dict = Agent.from_dict(agent_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-administrative/docs/AgentBase.md b/thousandeyes-sdk-administrative/docs/AgentBase.md new file mode 100644 index 00000000..6944f27b --- /dev/null +++ b/thousandeyes-sdk-administrative/docs/AgentBase.md @@ -0,0 +1,31 @@ +# AgentBase + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + +## Example + +```python +from thousandeyes_sdk.admin.models.agent_base import AgentBase + +# TODO update the JSON string below +json = "{}" +# create an instance of AgentBase from a JSON string +agent_base_instance = AgentBase.from_json(json) +# print the JSON string representation of the object +print(AgentBase.to_json()) + +# convert the object into a dict +agent_base_dict = agent_base_instance.to_dict() +# create an instance of AgentBase from a dict +agent_base_from_dict = AgentBase.from_dict(agent_base_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-administrative/docs/AuditUserEvents.md b/thousandeyes-sdk-administrative/docs/AuditUserEvents.md new file mode 100644 index 00000000..da4aaebd --- /dev/null +++ b/thousandeyes-sdk-administrative/docs/AuditUserEvents.md @@ -0,0 +1,32 @@ +# AuditUserEvents + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**audit_events** | [**List[UserEvent]**](UserEvent.md) | | [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** | [**PaginationLinks**](PaginationLinks.md) | | [optional] + +## Example + +```python +from thousandeyes_sdk.admin.models.audit_user_events import AuditUserEvents + +# TODO update the JSON string below +json = "{}" +# create an instance of AuditUserEvents from a JSON string +audit_user_events_instance = AuditUserEvents.from_json(json) +# print the JSON string representation of the object +print(AuditUserEvents.to_json()) + +# convert the object into a dict +audit_user_events_dict = audit_user_events_instance.to_dict() +# create an instance of AuditUserEvents from a dict +audit_user_events_from_dict = AuditUserEvents.from_dict(audit_user_events_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-administrative/docs/BaseRole.md b/thousandeyes-sdk-administrative/docs/BaseRole.md new file mode 100644 index 00000000..478a4aa8 --- /dev/null +++ b/thousandeyes-sdk-administrative/docs/BaseRole.md @@ -0,0 +1,31 @@ +# BaseRole + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name of the role. | [optional] +**role_id** | **str** | Unique ID representing the role. | [optional] +**is_builtin** | **bool** | Flag indicating if the role is built-in (Account Admin, Organization Admin, Regular User). | [optional] + +## Example + +```python +from thousandeyes_sdk.admin.models.base_role import BaseRole + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseRole from a JSON string +base_role_instance = BaseRole.from_json(json) +# print the JSON string representation of the object +print(BaseRole.to_json()) + +# convert the object into a dict +base_role_dict = base_role_instance.to_dict() +# create an instance of BaseRole from a dict +base_role_from_dict = BaseRole.from_dict(base_role_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-administrative/docs/CloudEnterpriseAgentType.md b/thousandeyes-sdk-administrative/docs/CloudEnterpriseAgentType.md new file mode 100644 index 00000000..371c853b --- /dev/null +++ b/thousandeyes-sdk-administrative/docs/CloudEnterpriseAgentType.md @@ -0,0 +1,12 @@ +# CloudEnterpriseAgentType + +Type of the agent. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-administrative/docs/ClusterMember.md b/thousandeyes-sdk-administrative/docs/ClusterMember.md new file mode 100644 index 00000000..1745a015 --- /dev/null +++ b/thousandeyes-sdk-administrative/docs/ClusterMember.md @@ -0,0 +1,38 @@ +# ClusterMember + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] +**member_id** | **str** | Unique ID of the cluster member | [optional] [readonly] +**name** | **str** | Name of the cluster member | [optional] [readonly] +**error_details** | [**List[ErrorDetail]**](ErrorDetail.md) | If an enterprise agent or a cluster member presents at least one error, the errors will be shown as an array of entries in the errorDetails field (Enterprise Agents and Enterprise Cluster members only) | [optional] [readonly] +**last_seen** | **datetime** | UTC last seen date (ISO date-time format). | [optional] [readonly] +**agent_state** | [**EnterpriseAgentState**](EnterpriseAgentState.md) | | [optional] +**target_for_tests** | **str** | Test target IP address. | [optional] +**utilization** | **int** | Shows overall utilization percentage (online Enterprise Agents and Enterprise Clusters only). | [optional] [readonly] + +## Example + +```python +from thousandeyes_sdk.admin.models.cluster_member import ClusterMember + +# TODO update the JSON string below +json = "{}" +# create an instance of ClusterMember from a JSON string +cluster_member_instance = ClusterMember.from_json(json) +# print the JSON string representation of the object +print(ClusterMember.to_json()) + +# convert the object into a dict +cluster_member_dict = cluster_member_instance.to_dict() +# create an instance of ClusterMember from a dict +cluster_member_from_dict = ClusterMember.from_dict(cluster_member_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-administrative/docs/CreatedAccountGroup.md b/thousandeyes-sdk-administrative/docs/CreatedAccountGroup.md new file mode 100644 index 00000000..ce307a3c --- /dev/null +++ b/thousandeyes-sdk-administrative/docs/CreatedAccountGroup.md @@ -0,0 +1,35 @@ +# CreatedAccountGroup + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**aid** | **str** | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. | [optional] +**account_group_name** | **str** | Account group name | [optional] +**is_current_account_group** | **bool** | Indicates whether the requested aid is the context of the current account. | [optional] +**is_default_account_group** | **bool** | Indicates whether the aid is the default one for the requesting user. | [optional] +**organization_name** | **str** | (Optional) Indicates whether the aid is the default one for the requesting user. | [optional] +**users** | [**List[UserAccountGroup]**](UserAccountGroup.md) | | [optional] +**links** | [**SelfLinks**](SelfLinks.md) | | [optional] + +## Example + +```python +from thousandeyes_sdk.admin.models.created_account_group import CreatedAccountGroup + +# TODO update the JSON string below +json = "{}" +# create an instance of CreatedAccountGroup from a JSON string +created_account_group_instance = CreatedAccountGroup.from_json(json) +# print the JSON string representation of the object +print(CreatedAccountGroup.to_json()) + +# convert the object into a dict +created_account_group_dict = created_account_group_instance.to_dict() +# create an instance of CreatedAccountGroup from a dict +created_account_group_from_dict = CreatedAccountGroup.from_dict(created_account_group_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-administrative/docs/CreatedUser.md b/thousandeyes-sdk-administrative/docs/CreatedUser.md new file mode 100644 index 00000000..2c5ede43 --- /dev/null +++ b/thousandeyes-sdk-administrative/docs/CreatedUser.md @@ -0,0 +1,36 @@ +# CreatedUser + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | User's display name. | [optional] +**email** | **str** | User's email address. | [optional] +**uid** | **str** | Unique ID of the user. | [optional] +**date_registered** | **datetime** | UTC date the user registered their account (ISO date-time format). | [optional] +**login_account_group** | [**AccountGroup**](AccountGroup.md) | | [optional] +**account_group_roles** | [**List[AccountGroupRole]**](AccountGroupRole.md) | | [optional] +**all_account_group_roles** | [**List[Role]**](Role.md) | | [optional] +**links** | [**SelfLinks**](SelfLinks.md) | | [optional] + +## Example + +```python +from thousandeyes_sdk.admin.models.created_user import CreatedUser + +# TODO update the JSON string below +json = "{}" +# create an instance of CreatedUser from a JSON string +created_user_instance = CreatedUser.from_json(json) +# print the JSON string representation of the object +print(CreatedUser.to_json()) + +# convert the object into a dict +created_user_dict = created_user_instance.to_dict() +# create an instance of CreatedUser from a dict +created_user_from_dict = CreatedUser.from_dict(created_user_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-administrative/docs/EnterpriseAgent.md b/thousandeyes-sdk-administrative/docs/EnterpriseAgent.md new file mode 100644 index 00000000..8fae02d2 --- /dev/null +++ b/thousandeyes-sdk-administrative/docs/EnterpriseAgent.md @@ -0,0 +1,52 @@ +# EnterpriseAgent + + +## 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] +**enabled** | **bool** | Flag indicating if the agent is enabled. | [optional] +**prefix** | **str** | Prefix containing agents public IP address. | [optional] [readonly] +**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] +**cluster_members** | [**List[ClusterMember]**](ClusterMember.md) | If an enterprise agent is clustered, detailed information about each cluster member will be shown as array entries in the clusterMembers field. This field is not shown for Enterprise Agents in standalone mode, or for Cloud Agents. | [optional] [readonly] +**utilization** | **int** | Shows overall utilization percentage (online Enterprise Agents and Enterprise Clusters only). | [optional] [readonly] +**account_groups** | [**List[AccountGroup]**](AccountGroup.md) | List of account groups. See /accounts-groups to pull a list of account IDs | [optional] +**ipv6_policy** | [**EnterpriseAgentIpv6Policy**](EnterpriseAgentIpv6Policy.md) | | [optional] +**error_details** | [**List[ErrorDetail]**](ErrorDetail.md) | If an enterprise agent or a cluster member presents at least one error, the errors will be shown as an array of entries in the errorDetails field (Enterprise Agents and Enterprise Cluster members only) | [optional] [readonly] +**hostname** | **str** | Fully qualified domain name of the agent (Enterprise Agents only) | [optional] [readonly] +**last_seen** | **datetime** | UTC last seen date (ISO date-time format). | [optional] [readonly] +**agent_state** | [**EnterpriseAgentState**](EnterpriseAgentState.md) | | [optional] +**keep_browser_cache** | **bool** | Flag indicating if the agent retains cache. | [optional] +**created_date** | **datetime** | UTC Agent creation date (ISO date-time format). | [optional] [readonly] +**target_for_tests** | **str** | Test target IP address. | [optional] +**local_resolution_prefixes** | **List[str]** | To perform rDNS lookups for public IP ranges, this field represents the public IP ranges. The range must be in CIDR notation; for example, 10.1.1.0/24. Maximum of 5 prefixes allowed (Enterprise Agents and Enterprise Agent clusters only). | [optional] +**interface_ip_mappings** | [**List[InterfaceIpMapping]**](InterfaceIpMapping.md) | | [optional] [readonly] + +## Example + +```python +from thousandeyes_sdk.admin.models.enterprise_agent import EnterpriseAgent + +# TODO update the JSON string below +json = "{}" +# create an instance of EnterpriseAgent from a JSON string +enterprise_agent_instance = EnterpriseAgent.from_json(json) +# print the JSON string representation of the object +print(EnterpriseAgent.to_json()) + +# convert the object into a dict +enterprise_agent_dict = enterprise_agent_instance.to_dict() +# create an instance of EnterpriseAgent from a dict +enterprise_agent_from_dict = EnterpriseAgent.from_dict(enterprise_agent_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-administrative/docs/EnterpriseAgentData.md b/thousandeyes-sdk-administrative/docs/EnterpriseAgentData.md new file mode 100644 index 00000000..8bae2244 --- /dev/null +++ b/thousandeyes-sdk-administrative/docs/EnterpriseAgentData.md @@ -0,0 +1,41 @@ +# EnterpriseAgentData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cluster_members** | [**List[ClusterMember]**](ClusterMember.md) | If an enterprise agent is clustered, detailed information about each cluster member will be shown as array entries in the clusterMembers field. This field is not shown for Enterprise Agents in standalone mode, or for Cloud Agents. | [optional] [readonly] +**utilization** | **int** | Shows overall utilization percentage (online Enterprise Agents and Enterprise Clusters only). | [optional] [readonly] +**account_groups** | [**List[AccountGroup]**](AccountGroup.md) | List of account groups. See /accounts-groups to pull a list of account IDs | [optional] +**ipv6_policy** | [**EnterpriseAgentIpv6Policy**](EnterpriseAgentIpv6Policy.md) | | [optional] +**error_details** | [**List[ErrorDetail]**](ErrorDetail.md) | If an enterprise agent or a cluster member presents at least one error, the errors will be shown as an array of entries in the errorDetails field (Enterprise Agents and Enterprise Cluster members only) | [optional] [readonly] +**hostname** | **str** | Fully qualified domain name of the agent (Enterprise Agents only) | [optional] [readonly] +**last_seen** | **datetime** | UTC last seen date (ISO date-time format). | [optional] [readonly] +**agent_state** | [**EnterpriseAgentState**](EnterpriseAgentState.md) | | [optional] +**keep_browser_cache** | **bool** | Flag indicating if the agent retains cache. | [optional] +**created_date** | **datetime** | UTC Agent creation date (ISO date-time format). | [optional] [readonly] +**target_for_tests** | **str** | Test target IP address. | [optional] +**local_resolution_prefixes** | **List[str]** | To perform rDNS lookups for public IP ranges, this field represents the public IP ranges. The range must be in CIDR notation; for example, 10.1.1.0/24. Maximum of 5 prefixes allowed (Enterprise Agents and Enterprise Agent clusters only). | [optional] +**interface_ip_mappings** | [**List[InterfaceIpMapping]**](InterfaceIpMapping.md) | | [optional] [readonly] + +## Example + +```python +from thousandeyes_sdk.admin.models.enterprise_agent_data import EnterpriseAgentData + +# TODO update the JSON string below +json = "{}" +# create an instance of EnterpriseAgentData from a JSON string +enterprise_agent_data_instance = EnterpriseAgentData.from_json(json) +# print the JSON string representation of the object +print(EnterpriseAgentData.to_json()) + +# convert the object into a dict +enterprise_agent_data_dict = enterprise_agent_data_instance.to_dict() +# create an instance of EnterpriseAgentData from a dict +enterprise_agent_data_from_dict = EnterpriseAgentData.from_dict(enterprise_agent_data_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-administrative/docs/EnterpriseAgentIpv6Policy.md b/thousandeyes-sdk-administrative/docs/EnterpriseAgentIpv6Policy.md new file mode 100644 index 00000000..63668ac6 --- /dev/null +++ b/thousandeyes-sdk-administrative/docs/EnterpriseAgentIpv6Policy.md @@ -0,0 +1,12 @@ +# EnterpriseAgentIpv6Policy + +IP version policy, (Enterprise Agents and Enterprise Clusters only) + +## 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-administrative/docs/EnterpriseAgentState.md b/thousandeyes-sdk-administrative/docs/EnterpriseAgentState.md new file mode 100644 index 00000000..476c1c54 --- /dev/null +++ b/thousandeyes-sdk-administrative/docs/EnterpriseAgentState.md @@ -0,0 +1,12 @@ +# EnterpriseAgentState + +State of the agent. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-administrative/docs/Error.md b/thousandeyes-sdk-administrative/docs/Error.md new file mode 100644 index 00000000..254ed301 --- /dev/null +++ b/thousandeyes-sdk-administrative/docs/Error.md @@ -0,0 +1,33 @@ +# Error + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\". | [optional] +**title** | **str** | A short, human-readable summary of the problem type. | [optional] +**status** | **int** | The HTTP status code generated by the origin server for this occurrence of the problem. | [optional] +**detail** | **str** | A human-readable explanation specific to this occurrence of the problem. | [optional] +**instance** | **str** | A URI reference that identifies the specific occurrence of the problem. | [optional] + +## Example + +```python +from thousandeyes_sdk.admin.models.error import Error + +# TODO update the JSON string below +json = "{}" +# create an instance of Error from a JSON string +error_instance = Error.from_json(json) +# print the JSON string representation of the object +print(Error.to_json()) + +# convert the object into a dict +error_dict = error_instance.to_dict() +# create an instance of Error from a dict +error_from_dict = Error.from_dict(error_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-administrative/docs/ErrorDetail.md b/thousandeyes-sdk-administrative/docs/ErrorDetail.md new file mode 100644 index 00000000..3d5192d7 --- /dev/null +++ b/thousandeyes-sdk-administrative/docs/ErrorDetail.md @@ -0,0 +1,30 @@ +# ErrorDetail + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | [**ErrorDetailCode**](ErrorDetailCode.md) | | [optional] +**description** | **str** | Description for the agent error. | [optional] [readonly] + +## Example + +```python +from thousandeyes_sdk.admin.models.error_detail import ErrorDetail + +# TODO update the JSON string below +json = "{}" +# create an instance of ErrorDetail from a JSON string +error_detail_instance = ErrorDetail.from_json(json) +# print the JSON string representation of the object +print(ErrorDetail.to_json()) + +# convert the object into a dict +error_detail_dict = error_detail_instance.to_dict() +# create an instance of ErrorDetail from a dict +error_detail_from_dict = ErrorDetail.from_dict(error_detail_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-administrative/docs/ErrorDetailCode.md b/thousandeyes-sdk-administrative/docs/ErrorDetailCode.md new file mode 100644 index 00000000..b9b8b5b7 --- /dev/null +++ b/thousandeyes-sdk-administrative/docs/ErrorDetailCode.md @@ -0,0 +1,12 @@ +# ErrorDetailCode + +Code for the agent error. + +## 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-administrative/docs/Expand.md b/thousandeyes-sdk-administrative/docs/Expand.md new file mode 100644 index 00000000..f6553b30 --- /dev/null +++ b/thousandeyes-sdk-administrative/docs/Expand.md @@ -0,0 +1,11 @@ +# Expand + + +## 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-administrative/docs/ExtendedUser.md b/thousandeyes-sdk-administrative/docs/ExtendedUser.md new file mode 100644 index 00000000..06de589d --- /dev/null +++ b/thousandeyes-sdk-administrative/docs/ExtendedUser.md @@ -0,0 +1,34 @@ +# ExtendedUser + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | User's display name. | [optional] +**email** | **str** | User's email address. | [optional] +**uid** | **str** | Unique ID of the user. | [optional] +**date_registered** | **datetime** | UTC date the user registered their account (ISO date-time format). | [optional] +**login_account_group** | [**AccountGroup**](AccountGroup.md) | | [optional] +**last_login** | **datetime** | UTC last login of the user (ISO date-time format). | [optional] + +## Example + +```python +from thousandeyes_sdk.admin.models.extended_user import ExtendedUser + +# TODO update the JSON string below +json = "{}" +# create an instance of ExtendedUser from a JSON string +extended_user_instance = ExtendedUser.from_json(json) +# print the JSON string representation of the object +print(ExtendedUser.to_json()) + +# convert the object into a dict +extended_user_dict = extended_user_instance.to_dict() +# create an instance of ExtendedUser from a dict +extended_user_from_dict = ExtendedUser.from_dict(extended_user_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-administrative/docs/InterfaceIpMapping.md b/thousandeyes-sdk-administrative/docs/InterfaceIpMapping.md new file mode 100644 index 00000000..339a78cb --- /dev/null +++ b/thousandeyes-sdk-administrative/docs/InterfaceIpMapping.md @@ -0,0 +1,30 @@ +# InterfaceIpMapping + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**interface_name** | **str** | Name of the mapping | [optional] [readonly] +**ip_addresses** | **List[str]** | Array of ipAddress entries | [optional] [readonly] + +## Example + +```python +from thousandeyes_sdk.admin.models.interface_ip_mapping import InterfaceIpMapping + +# TODO update the JSON string below +json = "{}" +# create an instance of InterfaceIpMapping from a JSON string +interface_ip_mapping_instance = InterfaceIpMapping.from_json(json) +# print the JSON string representation of the object +print(InterfaceIpMapping.to_json()) + +# convert the object into a dict +interface_ip_mapping_dict = interface_ip_mapping_instance.to_dict() +# create an instance of InterfaceIpMapping from a dict +interface_ip_mapping_from_dict = InterfaceIpMapping.from_dict(interface_ip_mapping_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-administrative/docs/Link.md b/thousandeyes-sdk-administrative/docs/Link.md new file mode 100644 index 00000000..a29be71f --- /dev/null +++ b/thousandeyes-sdk-administrative/docs/Link.md @@ -0,0 +1,37 @@ +# Link + +A hyperlink from the containing resource to a URI. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **str** | Its value is either a URI [RFC3986] or a URI template [RFC6570]. | +**templated** | **bool** | Should be true when the link object's \"href\" property is a URI template. | [optional] +**type** | **str** | Used as a hint to indicate the media type expected when dereferencing the target resource. | [optional] +**deprecation** | **str** | Its presence indicates that the link is to be deprecated at a future date. Its value is a URL that should provide further information about the deprecation. | [optional] +**name** | **str** | Its value may be used as a secondary key for selecting link objects that share the same relation type. | [optional] +**profile** | **str** | A URI that hints about the profile of the target resource. | [optional] +**title** | **str** | Intended for labelling the link with a human-readable identifier | [optional] +**hreflang** | **str** | Indicates the language of the target resource | [optional] + +## Example + +```python +from thousandeyes_sdk.admin.models.link import Link + +# TODO update the JSON string below +json = "{}" +# create an instance of Link from a JSON string +link_instance = Link.from_json(json) +# print the JSON string representation of the object +print(Link.to_json()) + +# convert the object into a dict +link_dict = link_instance.to_dict() +# create an instance of Link from a dict +link_from_dict = Link.from_dict(link_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-administrative/docs/PaginationLinks.md b/thousandeyes-sdk-administrative/docs/PaginationLinks.md new file mode 100644 index 00000000..6522b115 --- /dev/null +++ b/thousandeyes-sdk-administrative/docs/PaginationLinks.md @@ -0,0 +1,32 @@ +# PaginationLinks + +A links object containing pagination related link(s). + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**previous** | [**Link**](Link.md) | | [optional] +**next** | [**Link**](Link.md) | | [optional] +**var_self** | [**Link**](Link.md) | | [optional] + +## Example + +```python +from thousandeyes_sdk.admin.models.pagination_links import PaginationLinks + +# TODO update the JSON string below +json = "{}" +# create an instance of PaginationLinks from a JSON string +pagination_links_instance = PaginationLinks.from_json(json) +# print the JSON string representation of the object +print(PaginationLinks.to_json()) + +# convert the object into a dict +pagination_links_dict = pagination_links_instance.to_dict() +# create an instance of PaginationLinks from a dict +pagination_links_from_dict = PaginationLinks.from_dict(pagination_links_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-administrative/docs/Permission.md b/thousandeyes-sdk-administrative/docs/Permission.md new file mode 100644 index 00000000..480966aa --- /dev/null +++ b/thousandeyes-sdk-administrative/docs/Permission.md @@ -0,0 +1,32 @@ +# Permission + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**label** | **str** | Label corresponding to the permission. | [optional] +**permission_id** | **str** | Unique ID representing the permission. | [optional] +**is_management_permission** | **bool** | Flag indicating whether the permission is classified as a management permission. | [optional] +**permission** | **str** | Permission name | [optional] + +## Example + +```python +from thousandeyes_sdk.admin.models.permission import Permission + +# TODO update the JSON string below +json = "{}" +# create an instance of Permission from a JSON string +permission_instance = Permission.from_json(json) +# print the JSON string representation of the object +print(Permission.to_json()) + +# convert the object into a dict +permission_dict = permission_instance.to_dict() +# create an instance of Permission from a dict +permission_from_dict = Permission.from_dict(permission_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-administrative/docs/Permissions.md b/thousandeyes-sdk-administrative/docs/Permissions.md new file mode 100644 index 00000000..bb825d47 --- /dev/null +++ b/thousandeyes-sdk-administrative/docs/Permissions.md @@ -0,0 +1,30 @@ +# Permissions + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**permissions** | [**List[Permission]**](Permission.md) | | [optional] +**links** | [**SelfLinks**](SelfLinks.md) | | [optional] + +## Example + +```python +from thousandeyes_sdk.admin.models.permissions import Permissions + +# TODO update the JSON string below +json = "{}" +# create an instance of Permissions from a JSON string +permissions_instance = Permissions.from_json(json) +# print the JSON string representation of the object +print(Permissions.to_json()) + +# convert the object into a dict +permissions_dict = permissions_instance.to_dict() +# create an instance of Permissions from a dict +permissions_from_dict = Permissions.from_dict(permissions_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-administrative/docs/PermissionsApi.md b/thousandeyes-sdk-administrative/docs/PermissionsApi.md new file mode 100644 index 00000000..9429bab3 --- /dev/null +++ b/thousandeyes-sdk-administrative/docs/PermissionsApi.md @@ -0,0 +1,93 @@ +# thousandeyes_sdk.admin.PermissionsApi + +All URIs are relative to *https://api.thousandeyes.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_permissions**](PermissionsApi.md#get_permissions) | **GET** /v7/permissions | List assignable permissions + + +# **get_permissions** +> Permissions get_permissions(aid=aid) + +List assignable permissions + +Users must be in a role assigned management permissions to access this endpoint. Users without management permissions who attempt to access this endpoint receive an HTTP/403 response code. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.admin +from thousandeyes_sdk.admin.models.permissions import Permissions +from thousandeyes_sdk.admin.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.admin.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.admin.PermissionsApi(api_client) + 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: + # List assignable permissions + api_response = api_instance.get_permissions(aid=aid) + print("The response of PermissionsApi->get_permissions:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PermissionsApi->get_permissions: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **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 + +[**Permissions**](Permissions.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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 | - | +**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-administrative/docs/Resource.md b/thousandeyes-sdk-administrative/docs/Resource.md new file mode 100644 index 00000000..ba40d052 --- /dev/null +++ b/thousandeyes-sdk-administrative/docs/Resource.md @@ -0,0 +1,30 @@ +# Resource + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | Type of resource affected. Can be “testName”, “reportTitle”, “userDisplayName”, “alertRuleName”, etc. | [optional] +**name** | **str** | Name of the affected resource. | [optional] + +## Example + +```python +from thousandeyes_sdk.admin.models.resource import Resource + +# TODO update the JSON string below +json = "{}" +# create an instance of Resource from a JSON string +resource_instance = Resource.from_json(json) +# print the JSON string representation of the object +print(Resource.to_json()) + +# convert the object into a dict +resource_dict = resource_instance.to_dict() +# create an instance of Resource from a dict +resource_from_dict = Resource.from_dict(resource_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-administrative/docs/Role.md b/thousandeyes-sdk-administrative/docs/Role.md new file mode 100644 index 00000000..a16f97a7 --- /dev/null +++ b/thousandeyes-sdk-administrative/docs/Role.md @@ -0,0 +1,32 @@ +# Role + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name of the role. | [optional] +**role_id** | **str** | Unique ID representing the role. | [optional] +**is_builtin** | **bool** | Flag indicating if the role is built-in (Account Admin, Organization Admin, Regular User). | [optional] +**has_management_permissions** | **bool** | Flag indicating whether the user has management permissions. | [optional] + +## Example + +```python +from thousandeyes_sdk.admin.models.role import Role + +# TODO update the JSON string below +json = "{}" +# create an instance of Role from a JSON string +role_instance = Role.from_json(json) +# print the JSON string representation of the object +print(Role.to_json()) + +# convert the object into a dict +role_dict = role_instance.to_dict() +# create an instance of Role from a dict +role_from_dict = Role.from_dict(role_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-administrative/docs/RoleDetail.md b/thousandeyes-sdk-administrative/docs/RoleDetail.md new file mode 100644 index 00000000..1fae4456 --- /dev/null +++ b/thousandeyes-sdk-administrative/docs/RoleDetail.md @@ -0,0 +1,33 @@ +# RoleDetail + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name of the role. | [optional] +**role_id** | **str** | Unique ID representing the role. | [optional] +**is_builtin** | **bool** | Flag indicating if the role is built-in (Account Admin, Organization Admin, Regular User). | [optional] +**permissions** | [**List[Permission]**](Permission.md) | | [optional] +**links** | [**SelfLinks**](SelfLinks.md) | | [optional] + +## Example + +```python +from thousandeyes_sdk.admin.models.role_detail import RoleDetail + +# TODO update the JSON string below +json = "{}" +# create an instance of RoleDetail from a JSON string +role_detail_instance = RoleDetail.from_json(json) +# print the JSON string representation of the object +print(RoleDetail.to_json()) + +# convert the object into a dict +role_detail_dict = role_detail_instance.to_dict() +# create an instance of RoleDetail from a dict +role_detail_from_dict = RoleDetail.from_dict(role_detail_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-administrative/docs/RoleRequestBody.md b/thousandeyes-sdk-administrative/docs/RoleRequestBody.md new file mode 100644 index 00000000..5b4c4ddb --- /dev/null +++ b/thousandeyes-sdk-administrative/docs/RoleRequestBody.md @@ -0,0 +1,30 @@ +# RoleRequestBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name of the role. | [optional] +**permissions** | **List[str]** | Contains list of test permission IDs (get `permissionId` from `/permissions` endpoint) | [optional] + +## Example + +```python +from thousandeyes_sdk.admin.models.role_request_body import RoleRequestBody + +# TODO update the JSON string below +json = "{}" +# create an instance of RoleRequestBody from a JSON string +role_request_body_instance = RoleRequestBody.from_json(json) +# print the JSON string representation of the object +print(RoleRequestBody.to_json()) + +# convert the object into a dict +role_request_body_dict = role_request_body_instance.to_dict() +# create an instance of RoleRequestBody from a dict +role_request_body_from_dict = RoleRequestBody.from_dict(role_request_body_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-administrative/docs/Roles.md b/thousandeyes-sdk-administrative/docs/Roles.md new file mode 100644 index 00000000..224f3de8 --- /dev/null +++ b/thousandeyes-sdk-administrative/docs/Roles.md @@ -0,0 +1,30 @@ +# Roles + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**roles** | [**List[Role]**](Role.md) | | [optional] +**links** | [**SelfLinks**](SelfLinks.md) | | [optional] + +## Example + +```python +from thousandeyes_sdk.admin.models.roles import Roles + +# TODO update the JSON string below +json = "{}" +# create an instance of Roles from a JSON string +roles_instance = Roles.from_json(json) +# print the JSON string representation of the object +print(Roles.to_json()) + +# convert the object into a dict +roles_dict = roles_instance.to_dict() +# create an instance of Roles from a dict +roles_from_dict = Roles.from_dict(roles_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-administrative/docs/RolesApi.md b/thousandeyes-sdk-administrative/docs/RolesApi.md new file mode 100644 index 00000000..1fdaac51 --- /dev/null +++ b/thousandeyes-sdk-administrative/docs/RolesApi.md @@ -0,0 +1,442 @@ +# thousandeyes_sdk.admin.RolesApi + +All URIs are relative to *https://api.thousandeyes.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_role**](RolesApi.md#create_role) | **POST** /v7/roles | Create role +[**delete_role**](RolesApi.md#delete_role) | **DELETE** /v7/roles/{id} | Delete role +[**get_role**](RolesApi.md#get_role) | **GET** /v7/roles/{id} | Retrieve role +[**get_roles**](RolesApi.md#get_roles) | **GET** /v7/roles | List roles +[**update_role**](RolesApi.md#update_role) | **PUT** /v7/roles/{id} | Update role + + +# **create_role** +> RoleDetail create_role(role_request_body, aid=aid) + +Create role + +Creates a new role. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.admin +from thousandeyes_sdk.admin.models.role_detail import RoleDetail +from thousandeyes_sdk.admin.models.role_request_body import RoleRequestBody +from thousandeyes_sdk.admin.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.admin.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.admin.RolesApi(api_client) + role_request_body = thousandeyes_sdk.admin.RoleRequestBody() # RoleRequestBody | + 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 role + api_response = api_instance.create_role(role_request_body, aid=aid) + print("The response of RolesApi->create_role:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling RolesApi->create_role: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **role_request_body** | [**RoleRequestBody**](RoleRequestBody.md)| | + **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 + +[**RoleDetail**](RoleDetail.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** | Created | * 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) + +# **delete_role** +> delete_role(id, aid=aid) + +Delete role + +Deletes a role using its ID. The user needs appropriate permissions to successfully call this endpoint. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.admin +from thousandeyes_sdk.admin.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.admin.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.admin.RolesApi(api_client) + id = '23' # str | The ID of the desired role. + 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 role + api_instance.delete_role(id, aid=aid) + except Exception as e: + print("Exception when calling RolesApi->delete_role: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| The ID of the desired role. | + **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 | - | +**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_role** +> RoleDetail get_role(id, aid=aid) + +Retrieve role + +Returns detailed information about a role using its ID. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.admin +from thousandeyes_sdk.admin.models.role_detail import RoleDetail +from thousandeyes_sdk.admin.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.admin.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.admin.RolesApi(api_client) + id = '23' # str | The ID of the desired role. + 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: + # Retrieve role + api_response = api_instance.get_role(id, aid=aid) + print("The response of RolesApi->get_role:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling RolesApi->get_role: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| The ID of the desired role. | + **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 + +[**RoleDetail**](RoleDetail.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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 | - | +**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_roles** +> Roles get_roles(aid=aid) + +List roles + +Retrieves a list of defined roles visible to the current user. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.admin +from thousandeyes_sdk.admin.models.roles import Roles +from thousandeyes_sdk.admin.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.admin.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.admin.RolesApi(api_client) + 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: + # List roles + api_response = api_instance.get_roles(aid=aid) + print("The response of RolesApi->get_roles:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling RolesApi->get_roles: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **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 + +[**Roles**](Roles.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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 | - | +**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) + +# **update_role** +> RoleDetail update_role(id, role_request_body, aid=aid) + +Update role + +Updates a user-defined role using its ID. When updating a role, the following applies: * The full list of permissions must be sent, This endpoint does not support delta-based grant or revoking of permissions. * Permission definitions and details can be obtained from the Permissions endpoint. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.admin +from thousandeyes_sdk.admin.models.role_detail import RoleDetail +from thousandeyes_sdk.admin.models.role_request_body import RoleRequestBody +from thousandeyes_sdk.admin.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.admin.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.admin.RolesApi(api_client) + id = '23' # str | The ID of the desired role. + role_request_body = thousandeyes_sdk.admin.RoleRequestBody() # RoleRequestBody | + 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: + # Update role + api_response = api_instance.update_role(id, role_request_body, aid=aid) + print("The response of RolesApi->update_role:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling RolesApi->update_role: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| The ID of the desired role. | + **role_request_body** | [**RoleRequestBody**](RoleRequestBody.md)| | + **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 + +[**RoleDetail**](RoleDetail.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 | - | +**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-administrative/docs/SelfLinks.md b/thousandeyes-sdk-administrative/docs/SelfLinks.md new file mode 100644 index 00000000..9debde36 --- /dev/null +++ b/thousandeyes-sdk-administrative/docs/SelfLinks.md @@ -0,0 +1,30 @@ +# SelfLinks + +A links object containing the self link. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**var_self** | [**Link**](Link.md) | | [optional] + +## Example + +```python +from thousandeyes_sdk.admin.models.self_links import SelfLinks + +# TODO update the JSON string below +json = "{}" +# create an instance of SelfLinks from a JSON string +self_links_instance = SelfLinks.from_json(json) +# print the JSON string representation of the object +print(SelfLinks.to_json()) + +# convert the object into a dict +self_links_dict = self_links_instance.to_dict() +# create an instance of SelfLinks from a dict +self_links_from_dict = SelfLinks.from_dict(self_links_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-administrative/docs/SimpleAgent.md b/thousandeyes-sdk-administrative/docs/SimpleAgent.md new file mode 100644 index 00000000..0c0bd1bf --- /dev/null +++ b/thousandeyes-sdk-administrative/docs/SimpleAgent.md @@ -0,0 +1,38 @@ +# SimpleAgent + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] +**enabled** | **bool** | Flag indicating if the agent is enabled. | [optional] +**prefix** | **str** | Prefix containing agents public IP address. | [optional] [readonly] +**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] + +## Example + +```python +from thousandeyes_sdk.admin.models.simple_agent import SimpleAgent + +# TODO update the JSON string below +json = "{}" +# create an instance of SimpleAgent from a JSON string +simple_agent_instance = SimpleAgent.from_json(json) +# print the JSON string representation of the object +print(SimpleAgent.to_json()) + +# convert the object into a dict +simple_agent_dict = simple_agent_instance.to_dict() +# create an instance of SimpleAgent from a dict +simple_agent_from_dict = SimpleAgent.from_dict(simple_agent_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-administrative/docs/UnauthorizedError.md b/thousandeyes-sdk-administrative/docs/UnauthorizedError.md new file mode 100644 index 00000000..b87b2249 --- /dev/null +++ b/thousandeyes-sdk-administrative/docs/UnauthorizedError.md @@ -0,0 +1,30 @@ +# UnauthorizedError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | | [optional] +**error_description** | **str** | | [optional] + +## Example + +```python +from thousandeyes_sdk.admin.models.unauthorized_error import UnauthorizedError + +# TODO update the JSON string below +json = "{}" +# create an instance of UnauthorizedError from a JSON string +unauthorized_error_instance = UnauthorizedError.from_json(json) +# print the JSON string representation of the object +print(UnauthorizedError.to_json()) + +# convert the object into a dict +unauthorized_error_dict = unauthorized_error_instance.to_dict() +# create an instance of UnauthorizedError from a dict +unauthorized_error_from_dict = UnauthorizedError.from_dict(unauthorized_error_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-administrative/docs/User.md b/thousandeyes-sdk-administrative/docs/User.md new file mode 100644 index 00000000..90f7985f --- /dev/null +++ b/thousandeyes-sdk-administrative/docs/User.md @@ -0,0 +1,33 @@ +# User + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | User's display name. | [optional] +**email** | **str** | User's email address. | [optional] +**uid** | **str** | Unique ID of the user. | [optional] +**date_registered** | **datetime** | UTC date the user registered their account (ISO date-time format). | [optional] +**login_account_group** | [**AccountGroup**](AccountGroup.md) | | [optional] + +## Example + +```python +from thousandeyes_sdk.admin.models.user import User + +# TODO update the JSON string below +json = "{}" +# create an instance of User from a JSON string +user_instance = User.from_json(json) +# print the JSON string representation of the object +print(User.to_json()) + +# convert the object into a dict +user_dict = user_instance.to_dict() +# create an instance of User from a dict +user_from_dict = User.from_dict(user_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-administrative/docs/UserAccountGroup.md b/thousandeyes-sdk-administrative/docs/UserAccountGroup.md new file mode 100644 index 00000000..2112b94c --- /dev/null +++ b/thousandeyes-sdk-administrative/docs/UserAccountGroup.md @@ -0,0 +1,34 @@ +# UserAccountGroup + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | User's display name. | [optional] +**email** | **str** | User's email address. | [optional] +**uid** | **str** | Unique ID representing the user. | [optional] +**last_login** | **datetime** | User's UTC last login date (ISO date-time format). | [optional] +**date_registered** | **datetime** | User's UTC registration date (ISO date-time format). | [optional] +**roles** | [**List[Role]**](Role.md) | | [optional] + +## Example + +```python +from thousandeyes_sdk.admin.models.user_account_group import UserAccountGroup + +# TODO update the JSON string below +json = "{}" +# create an instance of UserAccountGroup from a JSON string +user_account_group_instance = UserAccountGroup.from_json(json) +# print the JSON string representation of the object +print(UserAccountGroup.to_json()) + +# convert the object into a dict +user_account_group_dict = user_account_group_instance.to_dict() +# create an instance of UserAccountGroup from a dict +user_account_group_from_dict = UserAccountGroup.from_dict(user_account_group_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-administrative/docs/UserAccountGroupRole.md b/thousandeyes-sdk-administrative/docs/UserAccountGroupRole.md new file mode 100644 index 00000000..c0312280 --- /dev/null +++ b/thousandeyes-sdk-administrative/docs/UserAccountGroupRole.md @@ -0,0 +1,30 @@ +# UserAccountGroupRole + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**account_group_id** | **str** | Unique ID of the account group. | [optional] +**role_ids** | **List[str]** | Unique role IDs. | [optional] + +## Example + +```python +from thousandeyes_sdk.admin.models.user_account_group_role import UserAccountGroupRole + +# TODO update the JSON string below +json = "{}" +# create an instance of UserAccountGroupRole from a JSON string +user_account_group_role_instance = UserAccountGroupRole.from_json(json) +# print the JSON string representation of the object +print(UserAccountGroupRole.to_json()) + +# convert the object into a dict +user_account_group_role_dict = user_account_group_role_instance.to_dict() +# create an instance of UserAccountGroupRole from a dict +user_account_group_role_from_dict = UserAccountGroupRole.from_dict(user_account_group_role_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-administrative/docs/UserDetail.md b/thousandeyes-sdk-administrative/docs/UserDetail.md new file mode 100644 index 00000000..367d9b6a --- /dev/null +++ b/thousandeyes-sdk-administrative/docs/UserDetail.md @@ -0,0 +1,37 @@ +# UserDetail + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | User's display name. | [optional] +**email** | **str** | User's email address. | [optional] +**uid** | **str** | Unique ID of the user. | [optional] +**date_registered** | **datetime** | UTC date the user registered their account (ISO date-time format). | [optional] +**login_account_group** | [**AccountGroup**](AccountGroup.md) | | [optional] +**last_login** | **datetime** | UTC last login of the user (ISO date-time format). | [optional] +**account_group_roles** | [**List[AccountGroupRole]**](AccountGroupRole.md) | | [optional] +**all_account_group_roles** | [**List[Role]**](Role.md) | | [optional] +**links** | [**SelfLinks**](SelfLinks.md) | | [optional] + +## Example + +```python +from thousandeyes_sdk.admin.models.user_detail import UserDetail + +# TODO update the JSON string below +json = "{}" +# create an instance of UserDetail from a JSON string +user_detail_instance = UserDetail.from_json(json) +# print the JSON string representation of the object +print(UserDetail.to_json()) + +# convert the object into a dict +user_detail_dict = user_detail_instance.to_dict() +# create an instance of UserDetail from a dict +user_detail_from_dict = UserDetail.from_dict(user_detail_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-administrative/docs/UserEvent.md b/thousandeyes-sdk-administrative/docs/UserEvent.md new file mode 100644 index 00000000..9af66944 --- /dev/null +++ b/thousandeyes-sdk-administrative/docs/UserEvent.md @@ -0,0 +1,36 @@ +# UserEvent + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**aid** | **str** | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. | [optional] +**account_group_name** | **str** | Account group name | [optional] +**var_date** | **datetime** | UTC event date (ISO date-time format). | [optional] +**event** | **str** | Event type. | [optional] +**ip_address** | **str** | Source IP address of the user. | [optional] +**uid** | **str** | Unique id representing the user. | [optional] +**user** | **str** | The name and email address of the user. | [optional] +**resources** | [**List[Resource]**](Resource.md) | | [optional] + +## Example + +```python +from thousandeyes_sdk.admin.models.user_event import UserEvent + +# TODO update the JSON string below +json = "{}" +# create an instance of UserEvent from a JSON string +user_event_instance = UserEvent.from_json(json) +# print the JSON string representation of the object +print(UserEvent.to_json()) + +# convert the object into a dict +user_event_dict = user_event_instance.to_dict() +# create an instance of UserEvent from a dict +user_event_from_dict = UserEvent.from_dict(user_event_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-administrative/docs/UserEventsApi.md b/thousandeyes-sdk-administrative/docs/UserEventsApi.md new file mode 100644 index 00000000..e0b042c0 --- /dev/null +++ b/thousandeyes-sdk-administrative/docs/UserEventsApi.md @@ -0,0 +1,103 @@ +# thousandeyes_sdk.admin.UserEventsApi + +All URIs are relative to *https://api.thousandeyes.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_user_events**](UserEventsApi.md#get_user_events) | **GET** /v7/audit-user-events | List activity log events + + +# **get_user_events** +> AuditUserEvents get_user_events(aid=aid, use_all_permitted_aids=use_all_permitted_aids, window=window, start_date=start_date, end_date=end_date, cursor=cursor) + +List activity log events + +Returns a list of activity log events in the current account group. If `useAllPermittedAids=true` query parameter is passed and the user has permission `View activity log for all users in account group` the logs returned include events across all the account groups they belong to. For more information about changing the account group context, see [Account Context](https://developer.thousandeyes.com/v7/#/accountcontext). + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.admin +from thousandeyes_sdk.admin.models.audit_user_events import AuditUserEvents +from thousandeyes_sdk.admin.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.admin.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.admin.UserEventsApi(api_client) + 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) + use_all_permitted_aids = False # bool | Set to `true` to load data from all accounts the user has access to. (optional) (default to False) + window = '12h' # str | 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`. (optional) + start_date = '2022-07-17T22:00:54Z' # datetime | 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`. (optional) + end_date = '2022-07-18T22:00:54Z' # datetime | Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. (optional) + cursor = 'cursor_example' # str | (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. (optional) + + try: + # List activity log events + api_response = api_instance.get_user_events(aid=aid, use_all_permitted_aids=use_all_permitted_aids, window=window, start_date=start_date, end_date=end_date, cursor=cursor) + print("The response of UserEventsApi->get_user_events:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UserEventsApi->get_user_events: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **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] + **use_all_permitted_aids** | **bool**| Set to `true` to load data from all accounts the user has access to. | [optional] [default to False] + **window** | **str**| 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`. | [optional] + **start_date** | **datetime**| 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`. | [optional] + **end_date** | **datetime**| Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. | [optional] + **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. | [optional] + +### Return type + +[**AuditUserEvents**](AuditUserEvents.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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 | - | +**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-administrative/docs/UserRequest.md b/thousandeyes-sdk-administrative/docs/UserRequest.md new file mode 100644 index 00000000..2b944ef7 --- /dev/null +++ b/thousandeyes-sdk-administrative/docs/UserRequest.md @@ -0,0 +1,33 @@ +# UserRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | User's display name. | [optional] +**email** | **str** | User's email address. | [optional] +**login_account_group_id** | **str** | Unique ID of the login account group. | [optional] +**account_group_roles** | [**List[UserAccountGroupRole]**](UserAccountGroupRole.md) | | [optional] +**all_account_group_role_ids** | **List[str]** | Unique IDs representing the roles. | [optional] + +## Example + +```python +from thousandeyes_sdk.admin.models.user_request import UserRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UserRequest from a JSON string +user_request_instance = UserRequest.from_json(json) +# print the JSON string representation of the object +print(UserRequest.to_json()) + +# convert the object into a dict +user_request_dict = user_request_instance.to_dict() +# create an instance of UserRequest from a dict +user_request_from_dict = UserRequest.from_dict(user_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-administrative/docs/Users.md b/thousandeyes-sdk-administrative/docs/Users.md new file mode 100644 index 00000000..027dafb0 --- /dev/null +++ b/thousandeyes-sdk-administrative/docs/Users.md @@ -0,0 +1,30 @@ +# Users + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**users** | [**List[ExtendedUser]**](ExtendedUser.md) | | [optional] +**links** | [**SelfLinks**](SelfLinks.md) | | [optional] + +## Example + +```python +from thousandeyes_sdk.admin.models.users import Users + +# TODO update the JSON string below +json = "{}" +# create an instance of Users from a JSON string +users_instance = Users.from_json(json) +# print the JSON string representation of the object +print(Users.to_json()) + +# convert the object into a dict +users_dict = users_instance.to_dict() +# create an instance of Users from a dict +users_from_dict = Users.from_dict(users_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-administrative/docs/UsersApi.md b/thousandeyes-sdk-administrative/docs/UsersApi.md new file mode 100644 index 00000000..5ec584a6 --- /dev/null +++ b/thousandeyes-sdk-administrative/docs/UsersApi.md @@ -0,0 +1,442 @@ +# thousandeyes_sdk.admin.UsersApi + +All URIs are relative to *https://api.thousandeyes.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_user**](UsersApi.md#create_user) | **POST** /v7/users | Create user +[**delete_user**](UsersApi.md#delete_user) | **DELETE** /v7/users/{id} | Delete user +[**get_user**](UsersApi.md#get_user) | **GET** /v7/users/{id} | Retrieve user +[**get_users**](UsersApi.md#get_users) | **GET** /v7/users | List users +[**update_user**](UsersApi.md#update_user) | **PUT** /v7/users/{id} | Update user + + +# **create_user** +> CreatedUser create_user(user_request, aid=aid) + +Create user + +Creates a new user. The following applies when creating a user: * If the user is already a member of another ThousandEyes customer organization, the user must set their own login account group. * Any update that includes `accountGroupRoles` is a replace-based update and not a delta-based update. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.admin +from thousandeyes_sdk.admin.models.created_user import CreatedUser +from thousandeyes_sdk.admin.models.user_request import UserRequest +from thousandeyes_sdk.admin.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.admin.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.admin.UsersApi(api_client) + user_request = thousandeyes_sdk.admin.UserRequest() # UserRequest | + 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 user + api_response = api_instance.create_user(user_request, aid=aid) + print("The response of UsersApi->create_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UsersApi->create_user: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_request** | [**UserRequest**](UserRequest.md)| | + **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 + +[**CreatedUser**](CreatedUser.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** | Created | * 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) + +# **delete_user** +> delete_user(id, aid=aid) + +Delete user + +Deletes a user using the user ID. This endpoint requires the `Edit users in all account groups` or `Edit users` permission. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.admin +from thousandeyes_sdk.admin.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.admin.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.admin.UsersApi(api_client) + id = '1234' # str | Identifier for the user. + 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 user + api_instance.delete_user(id, aid=aid) + except Exception as e: + print("Exception when calling UsersApi->delete_user: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| Identifier for the user. | + **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 | - | +**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_user** +> UserDetail get_user(id, aid=aid) + +Retrieve user + +Retrieves detailed information about a user. This operation requires the `API Access` and `View All Users` permissions. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.admin +from thousandeyes_sdk.admin.models.user_detail import UserDetail +from thousandeyes_sdk.admin.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.admin.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.admin.UsersApi(api_client) + id = '1234' # str | Identifier for the user. + 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: + # Retrieve user + api_response = api_instance.get_user(id, aid=aid) + print("The response of UsersApi->get_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UsersApi->get_user: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| Identifier for the user. | + **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 + +[**UserDetail**](UserDetail.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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 | - | +**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_users** +> Users get_users(aid=aid) + +List users + +Retrieves a list of users in the organization the account group ID belongs to. This operation requires the `API Access` and `View all users` permissions. See [Account Context](https://developer.thousandeyes.com/v7/#/accountcontext) for more information on changing the account group context. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.admin +from thousandeyes_sdk.admin.models.users import Users +from thousandeyes_sdk.admin.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.admin.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.admin.UsersApi(api_client) + 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: + # List users + api_response = api_instance.get_users(aid=aid) + print("The response of UsersApi->get_users:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UsersApi->get_users: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **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 + +[**Users**](Users.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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 | - | +**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) + +# **update_user** +> UserDetail update_user(id, user_request, aid=aid) + +Update user + +Updates a user using the user ID. You can update the user name, email address, account group assignments, or roles. This endpoint requires the `Edit users in all account groups` or `Edit users` permission. When updating a user, the following applies: * When updating a user's email address, the user must confirm the username change before they can subsequently log in or perform API operations. * Any update that includes `accountGroupRoles` is a replace-based update and not a delta-based update. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.admin +from thousandeyes_sdk.admin.models.user_detail import UserDetail +from thousandeyes_sdk.admin.models.user_request import UserRequest +from thousandeyes_sdk.admin.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.admin.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.admin.UsersApi(api_client) + id = '1234' # str | Identifier for the user. + user_request = thousandeyes_sdk.admin.UserRequest() # UserRequest | + 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: + # Update user + api_response = api_instance.update_user(id, user_request, aid=aid) + print("The response of UsersApi->update_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UsersApi->update_user: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| Identifier for the user. | + **user_request** | [**UserRequest**](UserRequest.md)| | + **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 + +[**UserDetail**](UserDetail.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 | - | +**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-administrative/docs/ValidationError.md b/thousandeyes-sdk-administrative/docs/ValidationError.md new file mode 100644 index 00000000..da7091b6 --- /dev/null +++ b/thousandeyes-sdk-administrative/docs/ValidationError.md @@ -0,0 +1,34 @@ +# ValidationError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\". | [optional] +**title** | **str** | A short, human-readable summary of the problem type. | [optional] +**status** | **int** | The HTTP status code generated by the origin server for this occurrence of the problem. | [optional] +**detail** | **str** | A human-readable explanation specific to this occurrence of the problem. | [optional] +**instance** | **str** | A URI reference that identifies the specific occurrence of the problem. | [optional] +**errors** | [**List[ValidationErrorItem]**](ValidationErrorItem.md) | (Optional) When multiple errors occur, the details for each error are listed. | [optional] + +## Example + +```python +from thousandeyes_sdk.admin.models.validation_error import ValidationError + +# TODO update the JSON string below +json = "{}" +# create an instance of ValidationError from a JSON string +validation_error_instance = ValidationError.from_json(json) +# print the JSON string representation of the object +print(ValidationError.to_json()) + +# convert the object into a dict +validation_error_dict = validation_error_instance.to_dict() +# create an instance of ValidationError from a dict +validation_error_from_dict = ValidationError.from_dict(validation_error_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-administrative/docs/ValidationErrorItem.md b/thousandeyes-sdk-administrative/docs/ValidationErrorItem.md new file mode 100644 index 00000000..dd105e40 --- /dev/null +++ b/thousandeyes-sdk-administrative/docs/ValidationErrorItem.md @@ -0,0 +1,31 @@ +# ValidationErrorItem + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **str** | (Optional) A unique error type/code that can be referenced in the documentation for further details. | [optional] +**var_field** | **str** | Identifies the field that triggered this particular error. | [optional] +**message** | **str** | A short, human-readable summary of the error. | [optional] + +## Example + +```python +from thousandeyes_sdk.admin.models.validation_error_item import ValidationErrorItem + +# TODO update the JSON string below +json = "{}" +# create an instance of ValidationErrorItem from a JSON string +validation_error_item_instance = ValidationErrorItem.from_json(json) +# print the JSON string representation of the object +print(ValidationErrorItem.to_json()) + +# convert the object into a dict +validation_error_item_dict = validation_error_item_instance.to_dict() +# create an instance of ValidationErrorItem from a dict +validation_error_item_from_dict = ValidationErrorItem.from_dict(validation_error_item_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-administrative/pyproject.toml b/thousandeyes-sdk-administrative/pyproject.toml new file mode 100644 index 00000000..1a7fd992 --- /dev/null +++ b/thousandeyes-sdk-administrative/pyproject.toml @@ -0,0 +1,80 @@ +[project] +name = "thousandeyes-sdk-administrative" +dynamic = ["version"] +authors = [ + { name = "ThousandEyes API Team", email = "api-team@thousandeyes.com" } +] +description = "Administrative API" +license = { text = "../LICENSE" } +dependencies = [ + "urllib3 >= 1.25.3", + "python-dateutil >=2.8.2", + "pydantic >=2", + "typing-extensions >=4.7.1", + "thousandeyes-sdk-core", +] + +[tool.setuptools.dynamic] +version = {attr = "thousandeyes_sdk.client.__version__"} + +[project.optional-dependencies] +test = [ + "pytest~=7.1.3", + "pytest-cov>=2.8.1", + "pytest-randomly>=3.12.0", + "mypy>=1.4.1", + "types-python-dateutil>=2.8.19", +] +dev = [ + "flake8>=4.0.0", + "mypy>=1.4.1", + "types-python-dateutil>=2.8.19", +] + +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[tool.setuptools] +include-package-data = true + +[tool.pylint.'MESSAGES CONTROL'] +extension-pkg-whitelist = "pydantic" + +[tool.mypy] +files = [ + "src", + #"test", # auto-generated tests + "tests", # hand-written tests +] +# TODO: enable "strict" once all these individual checks are passing +# strict = true + +# List from: https://mypy.readthedocs.io/en/stable/existing_code.html#introduce-stricter-options +warn_unused_configs = true +warn_redundant_casts = true +warn_unused_ignores = true + +## Getting these passing should be easy +strict_equality = true +strict_concatenate = true + +## Strongly recommend enabling this one as soon as you can +check_untyped_defs = true + +## These shouldn't be too much additional work, but may be tricky to +## get passing if you use a lot of untyped libraries +disallow_subclassing_any = true +disallow_untyped_decorators = true +disallow_any_generics = true + +### These next few are various gradations of forcing use of type annotations +#disallow_untyped_calls = true +#disallow_incomplete_defs = true +#disallow_untyped_defs = true +# +### This one isn't too hard to get passing, but return on investment is lower +#no_implicit_reexport = true +# +### This one can be tricky to get passing if you use a lot of untyped libraries +#warn_return_any = true diff --git a/thousandeyes-sdk-administrative/setup.cfg b/thousandeyes-sdk-administrative/setup.cfg new file mode 100644 index 00000000..11433ee8 --- /dev/null +++ b/thousandeyes-sdk-administrative/setup.cfg @@ -0,0 +1,2 @@ +[flake8] +max-line-length=99 diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/__init__.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/__init__.py new file mode 100644 index 00000000..df788544 --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/__init__.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +# flake8: noqa + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import apis into sdk package +from thousandeyes_sdk.admin.api.account_groups_api import AccountGroupsApi +from thousandeyes_sdk.admin.api.permissions_api import PermissionsApi +from thousandeyes_sdk.admin.api.roles_api import RolesApi +from thousandeyes_sdk.admin.api.user_events_api import UserEventsApi +from thousandeyes_sdk.admin.api.users_api import UsersApi + + +# import models into sdk package +from thousandeyes_sdk.admin.models.account_group import AccountGroup +from thousandeyes_sdk.admin.models.account_group_detail import AccountGroupDetail +from thousandeyes_sdk.admin.models.account_group_info import AccountGroupInfo +from thousandeyes_sdk.admin.models.account_group_request import AccountGroupRequest +from thousandeyes_sdk.admin.models.account_group_role import AccountGroupRole +from thousandeyes_sdk.admin.models.account_groups import AccountGroups +from thousandeyes_sdk.admin.models.agent import Agent +from thousandeyes_sdk.admin.models.agent_base import AgentBase +from thousandeyes_sdk.admin.models.audit_user_events import AuditUserEvents +from thousandeyes_sdk.admin.models.base_role import BaseRole +from thousandeyes_sdk.admin.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType +from thousandeyes_sdk.admin.models.cluster_member import ClusterMember +from thousandeyes_sdk.admin.models.created_account_group import CreatedAccountGroup +from thousandeyes_sdk.admin.models.created_user import CreatedUser +from thousandeyes_sdk.admin.models.enterprise_agent import EnterpriseAgent +from thousandeyes_sdk.admin.models.enterprise_agent_data import EnterpriseAgentData +from thousandeyes_sdk.admin.models.enterprise_agent_ipv6_policy import EnterpriseAgentIpv6Policy +from thousandeyes_sdk.admin.models.enterprise_agent_state import EnterpriseAgentState +from thousandeyes_sdk.admin.models.error import Error +from thousandeyes_sdk.admin.models.error_detail import ErrorDetail +from thousandeyes_sdk.admin.models.error_detail_code import ErrorDetailCode +from thousandeyes_sdk.admin.models.expand import Expand +from thousandeyes_sdk.admin.models.extended_user import ExtendedUser +from thousandeyes_sdk.admin.models.interface_ip_mapping import InterfaceIpMapping +from thousandeyes_sdk.admin.models.link import Link +from thousandeyes_sdk.admin.models.pagination_links import PaginationLinks +from thousandeyes_sdk.admin.models.permission import Permission +from thousandeyes_sdk.admin.models.permissions import Permissions +from thousandeyes_sdk.admin.models.resource import Resource +from thousandeyes_sdk.admin.models.role import Role +from thousandeyes_sdk.admin.models.role_detail import RoleDetail +from thousandeyes_sdk.admin.models.role_request_body import RoleRequestBody +from thousandeyes_sdk.admin.models.roles import Roles +from thousandeyes_sdk.admin.models.self_links import SelfLinks +from thousandeyes_sdk.admin.models.simple_agent import SimpleAgent +from thousandeyes_sdk.admin.models.unauthorized_error import UnauthorizedError +from thousandeyes_sdk.admin.models.user import User +from thousandeyes_sdk.admin.models.user_account_group import UserAccountGroup +from thousandeyes_sdk.admin.models.user_account_group_role import UserAccountGroupRole +from thousandeyes_sdk.admin.models.user_detail import UserDetail +from thousandeyes_sdk.admin.models.user_event import UserEvent +from thousandeyes_sdk.admin.models.user_request import UserRequest +from thousandeyes_sdk.admin.models.users import Users +from thousandeyes_sdk.admin.models.validation_error import ValidationError +from thousandeyes_sdk.admin.models.validation_error_item import ValidationErrorItem diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/api/__init__.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/api/__init__.py new file mode 100644 index 00000000..886af984 --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/api/__init__.py @@ -0,0 +1,9 @@ +# flake8: noqa + +# import apis into api package +from thousandeyes_sdk.admin.api.account_groups_api import AccountGroupsApi +from thousandeyes_sdk.admin.api.permissions_api import PermissionsApi +from thousandeyes_sdk.admin.api.roles_api import RolesApi +from thousandeyes_sdk.admin.api.user_events_api import UserEventsApi +from thousandeyes_sdk.admin.api.users_api import UsersApi + diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/api/account_groups_api.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/api/account_groups_api.py new file mode 100644 index 00000000..245a45e8 --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/api/account_groups_api.py @@ -0,0 +1,1543 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +import thousandeyes_sdk.admin.models + +from pydantic import Field, StrictStr +from typing import List, Optional +from typing_extensions import Annotated +from thousandeyes_sdk.admin.models.account_group_detail import AccountGroupDetail +from thousandeyes_sdk.admin.models.account_group_request import AccountGroupRequest +from thousandeyes_sdk.admin.models.account_groups import AccountGroups +from thousandeyes_sdk.admin.models.created_account_group import CreatedAccountGroup +from thousandeyes_sdk.admin.models.expand import Expand + +from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized +from thousandeyes_sdk.client.api_response import ApiResponse +from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version + + +class AccountGroupsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) + self.api_client = api_client + + + @validate_call + def create_account_group( + self, + account_group_request: AccountGroupRequest, + expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter that specifies whether or not account group related resources should be expanded. By default, no expansion takes place if the query parameter is not passed. For example, to expand the `users` resource, pass the `?expand=user` query.")] = 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, + ) -> CreatedAccountGroup: + """Create account group + + Creates a new account group. This operation requires the `Edit all account groups` permission. **Note:** Any user assigned to `All Account Groups` is automatically assigned to the new account group. + + :param account_group_request: (required) + :type account_group_request: AccountGroupRequest + :param expand: Optional parameter that specifies whether or not account group related resources should be expanded. By default, no expansion takes place if the query parameter is not passed. For example, to expand the `users` resource, pass the `?expand=user` query. + :type expand: List[Expand] + :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._create_account_group_serialize( + account_group_request=account_group_request, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreatedAccountGroup", + '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.admin.models, + ).data + + + @validate_call + def create_account_group_with_http_info( + self, + account_group_request: AccountGroupRequest, + expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter that specifies whether or not account group related resources should be expanded. By default, no expansion takes place if the query parameter is not passed. For example, to expand the `users` resource, pass the `?expand=user` query.")] = 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[CreatedAccountGroup]: + """Create account group + + Creates a new account group. This operation requires the `Edit all account groups` permission. **Note:** Any user assigned to `All Account Groups` is automatically assigned to the new account group. + + :param account_group_request: (required) + :type account_group_request: AccountGroupRequest + :param expand: Optional parameter that specifies whether or not account group related resources should be expanded. By default, no expansion takes place if the query parameter is not passed. For example, to expand the `users` resource, pass the `?expand=user` query. + :type expand: List[Expand] + :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._create_account_group_serialize( + account_group_request=account_group_request, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreatedAccountGroup", + '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.admin.models, + ) + + + @validate_call + def create_account_group_without_preload_content( + self, + account_group_request: AccountGroupRequest, + expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter that specifies whether or not account group related resources should be expanded. By default, no expansion takes place if the query parameter is not passed. For example, to expand the `users` resource, pass the `?expand=user` query.")] = 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: + """Create account group + + Creates a new account group. This operation requires the `Edit all account groups` permission. **Note:** Any user assigned to `All Account Groups` is automatically assigned to the new account group. + + :param account_group_request: (required) + :type account_group_request: AccountGroupRequest + :param expand: Optional parameter that specifies whether or not account group related resources should be expanded. By default, no expansion takes place if the query parameter is not passed. For example, to expand the `users` resource, pass the `?expand=user` query. + :type expand: List[Expand] + :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._create_account_group_serialize( + account_group_request=account_group_request, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreatedAccountGroup", + '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 _create_account_group_serialize( + self, + account_group_request, + expand, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'expand': 'csv', + } + + _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 expand is not None: + + _query_params.append(('expand', expand)) + + # process the header parameters + # process the form parameters + # process the body parameter + if account_group_request is not None: + _body_params = account_group_request + + + # 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] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v7/account-groups', + 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 delete_account_group( + self, + id: Annotated[StrictStr, Field(description="Identifier for the account group.")], + _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, + ) -> None: + """Delete account group + + Deletes an account group using its ID. This operation requires the following permissions: * Assign management permissions * Delete account * Edit all account groups + + :param id: Identifier for the account group. (required) + :type id: 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._delete_account_group_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '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.admin.models, + ).data + + + @validate_call + def delete_account_group_with_http_info( + self, + id: Annotated[StrictStr, Field(description="Identifier for the account group.")], + _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[None]: + """Delete account group + + Deletes an account group using its ID. This operation requires the following permissions: * Assign management permissions * Delete account * Edit all account groups + + :param id: Identifier for the account group. (required) + :type id: 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._delete_account_group_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '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.admin.models, + ) + + + @validate_call + def delete_account_group_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="Identifier for the account group.")], + _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: + """Delete account group + + Deletes an account group using its ID. This operation requires the following permissions: * Assign management permissions * Delete account * Edit all account groups + + :param id: Identifier for the account group. (required) + :type id: 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._delete_account_group_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '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 _delete_account_group_serialize( + self, + id, + _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 id is not None: + _path_params['id'] = id + # process the query parameters + # 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/json', + 'application/problem+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v7/account-groups/{id}', + 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_account_group( + self, + id: Annotated[StrictStr, Field(description="Identifier for the account group.")], + expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter that specifies whether or not account group related resources should be expanded. By default, no expansion takes place if the query parameter is not passed. For example, to expand the `users` resource, pass the `?expand=user` query.")] = 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, + ) -> AccountGroupDetail: + """Retrieve account group + + Retrieves detailed information about an account group using its ID. This operation requires the `View all account groups settings` permission. + + :param id: Identifier for the account group. (required) + :type id: str + :param expand: Optional parameter that specifies whether or not account group related resources should be expanded. By default, no expansion takes place if the query parameter is not passed. For example, to expand the `users` resource, pass the `?expand=user` query. + :type expand: List[Expand] + :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_account_group_serialize( + id=id, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AccountGroupDetail", + '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.admin.models, + ).data + + + @validate_call + def get_account_group_with_http_info( + self, + id: Annotated[StrictStr, Field(description="Identifier for the account group.")], + expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter that specifies whether or not account group related resources should be expanded. By default, no expansion takes place if the query parameter is not passed. For example, to expand the `users` resource, pass the `?expand=user` query.")] = 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[AccountGroupDetail]: + """Retrieve account group + + Retrieves detailed information about an account group using its ID. This operation requires the `View all account groups settings` permission. + + :param id: Identifier for the account group. (required) + :type id: str + :param expand: Optional parameter that specifies whether or not account group related resources should be expanded. By default, no expansion takes place if the query parameter is not passed. For example, to expand the `users` resource, pass the `?expand=user` query. + :type expand: List[Expand] + :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_account_group_serialize( + id=id, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AccountGroupDetail", + '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.admin.models, + ) + + + @validate_call + def get_account_group_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="Identifier for the account group.")], + expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter that specifies whether or not account group related resources should be expanded. By default, no expansion takes place if the query parameter is not passed. For example, to expand the `users` resource, pass the `?expand=user` query.")] = 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 account group + + Retrieves detailed information about an account group using its ID. This operation requires the `View all account groups settings` permission. + + :param id: Identifier for the account group. (required) + :type id: str + :param expand: Optional parameter that specifies whether or not account group related resources should be expanded. By default, no expansion takes place if the query parameter is not passed. For example, to expand the `users` resource, pass the `?expand=user` query. + :type expand: List[Expand] + :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_account_group_serialize( + id=id, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AccountGroupDetail", + '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_account_group_serialize( + self, + id, + expand, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'expand': 'csv', + } + + _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 id is not None: + _path_params['id'] = id + # process the query parameters + if expand is not None: + + _query_params.append(('expand', expand)) + + # 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='/v7/account-groups/{id}', + 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_account_groups( + 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, + ) -> AccountGroups: + """List account groups + + Retrieves a list of account groups available to the current user. + + :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_account_groups_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': "AccountGroups", + '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.admin.models, + ).data + + + @validate_call + def get_account_groups_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[AccountGroups]: + """List account groups + + Retrieves a list of account groups available to the current user. + + :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_account_groups_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': "AccountGroups", + '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.admin.models, + ) + + + @validate_call + def get_account_groups_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 account groups + + Retrieves a list of account groups available to the current user. + + :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_account_groups_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': "AccountGroups", + '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_account_groups_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='/v7/account-groups', + 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 update_account_group( + self, + id: Annotated[StrictStr, Field(description="Identifier for the account group.")], + account_group_request: AccountGroupRequest, + expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter that specifies whether or not account group related resources should be expanded. By default, no expansion takes place if the query parameter is not passed. For example, to expand the `users` resource, pass the `?expand=user` query.")] = 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, + ) -> AccountGroupDetail: + """Update account group + + Updates an account group using its ID. You can modify the account group’s name or the list of agents assigned to the account group. + + :param id: Identifier for the account group. (required) + :type id: str + :param account_group_request: (required) + :type account_group_request: AccountGroupRequest + :param expand: Optional parameter that specifies whether or not account group related resources should be expanded. By default, no expansion takes place if the query parameter is not passed. For example, to expand the `users` resource, pass the `?expand=user` query. + :type expand: List[Expand] + :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._update_account_group_serialize( + id=id, + account_group_request=account_group_request, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AccountGroupDetail", + '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.admin.models, + ).data + + + @validate_call + def update_account_group_with_http_info( + self, + id: Annotated[StrictStr, Field(description="Identifier for the account group.")], + account_group_request: AccountGroupRequest, + expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter that specifies whether or not account group related resources should be expanded. By default, no expansion takes place if the query parameter is not passed. For example, to expand the `users` resource, pass the `?expand=user` query.")] = 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[AccountGroupDetail]: + """Update account group + + Updates an account group using its ID. You can modify the account group’s name or the list of agents assigned to the account group. + + :param id: Identifier for the account group. (required) + :type id: str + :param account_group_request: (required) + :type account_group_request: AccountGroupRequest + :param expand: Optional parameter that specifies whether or not account group related resources should be expanded. By default, no expansion takes place if the query parameter is not passed. For example, to expand the `users` resource, pass the `?expand=user` query. + :type expand: List[Expand] + :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._update_account_group_serialize( + id=id, + account_group_request=account_group_request, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AccountGroupDetail", + '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.admin.models, + ) + + + @validate_call + def update_account_group_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="Identifier for the account group.")], + account_group_request: AccountGroupRequest, + expand: Annotated[Optional[List[Expand]], Field(description="Optional parameter that specifies whether or not account group related resources should be expanded. By default, no expansion takes place if the query parameter is not passed. For example, to expand the `users` resource, pass the `?expand=user` query.")] = 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: + """Update account group + + Updates an account group using its ID. You can modify the account group’s name or the list of agents assigned to the account group. + + :param id: Identifier for the account group. (required) + :type id: str + :param account_group_request: (required) + :type account_group_request: AccountGroupRequest + :param expand: Optional parameter that specifies whether or not account group related resources should be expanded. By default, no expansion takes place if the query parameter is not passed. For example, to expand the `users` resource, pass the `?expand=user` query. + :type expand: List[Expand] + :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._update_account_group_serialize( + id=id, + account_group_request=account_group_request, + expand=expand, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AccountGroupDetail", + '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 _update_account_group_serialize( + self, + id, + account_group_request, + expand, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'expand': 'csv', + } + + _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 id is not None: + _path_params['id'] = id + # process the query parameters + if expand is not None: + + _query_params.append(('expand', expand)) + + # process the header parameters + # process the form parameters + # process the body parameter + if account_group_request is not None: + _body_params = account_group_request + + + # 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] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/v7/account-groups/{id}', + 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 + ) + + diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/api/permissions_api.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/api/permissions_api.py new file mode 100644 index 00000000..cb6d4eaa --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/api/permissions_api.py @@ -0,0 +1,325 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +import thousandeyes_sdk.admin.models + +from pydantic import Field, StrictStr +from typing import Optional +from typing_extensions import Annotated +from thousandeyes_sdk.admin.models.permissions import Permissions + +from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized +from thousandeyes_sdk.client.api_response import ApiResponse +from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version + + +class PermissionsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) + self.api_client = api_client + + + @validate_call + def get_permissions( + 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, + ) -> Permissions: + """List assignable permissions + + Users must be in a role assigned management permissions to access this endpoint. Users without management permissions who attempt to access this endpoint receive an HTTP/403 response code. + + :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_permissions_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': "Permissions", + '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.admin.models, + ).data + + + @validate_call + def get_permissions_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[Permissions]: + """List assignable permissions + + Users must be in a role assigned management permissions to access this endpoint. Users without management permissions who attempt to access this endpoint receive an HTTP/403 response code. + + :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_permissions_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': "Permissions", + '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.admin.models, + ) + + + @validate_call + def get_permissions_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 assignable permissions + + Users must be in a role assigned management permissions to access this endpoint. Users without management permissions who attempt to access this endpoint receive an HTTP/403 response code. + + :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_permissions_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': "Permissions", + '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_permissions_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='/v7/permissions', + 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 + ) + + diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/api/roles_api.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/api/roles_api.py new file mode 100644 index 00000000..c8a17589 --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/api/roles_api.py @@ -0,0 +1,1555 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +import thousandeyes_sdk.admin.models + +from pydantic import Field, StrictStr +from typing import Optional +from typing_extensions import Annotated +from thousandeyes_sdk.admin.models.role_detail import RoleDetail +from thousandeyes_sdk.admin.models.role_request_body import RoleRequestBody +from thousandeyes_sdk.admin.models.roles import Roles + +from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized +from thousandeyes_sdk.client.api_response import ApiResponse +from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version + + +class RolesApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) + self.api_client = api_client + + + @validate_call + def create_role( + self, + role_request_body: RoleRequestBody, + 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, + ) -> RoleDetail: + """Create role + + Creates a new role. + + :param role_request_body: (required) + :type role_request_body: RoleRequestBody + :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._create_role_serialize( + role_request_body=role_request_body, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "RoleDetail", + '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.admin.models, + ).data + + + @validate_call + def create_role_with_http_info( + self, + role_request_body: RoleRequestBody, + 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[RoleDetail]: + """Create role + + Creates a new role. + + :param role_request_body: (required) + :type role_request_body: RoleRequestBody + :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._create_role_serialize( + role_request_body=role_request_body, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "RoleDetail", + '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.admin.models, + ) + + + @validate_call + def create_role_without_preload_content( + self, + role_request_body: RoleRequestBody, + 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: + """Create role + + Creates a new role. + + :param role_request_body: (required) + :type role_request_body: RoleRequestBody + :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._create_role_serialize( + role_request_body=role_request_body, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "RoleDetail", + '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 _create_role_serialize( + self, + role_request_body, + 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 + if role_request_body is not None: + _body_params = role_request_body + + + # 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] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v7/roles', + 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 delete_role( + self, + id: Annotated[StrictStr, Field(description="The ID of the desired role.")], + 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, + ) -> None: + """Delete role + + Deletes a role using its ID. The user needs appropriate permissions to successfully call this endpoint. + + :param id: The ID of the desired role. (required) + :type 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 + 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._delete_role_serialize( + id=id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '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.admin.models, + ).data + + + @validate_call + def delete_role_with_http_info( + self, + id: Annotated[StrictStr, Field(description="The ID of the desired role.")], + 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[None]: + """Delete role + + Deletes a role using its ID. The user needs appropriate permissions to successfully call this endpoint. + + :param id: The ID of the desired role. (required) + :type 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 + 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._delete_role_serialize( + id=id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '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.admin.models, + ) + + + @validate_call + def delete_role_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="The ID of the desired role.")], + 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: + """Delete role + + Deletes a role using its ID. The user needs appropriate permissions to successfully call this endpoint. + + :param id: The ID of the desired role. (required) + :type 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 + 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._delete_role_serialize( + id=id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '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 _delete_role_serialize( + self, + id, + 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 + if id is not None: + _path_params['id'] = id + # 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/json', + 'application/problem+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v7/roles/{id}', + 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_role( + self, + id: Annotated[StrictStr, Field(description="The ID of the desired role.")], + 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, + ) -> RoleDetail: + """Retrieve role + + Returns detailed information about a role using its ID. + + :param id: The ID of the desired role. (required) + :type 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 + 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_role_serialize( + id=id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RoleDetail", + '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.admin.models, + ).data + + + @validate_call + def get_role_with_http_info( + self, + id: Annotated[StrictStr, Field(description="The ID of the desired role.")], + 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[RoleDetail]: + """Retrieve role + + Returns detailed information about a role using its ID. + + :param id: The ID of the desired role. (required) + :type 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 + 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_role_serialize( + id=id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RoleDetail", + '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.admin.models, + ) + + + @validate_call + def get_role_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="The ID of the desired role.")], + 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: + """Retrieve role + + Returns detailed information about a role using its ID. + + :param id: The ID of the desired role. (required) + :type 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 + 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_role_serialize( + id=id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RoleDetail", + '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_role_serialize( + self, + id, + 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 + if id is not None: + _path_params['id'] = id + # 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='/v7/roles/{id}', + 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_roles( + 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, + ) -> Roles: + """List roles + + Retrieves a list of defined roles visible to the current user. + + :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_roles_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': "Roles", + '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.admin.models, + ).data + + + @validate_call + def get_roles_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[Roles]: + """List roles + + Retrieves a list of defined roles visible to the current user. + + :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_roles_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': "Roles", + '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.admin.models, + ) + + + @validate_call + def get_roles_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 roles + + Retrieves a list of defined roles visible to the current user. + + :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_roles_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': "Roles", + '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_roles_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='/v7/roles', + 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 update_role( + self, + id: Annotated[StrictStr, Field(description="The ID of the desired role.")], + role_request_body: RoleRequestBody, + 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, + ) -> RoleDetail: + """Update role + + Updates a user-defined role using its ID. When updating a role, the following applies: * The full list of permissions must be sent, This endpoint does not support delta-based grant or revoking of permissions. * Permission definitions and details can be obtained from the Permissions endpoint. + + :param id: The ID of the desired role. (required) + :type id: str + :param role_request_body: (required) + :type role_request_body: RoleRequestBody + :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._update_role_serialize( + id=id, + role_request_body=role_request_body, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RoleDetail", + '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.admin.models, + ).data + + + @validate_call + def update_role_with_http_info( + self, + id: Annotated[StrictStr, Field(description="The ID of the desired role.")], + role_request_body: RoleRequestBody, + 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[RoleDetail]: + """Update role + + Updates a user-defined role using its ID. When updating a role, the following applies: * The full list of permissions must be sent, This endpoint does not support delta-based grant or revoking of permissions. * Permission definitions and details can be obtained from the Permissions endpoint. + + :param id: The ID of the desired role. (required) + :type id: str + :param role_request_body: (required) + :type role_request_body: RoleRequestBody + :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._update_role_serialize( + id=id, + role_request_body=role_request_body, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RoleDetail", + '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.admin.models, + ) + + + @validate_call + def update_role_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="The ID of the desired role.")], + role_request_body: RoleRequestBody, + 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: + """Update role + + Updates a user-defined role using its ID. When updating a role, the following applies: * The full list of permissions must be sent, This endpoint does not support delta-based grant or revoking of permissions. * Permission definitions and details can be obtained from the Permissions endpoint. + + :param id: The ID of the desired role. (required) + :type id: str + :param role_request_body: (required) + :type role_request_body: RoleRequestBody + :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._update_role_serialize( + id=id, + role_request_body=role_request_body, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RoleDetail", + '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 _update_role_serialize( + self, + id, + role_request_body, + 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 + if id is not None: + _path_params['id'] = id + # 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 + if role_request_body is not None: + _body_params = role_request_body + + + # 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] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/v7/roles/{id}', + 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 + ) + + diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/api/user_events_api.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/api/user_events_api.py new file mode 100644 index 00000000..420f0631 --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/api/user_events_api.py @@ -0,0 +1,429 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +import thousandeyes_sdk.admin.models + +from datetime import datetime +from pydantic import Field, StrictBool, StrictStr, field_validator +from typing import Optional +from typing_extensions import Annotated +from thousandeyes_sdk.admin.models.audit_user_events import AuditUserEvents + +from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized +from thousandeyes_sdk.client.api_response import ApiResponse +from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version + + +class UserEventsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) + self.api_client = api_client + + + @validate_call + def get_user_events( + 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, + use_all_permitted_aids: Annotated[Optional[StrictBool], Field(description="Set to `true` to load data from all accounts the user has access to.")] = 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, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = 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, + ) -> AuditUserEvents: + """List activity log events + + Returns a list of activity log events in the current account group. If `useAllPermittedAids=true` query parameter is passed and the user has permission `View activity log for all users in account group` the logs returned include events across all the account groups they belong to. For more information about changing the account group context, see [Account Context](https://developer.thousandeyes.com/v7/#/accountcontext). + + :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 use_all_permitted_aids: Set to `true` to load data from all accounts the user has access to. + :type use_all_permitted_aids: bool + :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 cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: 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_user_events_serialize( + aid=aid, + use_all_permitted_aids=use_all_permitted_aids, + window=window, + start_date=start_date, + end_date=end_date, + cursor=cursor, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AuditUserEvents", + '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.admin.models, + ).data + + + @validate_call + def get_user_events_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, + use_all_permitted_aids: Annotated[Optional[StrictBool], Field(description="Set to `true` to load data from all accounts the user has access to.")] = 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, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = 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[AuditUserEvents]: + """List activity log events + + Returns a list of activity log events in the current account group. If `useAllPermittedAids=true` query parameter is passed and the user has permission `View activity log for all users in account group` the logs returned include events across all the account groups they belong to. For more information about changing the account group context, see [Account Context](https://developer.thousandeyes.com/v7/#/accountcontext). + + :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 use_all_permitted_aids: Set to `true` to load data from all accounts the user has access to. + :type use_all_permitted_aids: bool + :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 cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: 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_user_events_serialize( + aid=aid, + use_all_permitted_aids=use_all_permitted_aids, + window=window, + start_date=start_date, + end_date=end_date, + cursor=cursor, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AuditUserEvents", + '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.admin.models, + ) + + + @validate_call + def get_user_events_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, + use_all_permitted_aids: Annotated[Optional[StrictBool], Field(description="Set to `true` to load data from all accounts the user has access to.")] = 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, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = 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 activity log events + + Returns a list of activity log events in the current account group. If `useAllPermittedAids=true` query parameter is passed and the user has permission `View activity log for all users in account group` the logs returned include events across all the account groups they belong to. For more information about changing the account group context, see [Account Context](https://developer.thousandeyes.com/v7/#/accountcontext). + + :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 use_all_permitted_aids: Set to `true` to load data from all accounts the user has access to. + :type use_all_permitted_aids: bool + :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 cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: 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_user_events_serialize( + aid=aid, + use_all_permitted_aids=use_all_permitted_aids, + window=window, + start_date=start_date, + end_date=end_date, + cursor=cursor, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AuditUserEvents", + '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_user_events_serialize( + self, + aid, + use_all_permitted_aids, + window, + start_date, + end_date, + cursor, + _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)) + + if use_all_permitted_aids is not None: + + _query_params.append(('useAllPermittedAids', use_all_permitted_aids)) + + 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 cursor is not None: + + _query_params.append(('cursor', cursor)) + + # 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='/v7/audit-user-events', + 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 + ) + + diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/api/users_api.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/api/users_api.py new file mode 100644 index 00000000..4ebd0723 --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/api/users_api.py @@ -0,0 +1,1556 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +import thousandeyes_sdk.admin.models + +from pydantic import Field, StrictStr +from typing import Optional +from typing_extensions import Annotated +from thousandeyes_sdk.admin.models.created_user import CreatedUser +from thousandeyes_sdk.admin.models.user_detail import UserDetail +from thousandeyes_sdk.admin.models.user_request import UserRequest +from thousandeyes_sdk.admin.models.users import Users + +from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized +from thousandeyes_sdk.client.api_response import ApiResponse +from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version + + +class UsersApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) + self.api_client = api_client + + + @validate_call + def create_user( + self, + user_request: UserRequest, + 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, + ) -> CreatedUser: + """Create user + + Creates a new user. The following applies when creating a user: * If the user is already a member of another ThousandEyes customer organization, the user must set their own login account group. * Any update that includes `accountGroupRoles` is a replace-based update and not a delta-based update. + + :param user_request: (required) + :type user_request: UserRequest + :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._create_user_serialize( + user_request=user_request, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreatedUser", + '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.admin.models, + ).data + + + @validate_call + def create_user_with_http_info( + self, + user_request: UserRequest, + 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[CreatedUser]: + """Create user + + Creates a new user. The following applies when creating a user: * If the user is already a member of another ThousandEyes customer organization, the user must set their own login account group. * Any update that includes `accountGroupRoles` is a replace-based update and not a delta-based update. + + :param user_request: (required) + :type user_request: UserRequest + :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._create_user_serialize( + user_request=user_request, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreatedUser", + '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.admin.models, + ) + + + @validate_call + def create_user_without_preload_content( + self, + user_request: UserRequest, + 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: + """Create user + + Creates a new user. The following applies when creating a user: * If the user is already a member of another ThousandEyes customer organization, the user must set their own login account group. * Any update that includes `accountGroupRoles` is a replace-based update and not a delta-based update. + + :param user_request: (required) + :type user_request: UserRequest + :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._create_user_serialize( + user_request=user_request, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreatedUser", + '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 _create_user_serialize( + self, + user_request, + 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 + if user_request is not None: + _body_params = user_request + + + # 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] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v7/users', + 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 delete_user( + self, + id: Annotated[StrictStr, Field(description="Identifier for the user.")], + 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, + ) -> None: + """Delete user + + Deletes a user using the user ID. This endpoint requires the `Edit users in all account groups` or `Edit users` permission. + + :param id: Identifier for the user. (required) + :type 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 + 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._delete_user_serialize( + id=id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '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.admin.models, + ).data + + + @validate_call + def delete_user_with_http_info( + self, + id: Annotated[StrictStr, Field(description="Identifier for the user.")], + 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[None]: + """Delete user + + Deletes a user using the user ID. This endpoint requires the `Edit users in all account groups` or `Edit users` permission. + + :param id: Identifier for the user. (required) + :type 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 + 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._delete_user_serialize( + id=id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '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.admin.models, + ) + + + @validate_call + def delete_user_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="Identifier for the user.")], + 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: + """Delete user + + Deletes a user using the user ID. This endpoint requires the `Edit users in all account groups` or `Edit users` permission. + + :param id: Identifier for the user. (required) + :type 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 + 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._delete_user_serialize( + id=id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '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 _delete_user_serialize( + self, + id, + 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 + if id is not None: + _path_params['id'] = id + # 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/json', + 'application/problem+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v7/users/{id}', + 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_user( + self, + id: Annotated[StrictStr, Field(description="Identifier for the user.")], + 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, + ) -> UserDetail: + """Retrieve user + + Retrieves detailed information about a user. This operation requires the `API Access` and `View All Users` permissions. + + :param id: Identifier for the user. (required) + :type 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 + 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_user_serialize( + id=id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserDetail", + '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.admin.models, + ).data + + + @validate_call + def get_user_with_http_info( + self, + id: Annotated[StrictStr, Field(description="Identifier for the user.")], + 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[UserDetail]: + """Retrieve user + + Retrieves detailed information about a user. This operation requires the `API Access` and `View All Users` permissions. + + :param id: Identifier for the user. (required) + :type 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 + 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_user_serialize( + id=id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserDetail", + '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.admin.models, + ) + + + @validate_call + def get_user_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="Identifier for the user.")], + 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: + """Retrieve user + + Retrieves detailed information about a user. This operation requires the `API Access` and `View All Users` permissions. + + :param id: Identifier for the user. (required) + :type 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 + 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_user_serialize( + id=id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserDetail", + '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_user_serialize( + self, + id, + 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 + if id is not None: + _path_params['id'] = id + # 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='/v7/users/{id}', + 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_users( + 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, + ) -> Users: + """List users + + Retrieves a list of users in the organization the account group ID belongs to. This operation requires the `API Access` and `View all users` permissions. See [Account Context](https://developer.thousandeyes.com/v7/#/accountcontext) for more information on changing the account group context. + + :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_users_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': "Users", + '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.admin.models, + ).data + + + @validate_call + def get_users_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[Users]: + """List users + + Retrieves a list of users in the organization the account group ID belongs to. This operation requires the `API Access` and `View all users` permissions. See [Account Context](https://developer.thousandeyes.com/v7/#/accountcontext) for more information on changing the account group context. + + :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_users_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': "Users", + '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.admin.models, + ) + + + @validate_call + def get_users_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 users + + Retrieves a list of users in the organization the account group ID belongs to. This operation requires the `API Access` and `View all users` permissions. See [Account Context](https://developer.thousandeyes.com/v7/#/accountcontext) for more information on changing the account group context. + + :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_users_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': "Users", + '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_users_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='/v7/users', + 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 update_user( + self, + id: Annotated[StrictStr, Field(description="Identifier for the user.")], + user_request: UserRequest, + 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, + ) -> UserDetail: + """Update user + + Updates a user using the user ID. You can update the user name, email address, account group assignments, or roles. This endpoint requires the `Edit users in all account groups` or `Edit users` permission. When updating a user, the following applies: * When updating a user's email address, the user must confirm the username change before they can subsequently log in or perform API operations. * Any update that includes `accountGroupRoles` is a replace-based update and not a delta-based update. + + :param id: Identifier for the user. (required) + :type id: str + :param user_request: (required) + :type user_request: UserRequest + :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._update_user_serialize( + id=id, + user_request=user_request, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserDetail", + '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.admin.models, + ).data + + + @validate_call + def update_user_with_http_info( + self, + id: Annotated[StrictStr, Field(description="Identifier for the user.")], + user_request: UserRequest, + 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[UserDetail]: + """Update user + + Updates a user using the user ID. You can update the user name, email address, account group assignments, or roles. This endpoint requires the `Edit users in all account groups` or `Edit users` permission. When updating a user, the following applies: * When updating a user's email address, the user must confirm the username change before they can subsequently log in or perform API operations. * Any update that includes `accountGroupRoles` is a replace-based update and not a delta-based update. + + :param id: Identifier for the user. (required) + :type id: str + :param user_request: (required) + :type user_request: UserRequest + :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._update_user_serialize( + id=id, + user_request=user_request, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserDetail", + '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.admin.models, + ) + + + @validate_call + def update_user_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="Identifier for the user.")], + user_request: UserRequest, + 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: + """Update user + + Updates a user using the user ID. You can update the user name, email address, account group assignments, or roles. This endpoint requires the `Edit users in all account groups` or `Edit users` permission. When updating a user, the following applies: * When updating a user's email address, the user must confirm the username change before they can subsequently log in or perform API operations. * Any update that includes `accountGroupRoles` is a replace-based update and not a delta-based update. + + :param id: Identifier for the user. (required) + :type id: str + :param user_request: (required) + :type user_request: UserRequest + :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._update_user_serialize( + id=id, + user_request=user_request, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserDetail", + '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 _update_user_serialize( + self, + id, + user_request, + 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 + if id is not None: + _path_params['id'] = id + # 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 + if user_request is not None: + _body_params = user_request + + + # 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] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/v7/users/{id}', + 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 + ) + + diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/__init__.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/__init__.py new file mode 100644 index 00000000..727bdd19 --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/__init__.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +# flake8: noqa +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import models into model package +from thousandeyes_sdk.admin.models.account_group import AccountGroup +from thousandeyes_sdk.admin.models.account_group_detail import AccountGroupDetail +from thousandeyes_sdk.admin.models.account_group_info import AccountGroupInfo +from thousandeyes_sdk.admin.models.account_group_request import AccountGroupRequest +from thousandeyes_sdk.admin.models.account_group_role import AccountGroupRole +from thousandeyes_sdk.admin.models.account_groups import AccountGroups +from thousandeyes_sdk.admin.models.agent import Agent +from thousandeyes_sdk.admin.models.agent_base import AgentBase +from thousandeyes_sdk.admin.models.audit_user_events import AuditUserEvents +from thousandeyes_sdk.admin.models.base_role import BaseRole +from thousandeyes_sdk.admin.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType +from thousandeyes_sdk.admin.models.cluster_member import ClusterMember +from thousandeyes_sdk.admin.models.created_account_group import CreatedAccountGroup +from thousandeyes_sdk.admin.models.created_user import CreatedUser +from thousandeyes_sdk.admin.models.enterprise_agent import EnterpriseAgent +from thousandeyes_sdk.admin.models.enterprise_agent_data import EnterpriseAgentData +from thousandeyes_sdk.admin.models.enterprise_agent_ipv6_policy import EnterpriseAgentIpv6Policy +from thousandeyes_sdk.admin.models.enterprise_agent_state import EnterpriseAgentState +from thousandeyes_sdk.admin.models.error import Error +from thousandeyes_sdk.admin.models.error_detail import ErrorDetail +from thousandeyes_sdk.admin.models.error_detail_code import ErrorDetailCode +from thousandeyes_sdk.admin.models.expand import Expand +from thousandeyes_sdk.admin.models.extended_user import ExtendedUser +from thousandeyes_sdk.admin.models.interface_ip_mapping import InterfaceIpMapping +from thousandeyes_sdk.admin.models.link import Link +from thousandeyes_sdk.admin.models.pagination_links import PaginationLinks +from thousandeyes_sdk.admin.models.permission import Permission +from thousandeyes_sdk.admin.models.permissions import Permissions +from thousandeyes_sdk.admin.models.resource import Resource +from thousandeyes_sdk.admin.models.role import Role +from thousandeyes_sdk.admin.models.role_detail import RoleDetail +from thousandeyes_sdk.admin.models.role_request_body import RoleRequestBody +from thousandeyes_sdk.admin.models.roles import Roles +from thousandeyes_sdk.admin.models.self_links import SelfLinks +from thousandeyes_sdk.admin.models.simple_agent import SimpleAgent +from thousandeyes_sdk.admin.models.unauthorized_error import UnauthorizedError +from thousandeyes_sdk.admin.models.user import User +from thousandeyes_sdk.admin.models.user_account_group import UserAccountGroup +from thousandeyes_sdk.admin.models.user_account_group_role import UserAccountGroupRole +from thousandeyes_sdk.admin.models.user_detail import UserDetail +from thousandeyes_sdk.admin.models.user_event import UserEvent +from thousandeyes_sdk.admin.models.user_request import UserRequest +from thousandeyes_sdk.admin.models.users import Users +from thousandeyes_sdk.admin.models.validation_error import ValidationError +from thousandeyes_sdk.admin.models.validation_error_item import ValidationErrorItem diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/account_group.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/account_group.py new file mode 100644 index 00000000..230ad6ec --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/account_group.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + 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 AccountGroup(BaseModel): + """ + AccountGroup + """ # noqa: E501 + aid: Optional[StrictStr] = Field(default=None, description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint.") + account_group_name: Optional[StrictStr] = Field(default=None, description="Account group name", alias="accountGroupName") + __properties: ClassVar[List[str]] = ["aid", "accountGroupName"] + + 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 AccountGroup 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 AccountGroup from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "aid": obj.get("aid"), + "accountGroupName": obj.get("accountGroupName") + }) + return _obj + + diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/account_group_detail.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/account_group_detail.py new file mode 100644 index 00000000..5471b8da --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/account_group_detail.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + 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.admin.models.enterprise_agent import EnterpriseAgent +from thousandeyes_sdk.admin.models.self_links import SelfLinks +from thousandeyes_sdk.admin.models.user_account_group import UserAccountGroup +from typing import Optional, Set +from typing_extensions import Self + +class AccountGroupDetail(BaseModel): + """ + AccountGroupDetail + """ # noqa: E501 + aid: Optional[StrictStr] = Field(default=None, description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint.") + account_group_name: Optional[StrictStr] = Field(default=None, description="Account group name", alias="accountGroupName") + is_current_account_group: Optional[StrictBool] = Field(default=None, description="Indicates whether the requested aid is the context of the current account.", alias="isCurrentAccountGroup") + is_default_account_group: Optional[StrictBool] = Field(default=None, description="Indicates whether the aid is the default one for the requesting user.", alias="isDefaultAccountGroup") + organization_name: Optional[StrictStr] = Field(default=None, description="(Optional) Indicates whether the aid is the default one for the requesting user.", alias="organizationName") + users: Optional[List[UserAccountGroup]] = None + links: Optional[SelfLinks] = Field(default=None, alias="_links") + agents: Optional[List[EnterpriseAgent]] = None + __properties: ClassVar[List[str]] = ["aid", "accountGroupName", "isCurrentAccountGroup", "isDefaultAccountGroup", "organizationName", "users", "_links", "agents"] + + 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 AccountGroupDetail 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 each item in users (list) + _items = [] + if self.users: + for _item in self.users: + if _item: + _items.append(_item.to_dict()) + _dict['users'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in agents (list) + _items = [] + if self.agents: + for _item in self.agents: + if _item: + _items.append(_item.to_dict()) + _dict['agents'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AccountGroupDetail from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "aid": obj.get("aid"), + "accountGroupName": obj.get("accountGroupName"), + "isCurrentAccountGroup": obj.get("isCurrentAccountGroup"), + "isDefaultAccountGroup": obj.get("isDefaultAccountGroup"), + "organizationName": obj.get("organizationName"), + "users": [UserAccountGroup.from_dict(_item) for _item in obj["users"]] if obj.get("users") is not None else None, + "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "agents": [EnterpriseAgent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None + }) + return _obj + + diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/account_group_info.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/account_group_info.py new file mode 100644 index 00000000..85f0febc --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/account_group_info.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + 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 import Optional, Set +from typing_extensions import Self + +class AccountGroupInfo(BaseModel): + """ + AccountGroupInfo + """ # noqa: E501 + aid: Optional[StrictStr] = Field(default=None, description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint.") + account_group_name: Optional[StrictStr] = Field(default=None, description="Account group name", alias="accountGroupName") + is_current_account_group: Optional[StrictBool] = Field(default=None, description="Indicates whether the requested aid is the context of the current account.", alias="isCurrentAccountGroup") + is_default_account_group: Optional[StrictBool] = Field(default=None, description="Indicates whether the aid is the default one for the requesting user.", alias="isDefaultAccountGroup") + organization_name: Optional[StrictStr] = Field(default=None, description="(Optional) Indicates whether the aid is the default one for the requesting user.", alias="organizationName") + __properties: ClassVar[List[str]] = ["aid", "accountGroupName", "isCurrentAccountGroup", "isDefaultAccountGroup", "organizationName"] + + 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 AccountGroupInfo 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 AccountGroupInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "aid": obj.get("aid"), + "accountGroupName": obj.get("accountGroupName"), + "isCurrentAccountGroup": obj.get("isCurrentAccountGroup"), + "isDefaultAccountGroup": obj.get("isDefaultAccountGroup"), + "organizationName": obj.get("organizationName") + }) + return _obj + + diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/account_group_request.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/account_group_request.py new file mode 100644 index 00000000..c0144026 --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/account_group_request.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + 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 AccountGroupRequest(BaseModel): + """ + AccountGroupRequest + """ # noqa: E501 + account_group_name: StrictStr = Field(description="The name of the account group", alias="accountGroupName") + agents: Optional[List[StrictStr]] = Field(default=None, description="To grant access to enterprise agents, specify the agent list. Note that this is not an additive list - the full list must be specified if changing access to agents.") + __properties: ClassVar[List[str]] = ["accountGroupName", "agents"] + + 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 AccountGroupRequest 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 AccountGroupRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "accountGroupName": obj.get("accountGroupName"), + "agents": obj.get("agents") + }) + return _obj + + diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/account_group_role.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/account_group_role.py new file mode 100644 index 00000000..2a9ce27d --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/account_group_role.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + 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.admin.models.account_group import AccountGroup +from thousandeyes_sdk.admin.models.role import Role +from typing import Optional, Set +from typing_extensions import Self + +class AccountGroupRole(BaseModel): + """ + AccountGroupRole + """ # noqa: E501 + account_group: Optional[AccountGroup] = Field(default=None, alias="accountGroup") + roles: Optional[List[Role]] = None + __properties: ClassVar[List[str]] = ["accountGroup", "roles"] + + 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 AccountGroupRole 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 account_group + if self.account_group: + _dict['accountGroup'] = self.account_group.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in roles (list) + _items = [] + if self.roles: + for _item in self.roles: + if _item: + _items.append(_item.to_dict()) + _dict['roles'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AccountGroupRole from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "accountGroup": AccountGroup.from_dict(obj["accountGroup"]) if obj.get("accountGroup") is not None else None, + "roles": [Role.from_dict(_item) for _item in obj["roles"]] if obj.get("roles") is not None else None + }) + return _obj + + diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/account_groups.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/account_groups.py new file mode 100644 index 00000000..df725422 --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/account_groups.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + 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.admin.models.account_group_info import AccountGroupInfo +from thousandeyes_sdk.admin.models.self_links import SelfLinks +from typing import Optional, Set +from typing_extensions import Self + +class AccountGroups(BaseModel): + """ + AccountGroups + """ # noqa: E501 + account_groups: Optional[List[AccountGroupInfo]] = Field(default=None, alias="accountGroups") + links: Optional[SelfLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["accountGroups", "_links"] + + 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 AccountGroups 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 each item in account_groups (list) + _items = [] + if self.account_groups: + for _item in self.account_groups: + if _item: + _items.append(_item.to_dict()) + _dict['accountGroups'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AccountGroups from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "accountGroups": [AccountGroupInfo.from_dict(_item) for _item in obj["accountGroups"]] if obj.get("accountGroups") is not None else None, + "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/agent.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/agent.py new file mode 100644 index 00000000..2d478529 --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/agent.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + 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.admin.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType +from typing import Optional, Set +from typing_extensions import Self + +class Agent(BaseModel): + """ + Agent + """ # noqa: E501 + 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") + enabled: Optional[StrictBool] = Field(default=None, description="Flag indicating if the agent is enabled.") + prefix: Optional[StrictStr] = Field(default=None, description="Prefix containing agents public IP address.") + 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") + agent_type: CloudEnterpriseAgentType = Field(alias="agentType") + __properties: ClassVar[List[str]] = ["ipAddresses", "publicIpAddresses", "network", "agentId", "agentName", "location", "countryId", "enabled", "prefix", "verifySslCertificates", "agentType"] + + 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 Agent 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. + """ + excluded_fields: Set[str] = set([ + "ip_addresses", + "public_ip_addresses", + "network", + "agent_id", + "location", + "country_id", + "prefix", + "verify_ssl_certificates", + ]) + + _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 Agent from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "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"), + "enabled": obj.get("enabled"), + "prefix": obj.get("prefix"), + "verifySslCertificates": obj.get("verifySslCertificates"), + "agentType": obj.get("agentType") + }) + return _obj + + diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/agent_base.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/agent_base.py new file mode 100644 index 00000000..d62e0ece --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/agent_base.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + 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 AgentBase(BaseModel): + """ + AgentBase + """ # noqa: E501 + 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.") + __properties: ClassVar[List[str]] = ["ipAddresses", "publicIpAddresses", "network"] + + 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 AgentBase 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. + """ + excluded_fields: Set[str] = set([ + "ip_addresses", + "public_ip_addresses", + "network", + ]) + + _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 AgentBase from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ipAddresses": obj.get("ipAddresses"), + "publicIpAddresses": obj.get("publicIpAddresses"), + "network": obj.get("network") + }) + return _obj + + diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/audit_user_events.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/audit_user_events.py new file mode 100644 index 00000000..b2e6ec72 --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/audit_user_events.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + 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 +from typing import Any, ClassVar, Dict, List, Optional +from thousandeyes_sdk.admin.models.pagination_links import PaginationLinks +from thousandeyes_sdk.admin.models.user_event import UserEvent +from typing import Optional, Set +from typing_extensions import Self + +class AuditUserEvents(BaseModel): + """ + AuditUserEvents + """ # noqa: E501 + audit_events: Optional[List[UserEvent]] = Field(default=None, alias="auditEvents") + 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[PaginationLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["auditEvents", "startDate", "endDate", "_links"] + + 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 AuditUserEvents from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "start_date", + "end_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 each item in audit_events (list) + _items = [] + if self.audit_events: + for _item in self.audit_events: + if _item: + _items.append(_item.to_dict()) + _dict['auditEvents'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AuditUserEvents from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "auditEvents": [UserEvent.from_dict(_item) for _item in obj["auditEvents"]] if obj.get("auditEvents") is not None else None, + "startDate": obj.get("startDate"), + "endDate": obj.get("endDate"), + "_links": PaginationLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/base_role.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/base_role.py new file mode 100644 index 00000000..1b10da70 --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/base_role.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + 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 import Optional, Set +from typing_extensions import Self + +class BaseRole(BaseModel): + """ + BaseRole + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="Name of the role.") + role_id: Optional[StrictStr] = Field(default=None, description="Unique ID representing the role.", alias="roleId") + is_builtin: Optional[StrictBool] = Field(default=None, description="Flag indicating if the role is built-in (Account Admin, Organization Admin, Regular User).", alias="isBuiltin") + __properties: ClassVar[List[str]] = ["name", "roleId", "isBuiltin"] + + 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 BaseRole 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 BaseRole 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"), + "roleId": obj.get("roleId"), + "isBuiltin": obj.get("isBuiltin") + }) + return _obj + + diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/cloud_enterprise_agent_type.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/cloud_enterprise_agent_type.py new file mode 100644 index 00000000..cf35f086 --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/cloud_enterprise_agent_type.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + 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 CloudEnterpriseAgentType(str, Enum): + """ + Type of the agent. + """ + + """ + allowed enum values + """ + CLOUD = 'cloud' + ENTERPRISE_MINUS_CLUSTER = 'enterprise-cluster' + ENTERPRISE = 'enterprise' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of CloudEnterpriseAgentType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/cluster_member.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/cluster_member.py new file mode 100644 index 00000000..9ef75a00 --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/cluster_member.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from thousandeyes_sdk.admin.models.enterprise_agent_state import EnterpriseAgentState +from thousandeyes_sdk.admin.models.error_detail import ErrorDetail +from typing import Optional, Set +from typing_extensions import Self + +class ClusterMember(BaseModel): + """ + ClusterMember + """ # noqa: E501 + 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.") + member_id: Optional[StrictStr] = Field(default=None, description="Unique ID of the cluster member", alias="memberId") + name: Optional[StrictStr] = Field(default=None, description="Name of the cluster member") + error_details: Optional[List[ErrorDetail]] = Field(default=None, description="If an enterprise agent or a cluster member presents at least one error, the errors will be shown as an array of entries in the errorDetails field (Enterprise Agents and Enterprise Cluster members only)", alias="errorDetails") + last_seen: Optional[datetime] = Field(default=None, description="UTC last seen date (ISO date-time format).", alias="lastSeen") + agent_state: Optional[EnterpriseAgentState] = Field(default=None, alias="agentState") + target_for_tests: Optional[StrictStr] = Field(default=None, description="Test target IP address.", alias="targetForTests") + utilization: Optional[StrictInt] = Field(default=None, description="Shows overall utilization percentage (online Enterprise Agents and Enterprise Clusters only).") + __properties: ClassVar[List[str]] = ["ipAddresses", "publicIpAddresses", "network", "memberId", "name", "errorDetails", "lastSeen", "agentState", "targetForTests", "utilization"] + + 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 ClusterMember 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. + """ + excluded_fields: Set[str] = set([ + "ip_addresses", + "public_ip_addresses", + "network", + "member_id", + "name", + "error_details", + "last_seen", + "utilization", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in error_details (list) + _items = [] + if self.error_details: + for _item in self.error_details: + if _item: + _items.append(_item.to_dict()) + _dict['errorDetails'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClusterMember from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ipAddresses": obj.get("ipAddresses"), + "publicIpAddresses": obj.get("publicIpAddresses"), + "network": obj.get("network"), + "memberId": obj.get("memberId"), + "name": obj.get("name"), + "errorDetails": [ErrorDetail.from_dict(_item) for _item in obj["errorDetails"]] if obj.get("errorDetails") is not None else None, + "lastSeen": obj.get("lastSeen"), + "agentState": obj.get("agentState"), + "targetForTests": obj.get("targetForTests"), + "utilization": obj.get("utilization") + }) + return _obj + + diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/created_account_group.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/created_account_group.py new file mode 100644 index 00000000..056a51c3 --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/created_account_group.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + 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.admin.models.self_links import SelfLinks +from thousandeyes_sdk.admin.models.user_account_group import UserAccountGroup +from typing import Optional, Set +from typing_extensions import Self + +class CreatedAccountGroup(BaseModel): + """ + CreatedAccountGroup + """ # noqa: E501 + aid: Optional[StrictStr] = Field(default=None, description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint.") + account_group_name: Optional[StrictStr] = Field(default=None, description="Account group name", alias="accountGroupName") + is_current_account_group: Optional[StrictBool] = Field(default=None, description="Indicates whether the requested aid is the context of the current account.", alias="isCurrentAccountGroup") + is_default_account_group: Optional[StrictBool] = Field(default=None, description="Indicates whether the aid is the default one for the requesting user.", alias="isDefaultAccountGroup") + organization_name: Optional[StrictStr] = Field(default=None, description="(Optional) Indicates whether the aid is the default one for the requesting user.", alias="organizationName") + users: Optional[List[UserAccountGroup]] = None + links: Optional[SelfLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["aid", "accountGroupName", "isCurrentAccountGroup", "isDefaultAccountGroup", "organizationName", "users", "_links"] + + 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 CreatedAccountGroup 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 each item in users (list) + _items = [] + if self.users: + for _item in self.users: + if _item: + _items.append(_item.to_dict()) + _dict['users'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreatedAccountGroup from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "aid": obj.get("aid"), + "accountGroupName": obj.get("accountGroupName"), + "isCurrentAccountGroup": obj.get("isCurrentAccountGroup"), + "isDefaultAccountGroup": obj.get("isDefaultAccountGroup"), + "organizationName": obj.get("organizationName"), + "users": [UserAccountGroup.from_dict(_item) for _item in obj["users"]] if obj.get("users") is not None else None, + "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/created_user.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/created_user.py new file mode 100644 index 00000000..7f1467dd --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/created_user.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from thousandeyes_sdk.admin.models.account_group import AccountGroup +from thousandeyes_sdk.admin.models.account_group_role import AccountGroupRole +from thousandeyes_sdk.admin.models.role import Role +from thousandeyes_sdk.admin.models.self_links import SelfLinks +from typing import Optional, Set +from typing_extensions import Self + +class CreatedUser(BaseModel): + """ + CreatedUser + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="User's display name.") + email: Optional[StrictStr] = Field(default=None, description="User's email address.") + uid: Optional[StrictStr] = Field(default=None, description="Unique ID of the user.") + date_registered: Optional[datetime] = Field(default=None, description="UTC date the user registered their account (ISO date-time format).", alias="dateRegistered") + login_account_group: Optional[AccountGroup] = Field(default=None, alias="loginAccountGroup") + account_group_roles: Optional[List[AccountGroupRole]] = Field(default=None, alias="accountGroupRoles") + all_account_group_roles: Optional[List[Role]] = Field(default=None, alias="allAccountGroupRoles") + links: Optional[SelfLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["name", "email", "uid", "dateRegistered", "loginAccountGroup", "accountGroupRoles", "allAccountGroupRoles", "_links"] + + 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 CreatedUser 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 login_account_group + if self.login_account_group: + _dict['loginAccountGroup'] = self.login_account_group.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in account_group_roles (list) + _items = [] + if self.account_group_roles: + for _item in self.account_group_roles: + if _item: + _items.append(_item.to_dict()) + _dict['accountGroupRoles'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in all_account_group_roles (list) + _items = [] + if self.all_account_group_roles: + for _item in self.all_account_group_roles: + if _item: + _items.append(_item.to_dict()) + _dict['allAccountGroupRoles'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreatedUser 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"), + "email": obj.get("email"), + "uid": obj.get("uid"), + "dateRegistered": obj.get("dateRegistered"), + "loginAccountGroup": AccountGroup.from_dict(obj["loginAccountGroup"]) if obj.get("loginAccountGroup") is not None else None, + "accountGroupRoles": [AccountGroupRole.from_dict(_item) for _item in obj["accountGroupRoles"]] if obj.get("accountGroupRoles") is not None else None, + "allAccountGroupRoles": [Role.from_dict(_item) for _item in obj["allAccountGroupRoles"]] if obj.get("allAccountGroupRoles") is not None else None, + "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/enterprise_agent.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/enterprise_agent.py new file mode 100644 index 00000000..a33f97f6 --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/enterprise_agent.py @@ -0,0 +1,200 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from thousandeyes_sdk.admin.models.account_group import AccountGroup +from thousandeyes_sdk.admin.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType +from thousandeyes_sdk.admin.models.cluster_member import ClusterMember +from thousandeyes_sdk.admin.models.enterprise_agent_ipv6_policy import EnterpriseAgentIpv6Policy +from thousandeyes_sdk.admin.models.enterprise_agent_state import EnterpriseAgentState +from thousandeyes_sdk.admin.models.error_detail import ErrorDetail +from thousandeyes_sdk.admin.models.interface_ip_mapping import InterfaceIpMapping +from typing import Optional, Set +from typing_extensions import Self + +class EnterpriseAgent(BaseModel): + """ + EnterpriseAgent + """ # 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") + enabled: Optional[StrictBool] = Field(default=None, description="Flag indicating if the agent is enabled.") + prefix: Optional[StrictStr] = Field(default=None, description="Prefix containing agents public IP address.") + 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") + cluster_members: Optional[List[ClusterMember]] = Field(default=None, description="If an enterprise agent is clustered, detailed information about each cluster member will be shown as array entries in the clusterMembers field. This field is not shown for Enterprise Agents in standalone mode, or for Cloud Agents.", alias="clusterMembers") + utilization: Optional[StrictInt] = Field(default=None, description="Shows overall utilization percentage (online Enterprise Agents and Enterprise Clusters only).") + account_groups: Optional[List[AccountGroup]] = Field(default=None, description="List of account groups. See /accounts-groups to pull a list of account IDs", alias="accountGroups") + ipv6_policy: Optional[EnterpriseAgentIpv6Policy] = Field(default=None, alias="ipv6Policy") + error_details: Optional[List[ErrorDetail]] = Field(default=None, description="If an enterprise agent or a cluster member presents at least one error, the errors will be shown as an array of entries in the errorDetails field (Enterprise Agents and Enterprise Cluster members only)", alias="errorDetails") + hostname: Optional[StrictStr] = Field(default=None, description="Fully qualified domain name of the agent (Enterprise Agents only)") + last_seen: Optional[datetime] = Field(default=None, description="UTC last seen date (ISO date-time format).", alias="lastSeen") + agent_state: Optional[EnterpriseAgentState] = Field(default=None, alias="agentState") + keep_browser_cache: Optional[StrictBool] = Field(default=None, description="Flag indicating if the agent retains cache.", alias="keepBrowserCache") + created_date: Optional[datetime] = Field(default=None, description="UTC Agent creation date (ISO date-time format).", alias="createdDate") + target_for_tests: Optional[StrictStr] = Field(default=None, description="Test target IP address.", alias="targetForTests") + local_resolution_prefixes: Optional[List[StrictStr]] = Field(default=None, description="To perform rDNS lookups for public IP ranges, this field represents the public IP ranges. The range must be in CIDR notation; for example, 10.1.1.0/24. Maximum of 5 prefixes allowed (Enterprise Agents and Enterprise Agent clusters only).", alias="localResolutionPrefixes") + interface_ip_mappings: Optional[List[InterfaceIpMapping]] = Field(default=None, alias="interfaceIpMappings") + __properties: ClassVar[List[str]] = ["agentType", "ipAddresses", "publicIpAddresses", "network", "agentId", "agentName", "location", "countryId", "enabled", "prefix", "verifySslCertificates", "clusterMembers", "utilization", "accountGroups", "ipv6Policy", "errorDetails", "hostname", "lastSeen", "agentState", "keepBrowserCache", "createdDate", "targetForTests", "localResolutionPrefixes", "interfaceIpMappings"] + + 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 EnterpriseAgent 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. + * 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", + "prefix", + "verify_ssl_certificates", + "cluster_members", + "utilization", + "error_details", + "hostname", + "last_seen", + "created_date", + "interface_ip_mappings", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in cluster_members (list) + _items = [] + if self.cluster_members: + for _item in self.cluster_members: + if _item: + _items.append(_item.to_dict()) + _dict['clusterMembers'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in account_groups (list) + _items = [] + if self.account_groups: + for _item in self.account_groups: + if _item: + _items.append(_item.to_dict()) + _dict['accountGroups'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in error_details (list) + _items = [] + if self.error_details: + for _item in self.error_details: + if _item: + _items.append(_item.to_dict()) + _dict['errorDetails'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in interface_ip_mappings (list) + _items = [] + if self.interface_ip_mappings: + for _item in self.interface_ip_mappings: + if _item: + _items.append(_item.to_dict()) + _dict['interfaceIpMappings'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EnterpriseAgent 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"), + "enabled": obj.get("enabled"), + "prefix": obj.get("prefix"), + "verifySslCertificates": obj.get("verifySslCertificates"), + "clusterMembers": [ClusterMember.from_dict(_item) for _item in obj["clusterMembers"]] if obj.get("clusterMembers") is not None else None, + "utilization": obj.get("utilization"), + "accountGroups": [AccountGroup.from_dict(_item) for _item in obj["accountGroups"]] if obj.get("accountGroups") is not None else None, + "ipv6Policy": obj.get("ipv6Policy"), + "errorDetails": [ErrorDetail.from_dict(_item) for _item in obj["errorDetails"]] if obj.get("errorDetails") is not None else None, + "hostname": obj.get("hostname"), + "lastSeen": obj.get("lastSeen"), + "agentState": obj.get("agentState"), + "keepBrowserCache": obj.get("keepBrowserCache"), + "createdDate": obj.get("createdDate"), + "targetForTests": obj.get("targetForTests"), + "localResolutionPrefixes": obj.get("localResolutionPrefixes"), + "interfaceIpMappings": [InterfaceIpMapping.from_dict(_item) for _item in obj["interfaceIpMappings"]] if obj.get("interfaceIpMappings") is not None else None + }) + return _obj + + diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/enterprise_agent_data.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/enterprise_agent_data.py new file mode 100644 index 00000000..bf73d135 --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/enterprise_agent_data.py @@ -0,0 +1,161 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from thousandeyes_sdk.admin.models.account_group import AccountGroup +from thousandeyes_sdk.admin.models.cluster_member import ClusterMember +from thousandeyes_sdk.admin.models.enterprise_agent_ipv6_policy import EnterpriseAgentIpv6Policy +from thousandeyes_sdk.admin.models.enterprise_agent_state import EnterpriseAgentState +from thousandeyes_sdk.admin.models.error_detail import ErrorDetail +from thousandeyes_sdk.admin.models.interface_ip_mapping import InterfaceIpMapping +from typing import Optional, Set +from typing_extensions import Self + +class EnterpriseAgentData(BaseModel): + """ + EnterpriseAgentData + """ # noqa: E501 + cluster_members: Optional[List[ClusterMember]] = Field(default=None, description="If an enterprise agent is clustered, detailed information about each cluster member will be shown as array entries in the clusterMembers field. This field is not shown for Enterprise Agents in standalone mode, or for Cloud Agents.", alias="clusterMembers") + utilization: Optional[StrictInt] = Field(default=None, description="Shows overall utilization percentage (online Enterprise Agents and Enterprise Clusters only).") + account_groups: Optional[List[AccountGroup]] = Field(default=None, description="List of account groups. See /accounts-groups to pull a list of account IDs", alias="accountGroups") + ipv6_policy: Optional[EnterpriseAgentIpv6Policy] = Field(default=None, alias="ipv6Policy") + error_details: Optional[List[ErrorDetail]] = Field(default=None, description="If an enterprise agent or a cluster member presents at least one error, the errors will be shown as an array of entries in the errorDetails field (Enterprise Agents and Enterprise Cluster members only)", alias="errorDetails") + hostname: Optional[StrictStr] = Field(default=None, description="Fully qualified domain name of the agent (Enterprise Agents only)") + last_seen: Optional[datetime] = Field(default=None, description="UTC last seen date (ISO date-time format).", alias="lastSeen") + agent_state: Optional[EnterpriseAgentState] = Field(default=None, alias="agentState") + keep_browser_cache: Optional[StrictBool] = Field(default=None, description="Flag indicating if the agent retains cache.", alias="keepBrowserCache") + created_date: Optional[datetime] = Field(default=None, description="UTC Agent creation date (ISO date-time format).", alias="createdDate") + target_for_tests: Optional[StrictStr] = Field(default=None, description="Test target IP address.", alias="targetForTests") + local_resolution_prefixes: Optional[List[StrictStr]] = Field(default=None, description="To perform rDNS lookups for public IP ranges, this field represents the public IP ranges. The range must be in CIDR notation; for example, 10.1.1.0/24. Maximum of 5 prefixes allowed (Enterprise Agents and Enterprise Agent clusters only).", alias="localResolutionPrefixes") + interface_ip_mappings: Optional[List[InterfaceIpMapping]] = Field(default=None, alias="interfaceIpMappings") + __properties: ClassVar[List[str]] = ["clusterMembers", "utilization", "accountGroups", "ipv6Policy", "errorDetails", "hostname", "lastSeen", "agentState", "keepBrowserCache", "createdDate", "targetForTests", "localResolutionPrefixes", "interfaceIpMappings"] + + 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 EnterpriseAgentData 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. + """ + excluded_fields: Set[str] = set([ + "cluster_members", + "utilization", + "error_details", + "hostname", + "last_seen", + "created_date", + "interface_ip_mappings", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in cluster_members (list) + _items = [] + if self.cluster_members: + for _item in self.cluster_members: + if _item: + _items.append(_item.to_dict()) + _dict['clusterMembers'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in account_groups (list) + _items = [] + if self.account_groups: + for _item in self.account_groups: + if _item: + _items.append(_item.to_dict()) + _dict['accountGroups'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in error_details (list) + _items = [] + if self.error_details: + for _item in self.error_details: + if _item: + _items.append(_item.to_dict()) + _dict['errorDetails'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in interface_ip_mappings (list) + _items = [] + if self.interface_ip_mappings: + for _item in self.interface_ip_mappings: + if _item: + _items.append(_item.to_dict()) + _dict['interfaceIpMappings'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EnterpriseAgentData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "clusterMembers": [ClusterMember.from_dict(_item) for _item in obj["clusterMembers"]] if obj.get("clusterMembers") is not None else None, + "utilization": obj.get("utilization"), + "accountGroups": [AccountGroup.from_dict(_item) for _item in obj["accountGroups"]] if obj.get("accountGroups") is not None else None, + "ipv6Policy": obj.get("ipv6Policy"), + "errorDetails": [ErrorDetail.from_dict(_item) for _item in obj["errorDetails"]] if obj.get("errorDetails") is not None else None, + "hostname": obj.get("hostname"), + "lastSeen": obj.get("lastSeen"), + "agentState": obj.get("agentState"), + "keepBrowserCache": obj.get("keepBrowserCache"), + "createdDate": obj.get("createdDate"), + "targetForTests": obj.get("targetForTests"), + "localResolutionPrefixes": obj.get("localResolutionPrefixes"), + "interfaceIpMappings": [InterfaceIpMapping.from_dict(_item) for _item in obj["interfaceIpMappings"]] if obj.get("interfaceIpMappings") is not None else None + }) + return _obj + + diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/enterprise_agent_ipv6_policy.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/enterprise_agent_ipv6_policy.py new file mode 100644 index 00000000..d9340676 --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/enterprise_agent_ipv6_policy.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + 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 EnterpriseAgentIpv6Policy(str, Enum): + """ + IP version policy, (Enterprise Agents and Enterprise Clusters only) + """ + + """ + allowed enum values + """ + FORCE_MINUS_IPV4 = 'force-ipv4' + PREFER_MINUS_IPV6 = 'prefer-ipv6' + FORCE_MINUS_IPV6 = 'force-ipv6' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of EnterpriseAgentIpv6Policy from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/enterprise_agent_state.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/enterprise_agent_state.py new file mode 100644 index 00000000..440eb537 --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/enterprise_agent_state.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + 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 EnterpriseAgentState(str, Enum): + """ + State of the agent. + """ + + """ + allowed enum values + """ + ONLINE = 'online' + OFFLINE = 'offline' + DISABLED = 'disabled' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of EnterpriseAgentState from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/error.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/error.py new file mode 100644 index 00000000..de648f47 --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/error.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class Error(BaseModel): + """ + Error + """ # noqa: E501 + type: Optional[StrictStr] = Field(default=None, description="A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\".") + title: Optional[StrictStr] = Field(default=None, description="A short, human-readable summary of the problem type.") + status: Optional[StrictInt] = Field(default=None, description="The HTTP status code generated by the origin server for this occurrence of the problem.") + detail: Optional[StrictStr] = Field(default=None, description="A human-readable explanation specific to this occurrence of the problem.") + instance: Optional[StrictStr] = Field(default=None, description="A URI reference that identifies the specific occurrence of the problem.") + __properties: ClassVar[List[str]] = ["type", "title", "status", "detail", "instance"] + + 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 Error 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 Error from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "title": obj.get("title"), + "status": obj.get("status"), + "detail": obj.get("detail"), + "instance": obj.get("instance") + }) + return _obj + + diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/error_detail.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/error_detail.py new file mode 100644 index 00000000..35fe13cc --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/error_detail.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + 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 thousandeyes_sdk.admin.models.error_detail_code import ErrorDetailCode +from typing import Optional, Set +from typing_extensions import Self + +class ErrorDetail(BaseModel): + """ + ErrorDetail + """ # noqa: E501 + code: Optional[ErrorDetailCode] = None + description: Optional[StrictStr] = Field(default=None, description="Description for the agent error.") + __properties: ClassVar[List[str]] = ["code", "description"] + + 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 ErrorDetail 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([ + "description", + ]) + + _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 ErrorDetail from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "description": obj.get("description") + }) + return _obj + + diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/error_detail_code.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/error_detail_code.py new file mode 100644 index 00000000..c83b62b6 --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/error_detail_code.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + 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 ErrorDetailCode(str, Enum): + """ + Code for the agent error. + """ + + """ + allowed enum values + """ + AGENT_MINUS_VERSION_MINUS_OUTDATED = 'agent-version-outdated' + BROWSERBOT_MINUS_VERSION_MINUS_OUTDATED = 'browserbot-version-outdated' + APPLIANCE_MINUS_VERSION_MINUS_OUTDATED = 'appliance-version-outdated' + CLOCK_MINUS_OFFSET = 'clock-offset' + OS_MINUS_END_MINUS_OF_MINUS_INSTALLATION_MINUS_SUPPORT = 'os-end-of-installation-support' + OS_MINUS_END_MINUS_OF_MINUS_SUPPORT = 'os-end-of-support' + OS_MINUS_END_MINUS_OF_MINUS_LIFE = 'os-end-of-life' + NAT_MINUS_TRAVERSAL_MINUS_ERROR = 'nat-traversal-error' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ErrorDetailCode from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/expand.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/expand.py new file mode 100644 index 00000000..f3ecf72f --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/expand.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + 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 Expand(str, Enum): + """ + Expand + """ + + """ + allowed enum values + """ + USER = 'user' + AGENT = 'agent' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of Expand from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/extended_user.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/extended_user.py new file mode 100644 index 00000000..3f614ce2 --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/extended_user.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from thousandeyes_sdk.admin.models.account_group import AccountGroup +from typing import Optional, Set +from typing_extensions import Self + +class ExtendedUser(BaseModel): + """ + ExtendedUser + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="User's display name.") + email: Optional[StrictStr] = Field(default=None, description="User's email address.") + uid: Optional[StrictStr] = Field(default=None, description="Unique ID of the user.") + date_registered: Optional[datetime] = Field(default=None, description="UTC date the user registered their account (ISO date-time format).", alias="dateRegistered") + login_account_group: Optional[AccountGroup] = Field(default=None, alias="loginAccountGroup") + last_login: Optional[datetime] = Field(default=None, description="UTC last login of the user (ISO date-time format).", alias="lastLogin") + __properties: ClassVar[List[str]] = ["name", "email", "uid", "dateRegistered", "loginAccountGroup", "lastLogin"] + + 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 ExtendedUser 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 login_account_group + if self.login_account_group: + _dict['loginAccountGroup'] = self.login_account_group.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ExtendedUser 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"), + "email": obj.get("email"), + "uid": obj.get("uid"), + "dateRegistered": obj.get("dateRegistered"), + "loginAccountGroup": AccountGroup.from_dict(obj["loginAccountGroup"]) if obj.get("loginAccountGroup") is not None else None, + "lastLogin": obj.get("lastLogin") + }) + return _obj + + diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/interface_ip_mapping.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/interface_ip_mapping.py new file mode 100644 index 00000000..a0639eed --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/interface_ip_mapping.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + 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 InterfaceIpMapping(BaseModel): + """ + InterfaceIpMapping + """ # noqa: E501 + interface_name: Optional[StrictStr] = Field(default=None, description="Name of the mapping", alias="interfaceName") + ip_addresses: Optional[List[StrictStr]] = Field(default=None, description="Array of ipAddress entries", alias="ipAddresses") + __properties: ClassVar[List[str]] = ["interfaceName", "ipAddresses"] + + 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 InterfaceIpMapping from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "interface_name", + "ip_addresses", + ]) + + _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 InterfaceIpMapping from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "interfaceName": obj.get("interfaceName"), + "ipAddresses": obj.get("ipAddresses") + }) + return _obj + + diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/link.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/link.py new file mode 100644 index 00000000..f68172dc --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/link.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + 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 import Optional, Set +from typing_extensions import Self + +class Link(BaseModel): + """ + A hyperlink from the containing resource to a URI. + """ # noqa: E501 + href: StrictStr = Field(description="Its value is either a URI [RFC3986] or a URI template [RFC6570].") + templated: Optional[StrictBool] = Field(default=None, description="Should be true when the link object's \"href\" property is a URI template.") + type: Optional[StrictStr] = Field(default=None, description="Used as a hint to indicate the media type expected when dereferencing the target resource.") + deprecation: Optional[StrictStr] = Field(default=None, description="Its presence indicates that the link is to be deprecated at a future date. Its value is a URL that should provide further information about the deprecation.") + name: Optional[StrictStr] = Field(default=None, description="Its value may be used as a secondary key for selecting link objects that share the same relation type.") + profile: Optional[StrictStr] = Field(default=None, description="A URI that hints about the profile of the target resource.") + title: Optional[StrictStr] = Field(default=None, description="Intended for labelling the link with a human-readable identifier") + hreflang: Optional[StrictStr] = Field(default=None, description="Indicates the language of the target resource") + __properties: ClassVar[List[str]] = ["href", "templated", "type", "deprecation", "name", "profile", "title", "hreflang"] + + 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 Link 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 Link from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "href": obj.get("href"), + "templated": obj.get("templated"), + "type": obj.get("type"), + "deprecation": obj.get("deprecation"), + "name": obj.get("name"), + "profile": obj.get("profile"), + "title": obj.get("title"), + "hreflang": obj.get("hreflang") + }) + return _obj + + diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/pagination_links.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/pagination_links.py new file mode 100644 index 00000000..a09731e7 --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/pagination_links.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + 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.admin.models.link import Link +from typing import Optional, Set +from typing_extensions import Self + +class PaginationLinks(BaseModel): + """ + A links object containing pagination related link(s). + """ # noqa: E501 + previous: Optional[Link] = None + next: Optional[Link] = None + var_self: Optional[Link] = Field(default=None, alias="self") + __properties: ClassVar[List[str]] = ["previous", "next", "self"] + + 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 PaginationLinks 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 previous + if self.previous: + _dict['previous'] = self.previous.to_dict() + # override the default output from pydantic by calling `to_dict()` of next + if self.next: + _dict['next'] = self.next.to_dict() + # override the default output from pydantic by calling `to_dict()` of var_self + if self.var_self: + _dict['self'] = self.var_self.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PaginationLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "previous": Link.from_dict(obj["previous"]) if obj.get("previous") is not None else None, + "next": Link.from_dict(obj["next"]) if obj.get("next") is not None else None, + "self": Link.from_dict(obj["self"]) if obj.get("self") is not None else None + }) + return _obj + + diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/permission.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/permission.py new file mode 100644 index 00000000..c3efb418 --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/permission.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + 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 import Optional, Set +from typing_extensions import Self + +class Permission(BaseModel): + """ + Permission + """ # noqa: E501 + label: Optional[StrictStr] = Field(default=None, description="Label corresponding to the permission.") + permission_id: Optional[StrictStr] = Field(default=None, description="Unique ID representing the permission.", alias="permissionId") + is_management_permission: Optional[StrictBool] = Field(default=None, description="Flag indicating whether the permission is classified as a management permission.", alias="isManagementPermission") + permission: Optional[StrictStr] = Field(default=None, description="Permission name") + __properties: ClassVar[List[str]] = ["label", "permissionId", "isManagementPermission", "permission"] + + 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 Permission 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 Permission from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "label": obj.get("label"), + "permissionId": obj.get("permissionId"), + "isManagementPermission": obj.get("isManagementPermission"), + "permission": obj.get("permission") + }) + return _obj + + diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/permissions.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/permissions.py new file mode 100644 index 00000000..d7659097 --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/permissions.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + 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.admin.models.permission import Permission +from thousandeyes_sdk.admin.models.self_links import SelfLinks +from typing import Optional, Set +from typing_extensions import Self + +class Permissions(BaseModel): + """ + Permissions + """ # noqa: E501 + permissions: Optional[List[Permission]] = None + links: Optional[SelfLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["permissions", "_links"] + + 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 Permissions 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 each item in permissions (list) + _items = [] + if self.permissions: + for _item in self.permissions: + if _item: + _items.append(_item.to_dict()) + _dict['permissions'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Permissions from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "permissions": [Permission.from_dict(_item) for _item in obj["permissions"]] if obj.get("permissions") is not None else None, + "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/resource.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/resource.py new file mode 100644 index 00000000..3d67f531 --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/resource.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + 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 Resource(BaseModel): + """ + Resource + """ # noqa: E501 + type: Optional[StrictStr] = Field(default=None, description="Type of resource affected. Can be “testName”, “reportTitle”, “userDisplayName”, “alertRuleName”, etc.") + name: Optional[StrictStr] = Field(default=None, description="Name of the affected resource.") + __properties: ClassVar[List[str]] = ["type", "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 Resource 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 Resource from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "name": obj.get("name") + }) + return _obj + + diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/role.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/role.py new file mode 100644 index 00000000..436cc33f --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/role.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + 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 import Optional, Set +from typing_extensions import Self + +class Role(BaseModel): + """ + Role + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="Name of the role.") + role_id: Optional[StrictStr] = Field(default=None, description="Unique ID representing the role.", alias="roleId") + is_builtin: Optional[StrictBool] = Field(default=None, description="Flag indicating if the role is built-in (Account Admin, Organization Admin, Regular User).", alias="isBuiltin") + has_management_permissions: Optional[StrictBool] = Field(default=None, description="Flag indicating whether the user has management permissions.", alias="hasManagementPermissions") + __properties: ClassVar[List[str]] = ["name", "roleId", "isBuiltin", "hasManagementPermissions"] + + 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 Role 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 Role 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"), + "roleId": obj.get("roleId"), + "isBuiltin": obj.get("isBuiltin"), + "hasManagementPermissions": obj.get("hasManagementPermissions") + }) + return _obj + + diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/role_detail.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/role_detail.py new file mode 100644 index 00000000..ac484fca --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/role_detail.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + 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.admin.models.permission import Permission +from thousandeyes_sdk.admin.models.self_links import SelfLinks +from typing import Optional, Set +from typing_extensions import Self + +class RoleDetail(BaseModel): + """ + RoleDetail + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="Name of the role.") + role_id: Optional[StrictStr] = Field(default=None, description="Unique ID representing the role.", alias="roleId") + is_builtin: Optional[StrictBool] = Field(default=None, description="Flag indicating if the role is built-in (Account Admin, Organization Admin, Regular User).", alias="isBuiltin") + permissions: Optional[List[Permission]] = None + links: Optional[SelfLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["name", "roleId", "isBuiltin", "permissions", "_links"] + + 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 RoleDetail 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 each item in permissions (list) + _items = [] + if self.permissions: + for _item in self.permissions: + if _item: + _items.append(_item.to_dict()) + _dict['permissions'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RoleDetail 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"), + "roleId": obj.get("roleId"), + "isBuiltin": obj.get("isBuiltin"), + "permissions": [Permission.from_dict(_item) for _item in obj["permissions"]] if obj.get("permissions") is not None else None, + "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/role_request_body.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/role_request_body.py new file mode 100644 index 00000000..ad252985 --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/role_request_body.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + 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 RoleRequestBody(BaseModel): + """ + RoleRequestBody + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="Name of the role.") + permissions: Optional[List[StrictStr]] = Field(default=None, description="Contains list of test permission IDs (get `permissionId` from `/permissions` endpoint)") + __properties: ClassVar[List[str]] = ["name", "permissions"] + + 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 RoleRequestBody 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 RoleRequestBody 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"), + "permissions": obj.get("permissions") + }) + return _obj + + diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/roles.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/roles.py new file mode 100644 index 00000000..8df58088 --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/roles.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + 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.admin.models.role import Role +from thousandeyes_sdk.admin.models.self_links import SelfLinks +from typing import Optional, Set +from typing_extensions import Self + +class Roles(BaseModel): + """ + Roles + """ # noqa: E501 + roles: Optional[List[Role]] = None + links: Optional[SelfLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["roles", "_links"] + + 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 Roles 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 each item in roles (list) + _items = [] + if self.roles: + for _item in self.roles: + if _item: + _items.append(_item.to_dict()) + _dict['roles'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Roles from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "roles": [Role.from_dict(_item) for _item in obj["roles"]] if obj.get("roles") is not None else None, + "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/self_links.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/self_links.py new file mode 100644 index 00000000..d1617d50 --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/self_links.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + 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.admin.models.link import Link +from typing import Optional, Set +from typing_extensions import Self + +class SelfLinks(BaseModel): + """ + A links object containing the self link. + """ # noqa: E501 + var_self: Optional[Link] = Field(default=None, alias="self") + __properties: ClassVar[List[str]] = ["self"] + + 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 SelfLinks 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 var_self + if self.var_self: + _dict['self'] = self.var_self.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SelfLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "self": Link.from_dict(obj["self"]) if obj.get("self") is not None else None + }) + return _obj + + diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/simple_agent.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/simple_agent.py new file mode 100644 index 00000000..89d76c0a --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/simple_agent.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + 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 import Optional, Set +from typing_extensions import Self + +class SimpleAgent(BaseModel): + """ + SimpleAgent + """ # noqa: E501 + 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") + enabled: Optional[StrictBool] = Field(default=None, description="Flag indicating if the agent is enabled.") + prefix: Optional[StrictStr] = Field(default=None, description="Prefix containing agents public IP address.") + 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") + __properties: ClassVar[List[str]] = ["ipAddresses", "publicIpAddresses", "network", "agentId", "agentName", "location", "countryId", "enabled", "prefix", "verifySslCertificates"] + + 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 SimpleAgent 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. + """ + excluded_fields: Set[str] = set([ + "ip_addresses", + "public_ip_addresses", + "network", + "agent_id", + "location", + "country_id", + "prefix", + "verify_ssl_certificates", + ]) + + _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 SimpleAgent from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "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"), + "enabled": obj.get("enabled"), + "prefix": obj.get("prefix"), + "verifySslCertificates": obj.get("verifySslCertificates") + }) + return _obj + + diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/unauthorized_error.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/unauthorized_error.py new file mode 100644 index 00000000..b5721cc9 --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/unauthorized_error.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + 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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UnauthorizedError(BaseModel): + """ + UnauthorizedError + """ # noqa: E501 + error: Optional[StrictStr] = None + error_description: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["error", "error_description"] + + 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 UnauthorizedError 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 UnauthorizedError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": obj.get("error"), + "error_description": obj.get("error_description") + }) + return _obj + + diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/user.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/user.py new file mode 100644 index 00000000..1f2b5a72 --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/user.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from thousandeyes_sdk.admin.models.account_group import AccountGroup +from typing import Optional, Set +from typing_extensions import Self + +class User(BaseModel): + """ + User + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="User's display name.") + email: Optional[StrictStr] = Field(default=None, description="User's email address.") + uid: Optional[StrictStr] = Field(default=None, description="Unique ID of the user.") + date_registered: Optional[datetime] = Field(default=None, description="UTC date the user registered their account (ISO date-time format).", alias="dateRegistered") + login_account_group: Optional[AccountGroup] = Field(default=None, alias="loginAccountGroup") + __properties: ClassVar[List[str]] = ["name", "email", "uid", "dateRegistered", "loginAccountGroup"] + + 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 User 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 login_account_group + if self.login_account_group: + _dict['loginAccountGroup'] = self.login_account_group.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of User 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"), + "email": obj.get("email"), + "uid": obj.get("uid"), + "dateRegistered": obj.get("dateRegistered"), + "loginAccountGroup": AccountGroup.from_dict(obj["loginAccountGroup"]) if obj.get("loginAccountGroup") is not None else None + }) + return _obj + + diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/user_account_group.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/user_account_group.py new file mode 100644 index 00000000..97563bf5 --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/user_account_group.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from thousandeyes_sdk.admin.models.role import Role +from typing import Optional, Set +from typing_extensions import Self + +class UserAccountGroup(BaseModel): + """ + UserAccountGroup + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="User's display name.") + email: Optional[StrictStr] = Field(default=None, description="User's email address.") + uid: Optional[StrictStr] = Field(default=None, description="Unique ID representing the user.") + last_login: Optional[datetime] = Field(default=None, description="User's UTC last login date (ISO date-time format).", alias="lastLogin") + date_registered: Optional[datetime] = Field(default=None, description="User's UTC registration date (ISO date-time format).", alias="dateRegistered") + roles: Optional[List[Role]] = None + __properties: ClassVar[List[str]] = ["name", "email", "uid", "lastLogin", "dateRegistered", "roles"] + + 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 UserAccountGroup 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 each item in roles (list) + _items = [] + if self.roles: + for _item in self.roles: + if _item: + _items.append(_item.to_dict()) + _dict['roles'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserAccountGroup 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"), + "email": obj.get("email"), + "uid": obj.get("uid"), + "lastLogin": obj.get("lastLogin"), + "dateRegistered": obj.get("dateRegistered"), + "roles": [Role.from_dict(_item) for _item in obj["roles"]] if obj.get("roles") is not None else None + }) + return _obj + + diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/user_account_group_role.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/user_account_group_role.py new file mode 100644 index 00000000..0d248f41 --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/user_account_group_role.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + 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 UserAccountGroupRole(BaseModel): + """ + UserAccountGroupRole + """ # noqa: E501 + account_group_id: Optional[StrictStr] = Field(default=None, description="Unique ID of the account group.", alias="accountGroupId") + role_ids: Optional[List[StrictStr]] = Field(default=None, description="Unique role IDs.", alias="roleIds") + __properties: ClassVar[List[str]] = ["accountGroupId", "roleIds"] + + 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 UserAccountGroupRole 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 UserAccountGroupRole from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "accountGroupId": obj.get("accountGroupId"), + "roleIds": obj.get("roleIds") + }) + return _obj + + diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/user_detail.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/user_detail.py new file mode 100644 index 00000000..cc24ea97 --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/user_detail.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from thousandeyes_sdk.admin.models.account_group import AccountGroup +from thousandeyes_sdk.admin.models.account_group_role import AccountGroupRole +from thousandeyes_sdk.admin.models.role import Role +from thousandeyes_sdk.admin.models.self_links import SelfLinks +from typing import Optional, Set +from typing_extensions import Self + +class UserDetail(BaseModel): + """ + UserDetail + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="User's display name.") + email: Optional[StrictStr] = Field(default=None, description="User's email address.") + uid: Optional[StrictStr] = Field(default=None, description="Unique ID of the user.") + date_registered: Optional[datetime] = Field(default=None, description="UTC date the user registered their account (ISO date-time format).", alias="dateRegistered") + login_account_group: Optional[AccountGroup] = Field(default=None, alias="loginAccountGroup") + last_login: Optional[datetime] = Field(default=None, description="UTC last login of the user (ISO date-time format).", alias="lastLogin") + account_group_roles: Optional[List[AccountGroupRole]] = Field(default=None, alias="accountGroupRoles") + all_account_group_roles: Optional[List[Role]] = Field(default=None, alias="allAccountGroupRoles") + links: Optional[SelfLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["name", "email", "uid", "dateRegistered", "loginAccountGroup", "lastLogin", "accountGroupRoles", "allAccountGroupRoles", "_links"] + + 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 UserDetail 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 login_account_group + if self.login_account_group: + _dict['loginAccountGroup'] = self.login_account_group.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in account_group_roles (list) + _items = [] + if self.account_group_roles: + for _item in self.account_group_roles: + if _item: + _items.append(_item.to_dict()) + _dict['accountGroupRoles'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in all_account_group_roles (list) + _items = [] + if self.all_account_group_roles: + for _item in self.all_account_group_roles: + if _item: + _items.append(_item.to_dict()) + _dict['allAccountGroupRoles'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserDetail 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"), + "email": obj.get("email"), + "uid": obj.get("uid"), + "dateRegistered": obj.get("dateRegistered"), + "loginAccountGroup": AccountGroup.from_dict(obj["loginAccountGroup"]) if obj.get("loginAccountGroup") is not None else None, + "lastLogin": obj.get("lastLogin"), + "accountGroupRoles": [AccountGroupRole.from_dict(_item) for _item in obj["accountGroupRoles"]] if obj.get("accountGroupRoles") is not None else None, + "allAccountGroupRoles": [Role.from_dict(_item) for _item in obj["allAccountGroupRoles"]] if obj.get("allAccountGroupRoles") is not None else None, + "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/user_event.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/user_event.py new file mode 100644 index 00000000..2b7c1840 --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/user_event.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from thousandeyes_sdk.admin.models.resource import Resource +from typing import Optional, Set +from typing_extensions import Self + +class UserEvent(BaseModel): + """ + UserEvent + """ # noqa: E501 + aid: Optional[StrictStr] = Field(default=None, description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint.") + account_group_name: Optional[StrictStr] = Field(default=None, description="Account group name", alias="accountGroupName") + var_date: Optional[datetime] = Field(default=None, description="UTC event date (ISO date-time format).", alias="date") + event: Optional[StrictStr] = Field(default=None, description="Event type.") + ip_address: Optional[StrictStr] = Field(default=None, description="Source IP address of the user.", alias="ipAddress") + uid: Optional[StrictStr] = Field(default=None, description="Unique id representing the user.") + user: Optional[StrictStr] = Field(default=None, description="The name and email address of the user.") + resources: Optional[List[Resource]] = None + __properties: ClassVar[List[str]] = ["aid", "accountGroupName", "date", "event", "ipAddress", "uid", "user", "resources"] + + 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 UserEvent 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 each item in resources (list) + _items = [] + if self.resources: + for _item in self.resources: + if _item: + _items.append(_item.to_dict()) + _dict['resources'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserEvent from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "aid": obj.get("aid"), + "accountGroupName": obj.get("accountGroupName"), + "date": obj.get("date"), + "event": obj.get("event"), + "ipAddress": obj.get("ipAddress"), + "uid": obj.get("uid"), + "user": obj.get("user"), + "resources": [Resource.from_dict(_item) for _item in obj["resources"]] if obj.get("resources") is not None else None + }) + return _obj + + diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/user_request.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/user_request.py new file mode 100644 index 00000000..b3c702be --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/user_request.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + 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 thousandeyes_sdk.admin.models.user_account_group_role import UserAccountGroupRole +from typing import Optional, Set +from typing_extensions import Self + +class UserRequest(BaseModel): + """ + UserRequest + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="User's display name.") + email: Optional[StrictStr] = Field(default=None, description="User's email address.") + login_account_group_id: Optional[StrictStr] = Field(default=None, description="Unique ID of the login account group.", alias="loginAccountGroupId") + account_group_roles: Optional[List[UserAccountGroupRole]] = Field(default=None, alias="accountGroupRoles") + all_account_group_role_ids: Optional[List[StrictStr]] = Field(default=None, description="Unique IDs representing the roles.", alias="allAccountGroupRoleIds") + __properties: ClassVar[List[str]] = ["name", "email", "loginAccountGroupId", "accountGroupRoles", "allAccountGroupRoleIds"] + + 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 UserRequest 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 each item in account_group_roles (list) + _items = [] + if self.account_group_roles: + for _item in self.account_group_roles: + if _item: + _items.append(_item.to_dict()) + _dict['accountGroupRoles'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserRequest 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"), + "email": obj.get("email"), + "loginAccountGroupId": obj.get("loginAccountGroupId"), + "accountGroupRoles": [UserAccountGroupRole.from_dict(_item) for _item in obj["accountGroupRoles"]] if obj.get("accountGroupRoles") is not None else None, + "allAccountGroupRoleIds": obj.get("allAccountGroupRoleIds") + }) + return _obj + + diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/users.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/users.py new file mode 100644 index 00000000..124654da --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/users.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + 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.admin.models.extended_user import ExtendedUser +from thousandeyes_sdk.admin.models.self_links import SelfLinks +from typing import Optional, Set +from typing_extensions import Self + +class Users(BaseModel): + """ + Users + """ # noqa: E501 + users: Optional[List[ExtendedUser]] = None + links: Optional[SelfLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["users", "_links"] + + 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 Users 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 each item in users (list) + _items = [] + if self.users: + for _item in self.users: + if _item: + _items.append(_item.to_dict()) + _dict['users'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Users from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "users": [ExtendedUser.from_dict(_item) for _item in obj["users"]] if obj.get("users") is not None else None, + "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/validation_error.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/validation_error.py new file mode 100644 index 00000000..72089630 --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/validation_error.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from thousandeyes_sdk.admin.models.validation_error_item import ValidationErrorItem +from typing import Optional, Set +from typing_extensions import Self + +class ValidationError(BaseModel): + """ + ValidationError + """ # noqa: E501 + type: Optional[StrictStr] = Field(default=None, description="A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\".") + title: Optional[StrictStr] = Field(default=None, description="A short, human-readable summary of the problem type.") + status: Optional[StrictInt] = Field(default=None, description="The HTTP status code generated by the origin server for this occurrence of the problem.") + detail: Optional[StrictStr] = Field(default=None, description="A human-readable explanation specific to this occurrence of the problem.") + instance: Optional[StrictStr] = Field(default=None, description="A URI reference that identifies the specific occurrence of the problem.") + errors: Optional[List[ValidationErrorItem]] = Field(default=None, description="(Optional) When multiple errors occur, the details for each error are listed.") + __properties: ClassVar[List[str]] = ["type", "title", "status", "detail", "instance", "errors"] + + 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 ValidationError 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 each item in errors (list) + _items = [] + if self.errors: + for _item in self.errors: + if _item: + _items.append(_item.to_dict()) + _dict['errors'] = _items + # set to None if errors (nullable) is None + # and model_fields_set contains the field + if self.errors is None and "errors" in self.model_fields_set: + _dict['errors'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ValidationError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "title": obj.get("title"), + "status": obj.get("status"), + "detail": obj.get("detail"), + "instance": obj.get("instance"), + "errors": [ValidationErrorItem.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None + }) + return _obj + + diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/validation_error_item.py b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/validation_error_item.py new file mode 100644 index 00000000..0080a6fe --- /dev/null +++ b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/models/validation_error_item.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + 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 ValidationErrorItem(BaseModel): + """ + ValidationErrorItem + """ # noqa: E501 + code: Optional[StrictStr] = Field(default=None, description="(Optional) A unique error type/code that can be referenced in the documentation for further details.") + var_field: Optional[StrictStr] = Field(default=None, description="Identifies the field that triggered this particular error.", alias="field") + message: Optional[StrictStr] = Field(default=None, description="A short, human-readable summary of the error.") + __properties: ClassVar[List[str]] = ["code", "field", "message"] + + 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 ValidationErrorItem 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 ValidationErrorItem from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "field": obj.get("field"), + "message": obj.get("message") + }) + return _obj + + diff --git a/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/py.typed b/thousandeyes-sdk-administrative/src/thousandeyes_sdk/admin/py.typed new file mode 100644 index 00000000..e69de29b diff --git a/thousandeyes-sdk-administrative/test/__init__.py b/thousandeyes-sdk-administrative/test/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/thousandeyes-sdk-administrative/test/test_account_groups_api.py b/thousandeyes-sdk-administrative/test/test_account_groups_api.py new file mode 100644 index 00000000..3b42863a --- /dev/null +++ b/thousandeyes-sdk-administrative/test/test_account_groups_api.py @@ -0,0 +1,591 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.admin.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.admin.api.account_groups_api import AccountGroupsApi + + +class TestAccountGroupsApi(unittest.TestCase): + """AccountGroupsApi unit test stubs""" + + def setUp(self) -> None: + self.api = AccountGroupsApi() + + def tearDown(self) -> None: + pass + + def test_create_account_group_models_validation(self) -> None: + """Test case for create_account_group request and response models""" + request_body_json = """ + { + "accountGroupName" : "My testing account group", + "agents" : [ "105", "719" ] + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.admin.models.AccountGroupRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "isCurrentAccountGroup" : true, + "organizationName" : "organizationName", + "_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" + } + }, + "accountGroupName" : "Account A", + "isDefaultAccountGroup" : true, + "aid" : "1234", + "users" : [ { + "uid" : "235", + "lastLogin" : "2022-07-17T22:00:54Z", + "roles" : [ { + "roleId" : "35", + "name" : "Organization Admin", + "isBuiltin" : true, + "hasManagementPermissions" : true + }, { + "roleId" : "35", + "name" : "Organization Admin", + "isBuiltin" : true, + "hasManagementPermissions" : true + } ], + "name" : "User X", + "email" : "userx@thousandeyes.com", + "dateRegistered" : "2022-07-17T22:00:54Z" + }, { + "uid" : "235", + "lastLogin" : "2022-07-17T22:00:54Z", + "roles" : [ { + "roleId" : "35", + "name" : "Organization Admin", + "isBuiltin" : true, + "hasManagementPermissions" : true + }, { + "roleId" : "35", + "name" : "Organization Admin", + "isBuiltin" : true, + "hasManagementPermissions" : true + } ], + "name" : "User X", + "email" : "userx@thousandeyes.com", + "dateRegistered" : "2022-07-17T22:00:54Z" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.admin.models.CreatedAccountGroup.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_delete_account_group_models_validation(self) -> None: + """Test case for delete_account_group request and response models""" + + + def test_get_account_group_models_validation(self) -> None: + """Test case for get_account_group request and response models""" + + response_body_json = """ + { + "isCurrentAccountGroup" : true, + "organizationName" : "organizationName", + "_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" + } + }, + "accountGroupName" : "Account A", + "isDefaultAccountGroup" : true, + "aid" : "1234", + "users" : [ { + "uid" : "235", + "lastLogin" : "2022-07-17T22:00:54Z", + "roles" : [ { + "roleId" : "35", + "name" : "Organization Admin", + "isBuiltin" : true, + "hasManagementPermissions" : true + }, { + "roleId" : "35", + "name" : "Organization Admin", + "isBuiltin" : true, + "hasManagementPermissions" : true + } ], + "name" : "User X", + "email" : "userx@thousandeyes.com", + "dateRegistered" : "2022-07-17T22:00:54Z" + }, { + "uid" : "235", + "lastLogin" : "2022-07-17T22:00:54Z", + "roles" : [ { + "roleId" : "35", + "name" : "Organization Admin", + "isBuiltin" : true, + "hasManagementPermissions" : true + }, { + "roleId" : "35", + "name" : "Organization Admin", + "isBuiltin" : true, + "hasManagementPermissions" : true + } ], + "name" : "User X", + "email" : "userx@thousandeyes.com", + "dateRegistered" : "2022-07-17T22:00:54Z" + } ], + "agents" : [ { + "localResolutionPrefixes" : [ "10.2.3.3/24", "10.2.3.3/24" ], + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "ipv6Policy" : "force-ipv4", + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "utilization" : 25, + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "clusterMembers" : [ { + "lastSeen" : "2022-07-17T22:00:54Z", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "agentState" : "online", + "targetForTests" : "1.1.1.1", + "name" : "Cluster member name", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "utilization" : 25, + "network" : "AT&T Services, Inc. (AS 7018)", + "memberId" : "10", + "errorDetails" : [ { + "code" : "agent-version-outdated", + "description" : "Agent Version 0.1.1 (latest: 1.0.0)" + }, { + "code" : "agent-version-outdated", + "description" : "Agent Version 0.1.1 (latest: 1.0.0)" + } ] + }, { + "lastSeen" : "2022-07-17T22:00:54Z", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "agentState" : "online", + "targetForTests" : "1.1.1.1", + "name" : "Cluster member name", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "utilization" : 25, + "network" : "AT&T Services, Inc. (AS 7018)", + "memberId" : "10", + "errorDetails" : [ { + "code" : "agent-version-outdated", + "description" : "Agent Version 0.1.1 (latest: 1.0.0)" + }, { + "code" : "agent-version-outdated", + "description" : "Agent Version 0.1.1 (latest: 1.0.0)" + } ] + } ], + "hostname" : "thousandeyes.com", + "lastSeen" : "2022-07-17T22:00:54Z", + "createdDate" : "2022-07-17T22:00:54Z", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "keepBrowserCache" : true, + "interfaceIpMappings" : [ { + "ipAddresses" : [ "73.252.207.219", "2601:646:300:3ae0::b977" ], + "interfaceName" : "wlp4s0" + }, { + "ipAddresses" : [ "73.252.207.219", "2601:646:300:3ae0::b977" ], + "interfaceName" : "wlp4s0" + } ], + "agentState" : "online", + "targetForTests" : "1.1.1.1", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "accountGroups" : [ { + "accountGroupName" : "Account A", + "aid" : "1234" + }, { + "accountGroupName" : "Account A", + "aid" : "1234" + } ], + "verifySslCertificates" : true, + "errorDetails" : [ { + "code" : "agent-version-outdated", + "description" : "Agent Version 0.1.1 (latest: 1.0.0)" + }, { + "code" : "agent-version-outdated", + "description" : "Agent Version 0.1.1 (latest: 1.0.0)" + } ] + }, { + "localResolutionPrefixes" : [ "10.2.3.3/24", "10.2.3.3/24" ], + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "ipv6Policy" : "force-ipv4", + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "utilization" : 25, + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "clusterMembers" : [ { + "lastSeen" : "2022-07-17T22:00:54Z", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "agentState" : "online", + "targetForTests" : "1.1.1.1", + "name" : "Cluster member name", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "utilization" : 25, + "network" : "AT&T Services, Inc. (AS 7018)", + "memberId" : "10", + "errorDetails" : [ { + "code" : "agent-version-outdated", + "description" : "Agent Version 0.1.1 (latest: 1.0.0)" + }, { + "code" : "agent-version-outdated", + "description" : "Agent Version 0.1.1 (latest: 1.0.0)" + } ] + }, { + "lastSeen" : "2022-07-17T22:00:54Z", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "agentState" : "online", + "targetForTests" : "1.1.1.1", + "name" : "Cluster member name", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "utilization" : 25, + "network" : "AT&T Services, Inc. (AS 7018)", + "memberId" : "10", + "errorDetails" : [ { + "code" : "agent-version-outdated", + "description" : "Agent Version 0.1.1 (latest: 1.0.0)" + }, { + "code" : "agent-version-outdated", + "description" : "Agent Version 0.1.1 (latest: 1.0.0)" + } ] + } ], + "hostname" : "thousandeyes.com", + "lastSeen" : "2022-07-17T22:00:54Z", + "createdDate" : "2022-07-17T22:00:54Z", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "keepBrowserCache" : true, + "interfaceIpMappings" : [ { + "ipAddresses" : [ "73.252.207.219", "2601:646:300:3ae0::b977" ], + "interfaceName" : "wlp4s0" + }, { + "ipAddresses" : [ "73.252.207.219", "2601:646:300:3ae0::b977" ], + "interfaceName" : "wlp4s0" + } ], + "agentState" : "online", + "targetForTests" : "1.1.1.1", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "accountGroups" : [ { + "accountGroupName" : "Account A", + "aid" : "1234" + }, { + "accountGroupName" : "Account A", + "aid" : "1234" + } ], + "verifySslCertificates" : true, + "errorDetails" : [ { + "code" : "agent-version-outdated", + "description" : "Agent Version 0.1.1 (latest: 1.0.0)" + }, { + "code" : "agent-version-outdated", + "description" : "Agent Version 0.1.1 (latest: 1.0.0)" + } ] + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.admin.models.AccountGroupDetail.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_account_groups_models_validation(self) -> None: + """Test case for get_account_groups request and response models""" + + response_body_json = """ + { + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "accountGroups" : [ { + "isCurrentAccountGroup" : true, + "organizationName" : "organizationName", + "accountGroupName" : "Account A", + "isDefaultAccountGroup" : true, + "aid" : "1234" + }, { + "isCurrentAccountGroup" : true, + "organizationName" : "organizationName", + "accountGroupName" : "Account A", + "isDefaultAccountGroup" : true, + "aid" : "1234" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.admin.models.AccountGroups.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_update_account_group_models_validation(self) -> None: + """Test case for update_account_group request and response models""" + request_body_json = """ + { + "accountGroupName" : "My testing account group", + "agents" : [ "105", "719" ] + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.admin.models.AccountGroupRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "isCurrentAccountGroup" : true, + "organizationName" : "organizationName", + "_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" + } + }, + "accountGroupName" : "Account A", + "isDefaultAccountGroup" : true, + "aid" : "1234", + "users" : [ { + "uid" : "235", + "lastLogin" : "2022-07-17T22:00:54Z", + "roles" : [ { + "roleId" : "35", + "name" : "Organization Admin", + "isBuiltin" : true, + "hasManagementPermissions" : true + }, { + "roleId" : "35", + "name" : "Organization Admin", + "isBuiltin" : true, + "hasManagementPermissions" : true + } ], + "name" : "User X", + "email" : "userx@thousandeyes.com", + "dateRegistered" : "2022-07-17T22:00:54Z" + }, { + "uid" : "235", + "lastLogin" : "2022-07-17T22:00:54Z", + "roles" : [ { + "roleId" : "35", + "name" : "Organization Admin", + "isBuiltin" : true, + "hasManagementPermissions" : true + }, { + "roleId" : "35", + "name" : "Organization Admin", + "isBuiltin" : true, + "hasManagementPermissions" : true + } ], + "name" : "User X", + "email" : "userx@thousandeyes.com", + "dateRegistered" : "2022-07-17T22:00:54Z" + } ], + "agents" : [ { + "localResolutionPrefixes" : [ "10.2.3.3/24", "10.2.3.3/24" ], + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "ipv6Policy" : "force-ipv4", + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "utilization" : 25, + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "clusterMembers" : [ { + "lastSeen" : "2022-07-17T22:00:54Z", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "agentState" : "online", + "targetForTests" : "1.1.1.1", + "name" : "Cluster member name", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "utilization" : 25, + "network" : "AT&T Services, Inc. (AS 7018)", + "memberId" : "10", + "errorDetails" : [ { + "code" : "agent-version-outdated", + "description" : "Agent Version 0.1.1 (latest: 1.0.0)" + }, { + "code" : "agent-version-outdated", + "description" : "Agent Version 0.1.1 (latest: 1.0.0)" + } ] + }, { + "lastSeen" : "2022-07-17T22:00:54Z", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "agentState" : "online", + "targetForTests" : "1.1.1.1", + "name" : "Cluster member name", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "utilization" : 25, + "network" : "AT&T Services, Inc. (AS 7018)", + "memberId" : "10", + "errorDetails" : [ { + "code" : "agent-version-outdated", + "description" : "Agent Version 0.1.1 (latest: 1.0.0)" + }, { + "code" : "agent-version-outdated", + "description" : "Agent Version 0.1.1 (latest: 1.0.0)" + } ] + } ], + "hostname" : "thousandeyes.com", + "lastSeen" : "2022-07-17T22:00:54Z", + "createdDate" : "2022-07-17T22:00:54Z", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "keepBrowserCache" : true, + "interfaceIpMappings" : [ { + "ipAddresses" : [ "73.252.207.219", "2601:646:300:3ae0::b977" ], + "interfaceName" : "wlp4s0" + }, { + "ipAddresses" : [ "73.252.207.219", "2601:646:300:3ae0::b977" ], + "interfaceName" : "wlp4s0" + } ], + "agentState" : "online", + "targetForTests" : "1.1.1.1", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "accountGroups" : [ { + "accountGroupName" : "Account A", + "aid" : "1234" + }, { + "accountGroupName" : "Account A", + "aid" : "1234" + } ], + "verifySslCertificates" : true, + "errorDetails" : [ { + "code" : "agent-version-outdated", + "description" : "Agent Version 0.1.1 (latest: 1.0.0)" + }, { + "code" : "agent-version-outdated", + "description" : "Agent Version 0.1.1 (latest: 1.0.0)" + } ] + }, { + "localResolutionPrefixes" : [ "10.2.3.3/24", "10.2.3.3/24" ], + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "ipv6Policy" : "force-ipv4", + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "utilization" : 25, + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "clusterMembers" : [ { + "lastSeen" : "2022-07-17T22:00:54Z", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "agentState" : "online", + "targetForTests" : "1.1.1.1", + "name" : "Cluster member name", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "utilization" : 25, + "network" : "AT&T Services, Inc. (AS 7018)", + "memberId" : "10", + "errorDetails" : [ { + "code" : "agent-version-outdated", + "description" : "Agent Version 0.1.1 (latest: 1.0.0)" + }, { + "code" : "agent-version-outdated", + "description" : "Agent Version 0.1.1 (latest: 1.0.0)" + } ] + }, { + "lastSeen" : "2022-07-17T22:00:54Z", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "agentState" : "online", + "targetForTests" : "1.1.1.1", + "name" : "Cluster member name", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "utilization" : 25, + "network" : "AT&T Services, Inc. (AS 7018)", + "memberId" : "10", + "errorDetails" : [ { + "code" : "agent-version-outdated", + "description" : "Agent Version 0.1.1 (latest: 1.0.0)" + }, { + "code" : "agent-version-outdated", + "description" : "Agent Version 0.1.1 (latest: 1.0.0)" + } ] + } ], + "hostname" : "thousandeyes.com", + "lastSeen" : "2022-07-17T22:00:54Z", + "createdDate" : "2022-07-17T22:00:54Z", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "keepBrowserCache" : true, + "interfaceIpMappings" : [ { + "ipAddresses" : [ "73.252.207.219", "2601:646:300:3ae0::b977" ], + "interfaceName" : "wlp4s0" + }, { + "ipAddresses" : [ "73.252.207.219", "2601:646:300:3ae0::b977" ], + "interfaceName" : "wlp4s0" + } ], + "agentState" : "online", + "targetForTests" : "1.1.1.1", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "accountGroups" : [ { + "accountGroupName" : "Account A", + "aid" : "1234" + }, { + "accountGroupName" : "Account A", + "aid" : "1234" + } ], + "verifySslCertificates" : true, + "errorDetails" : [ { + "code" : "agent-version-outdated", + "description" : "Agent Version 0.1.1 (latest: 1.0.0)" + }, { + "code" : "agent-version-outdated", + "description" : "Agent Version 0.1.1 (latest: 1.0.0)" + } ] + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.admin.models.AccountGroupDetail.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-administrative/test/test_permissions_api.py b/thousandeyes-sdk-administrative/test/test_permissions_api.py new file mode 100644 index 00000000..bcdb3aea --- /dev/null +++ b/thousandeyes-sdk-administrative/test/test_permissions_api.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.admin.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.admin.api.permissions_api import PermissionsApi + + +class TestPermissionsApi(unittest.TestCase): + """PermissionsApi unit test stubs""" + + def setUp(self) -> None: + self.api = PermissionsApi() + + def tearDown(self) -> None: + pass + + def test_get_permissions_models_validation(self) -> None: + """Test case for get_permissions request and response models""" + + response_body_json = """ + { + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "permissions" : [ { + "label" : "View reports", + "permissionId" : "1", + "isManagementPermission" : true, + "permission" : "REPORT_READ" + }, { + "label" : "View snapshots", + "permissionId" : "51", + "isManagementPermission" : false, + "permission" : "REPORT_SNAPSHOTS_READ" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.admin.models.Permissions.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-administrative/test/test_roles_api.py b/thousandeyes-sdk-administrative/test/test_roles_api.py new file mode 100644 index 00000000..fadcdc93 --- /dev/null +++ b/thousandeyes-sdk-administrative/test/test_roles_api.py @@ -0,0 +1,201 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.admin.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.admin.api.roles_api import RolesApi + + +class TestRolesApi(unittest.TestCase): + """RolesApi unit test stubs""" + + def setUp(self) -> None: + self.api = RolesApi() + + def tearDown(self) -> None: + pass + + def test_create_role_models_validation(self) -> None: + """Test case for create_role request and response models""" + request_body_json = """ + { + "permissions" : [ "56", "315" ], + "name" : "Organization Admin" + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.admin.models.RoleRequestBody.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "roleId" : "35", + "permissions" : [ { + "label" : "View reports", + "permissionId" : "1", + "isManagementPermission" : true, + "permission" : "REPORT_READ" + }, { + "label" : "View snapshots", + "permissionId" : "51", + "isManagementPermission" : false, + "permission" : "REPORT_SNAPSHOTS_READ" + } ], + "name" : "Organization Admin", + "isBuiltin" : true + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.admin.models.RoleDetail.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_delete_role_models_validation(self) -> None: + """Test case for delete_role request and response models""" + + + def test_get_role_models_validation(self) -> None: + """Test case for get_role request and response models""" + + response_body_json = """ + { + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "roleId" : "35", + "permissions" : [ { + "label" : "View reports", + "permissionId" : "1", + "isManagementPermission" : true, + "permission" : "REPORT_READ" + }, { + "label" : "View snapshots", + "permissionId" : "51", + "isManagementPermission" : false, + "permission" : "REPORT_SNAPSHOTS_READ" + } ], + "name" : "Organization Admin", + "isBuiltin" : true + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.admin.models.RoleDetail.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_roles_models_validation(self) -> None: + """Test case for get_roles request and response models""" + + response_body_json = """ + { + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "roles" : [ { + "roleId" : "35", + "name" : "Organization Admin", + "isBuiltin" : true, + "hasManagementPermissions" : true + }, { + "roleId" : "35", + "name" : "Organization Admin", + "isBuiltin" : true, + "hasManagementPermissions" : true + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.admin.models.Roles.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_update_role_models_validation(self) -> None: + """Test case for update_role request and response models""" + request_body_json = """ + { + "permissions" : [ "56", "315" ], + "name" : "Organization Admin" + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.admin.models.RoleRequestBody.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "roleId" : "35", + "permissions" : [ { + "label" : "View reports", + "permissionId" : "1", + "isManagementPermission" : true, + "permission" : "REPORT_READ" + }, { + "label" : "View snapshots", + "permissionId" : "51", + "isManagementPermission" : false, + "permission" : "REPORT_SNAPSHOTS_READ" + } ], + "name" : "Organization Admin", + "isBuiltin" : true + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.admin.models.RoleDetail.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-administrative/test/test_user_events_api.py b/thousandeyes-sdk-administrative/test/test_user_events_api.py new file mode 100644 index 00000000..0b5a3780 --- /dev/null +++ b/thousandeyes-sdk-administrative/test/test_user_events_api.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.admin.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.admin.api.user_events_api import UserEventsApi + + +class TestUserEventsApi(unittest.TestCase): + """UserEventsApi unit test stubs""" + + def setUp(self) -> None: + self.api = UserEventsApi() + + def tearDown(self) -> None: + pass + + def test_get_user_events_models_validation(self) -> None: + """Test case for get_user_events request and response models""" + + response_body_json = """ + { + "endDate" : "2022-07-18T22:00:54Z", + "_links" : { + "next" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + }, + "previous" : { + "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" + } + }, + "auditEvents" : [ { + "accountGroupName" : "API Sandbox", + "aid" : "1234", + "date" : "2020-07-17T21:54:54Z", + "event" : "Report created.", + "ipAddress" : "99.128.0.0/11", + "uid" : "1234", + "user" : "API Sandbox User (noreply@thousandeyes.com)", + "resources" : [ { + "name" : "My New report", + "type" : "reportTitle" + }, { + "name" : "Other Report", + "type" : "testName" + } ] + }, { + "accountGroupName" : "API Sandbox", + "aid" : "1234", + "date" : "2020-07-17T22:00:54Z", + "event" : "Login failed.", + "ipAddress" : "99.128.0.0/11", + "uid" : "1234", + "user" : "API Sandbox User (noreply@thousandeyes.com)" + } ], + "startDate" : "2022-07-17T22:00:54Z" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.admin.models.AuditUserEvents.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-administrative/test/test_users_api.py b/thousandeyes-sdk-administrative/test/test_users_api.py new file mode 100644 index 00000000..91a11e0d --- /dev/null +++ b/thousandeyes-sdk-administrative/test/test_users_api.py @@ -0,0 +1,345 @@ +# coding: utf-8 + +""" + Administrative API + + ## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management). + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.admin.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.admin.api.users_api import UsersApi + + +class TestUsersApi(unittest.TestCase): + """UsersApi unit test stubs""" + + def setUp(self) -> None: + self.api = UsersApi() + + def tearDown(self) -> None: + pass + + def test_create_user_models_validation(self) -> None: + """Test case for create_user request and response models""" + request_body_json = """ + { + "loginAccountGroupId" : "691", + "accountGroupRoles" : [ { + "roleIds" : [ "57", "1140" ], + "accountGroupId" : "315" + }, { + "roleIds" : [ "57", "1140" ], + "accountGroupId" : "315" + } ], + "name" : "User X", + "allAccountGroupRoleIds" : [ "57", "1140" ], + "email" : "userx@thousandeyes.com" + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.admin.models.UserRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "loginAccountGroup" : { + "accountGroupName" : "Account A", + "aid" : "1234" + }, + "uid" : "245", + "allAccountGroupRoles" : [ { + "roleId" : "35", + "name" : "Organization Admin", + "isBuiltin" : true, + "hasManagementPermissions" : true + }, { + "roleId" : "35", + "name" : "Organization Admin", + "isBuiltin" : true, + "hasManagementPermissions" : 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" + } + }, + "accountGroupRoles" : [ { + "roles" : [ { + "roleId" : "35", + "name" : "Organization Admin", + "isBuiltin" : true, + "hasManagementPermissions" : true + }, { + "roleId" : "35", + "name" : "Organization Admin", + "isBuiltin" : true, + "hasManagementPermissions" : true + } ], + "accountGroup" : { + "accountGroupName" : "Account A", + "aid" : "1234" + } + }, { + "roles" : [ { + "roleId" : "35", + "name" : "Organization Admin", + "isBuiltin" : true, + "hasManagementPermissions" : true + }, { + "roleId" : "35", + "name" : "Organization Admin", + "isBuiltin" : true, + "hasManagementPermissions" : true + } ], + "accountGroup" : { + "accountGroupName" : "Account A", + "aid" : "1234" + } + } ], + "name" : "User X", + "email" : "userx@thousandeyes.com", + "dateRegistered" : "2020-07-17T22:00:54Z" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.admin.models.CreatedUser.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_delete_user_models_validation(self) -> None: + """Test case for delete_user request and response models""" + + + def test_get_user_models_validation(self) -> None: + """Test case for get_user request and response models""" + + response_body_json = """ + { + "loginAccountGroup" : { + "accountGroupName" : "Account A", + "aid" : "1234" + }, + "uid" : "245", + "lastLogin" : "2022-07-17T22:00:54Z", + "allAccountGroupRoles" : [ { + "roleId" : "35", + "name" : "Organization Admin", + "isBuiltin" : true, + "hasManagementPermissions" : true + }, { + "roleId" : "35", + "name" : "Organization Admin", + "isBuiltin" : true, + "hasManagementPermissions" : 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" + } + }, + "accountGroupRoles" : [ { + "roles" : [ { + "roleId" : "35", + "name" : "Organization Admin", + "isBuiltin" : true, + "hasManagementPermissions" : true + }, { + "roleId" : "35", + "name" : "Organization Admin", + "isBuiltin" : true, + "hasManagementPermissions" : true + } ], + "accountGroup" : { + "accountGroupName" : "Account A", + "aid" : "1234" + } + }, { + "roles" : [ { + "roleId" : "35", + "name" : "Organization Admin", + "isBuiltin" : true, + "hasManagementPermissions" : true + }, { + "roleId" : "35", + "name" : "Organization Admin", + "isBuiltin" : true, + "hasManagementPermissions" : true + } ], + "accountGroup" : { + "accountGroupName" : "Account A", + "aid" : "1234" + } + } ], + "name" : "User X", + "email" : "userx@thousandeyes.com", + "dateRegistered" : "2020-07-17T22:00:54Z" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.admin.models.UserDetail.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_users_models_validation(self) -> None: + """Test case for get_users request and response models""" + + response_body_json = """ + { + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "users" : [ { + "loginAccountGroup" : { + "accountGroupName" : "Account A", + "aid" : "1234" + }, + "uid" : "245", + "lastLogin" : "2022-07-17T22:00:54Z", + "name" : "User X", + "email" : "userx@thousandeyes.com", + "dateRegistered" : "2020-07-17T22:00:54Z" + }, { + "loginAccountGroup" : { + "accountGroupName" : "Account A", + "aid" : "1234" + }, + "uid" : "245", + "lastLogin" : "2022-07-17T22:00:54Z", + "name" : "User X", + "email" : "userx@thousandeyes.com", + "dateRegistered" : "2020-07-17T22:00:54Z" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.admin.models.Users.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_update_user_models_validation(self) -> None: + """Test case for update_user request and response models""" + request_body_json = """ + { + "loginAccountGroupId" : "691", + "accountGroupRoles" : [ { + "roleIds" : [ "57", "1140" ], + "accountGroupId" : "315" + }, { + "roleIds" : [ "57", "1140" ], + "accountGroupId" : "315" + } ], + "name" : "User X", + "allAccountGroupRoleIds" : [ "57", "1140" ], + "email" : "userx@thousandeyes.com" + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.admin.models.UserRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "loginAccountGroup" : { + "accountGroupName" : "Account A", + "aid" : "1234" + }, + "uid" : "245", + "lastLogin" : "2022-07-17T22:00:54Z", + "allAccountGroupRoles" : [ { + "roleId" : "35", + "name" : "Organization Admin", + "isBuiltin" : true, + "hasManagementPermissions" : true + }, { + "roleId" : "35", + "name" : "Organization Admin", + "isBuiltin" : true, + "hasManagementPermissions" : 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" + } + }, + "accountGroupRoles" : [ { + "roles" : [ { + "roleId" : "35", + "name" : "Organization Admin", + "isBuiltin" : true, + "hasManagementPermissions" : true + }, { + "roleId" : "35", + "name" : "Organization Admin", + "isBuiltin" : true, + "hasManagementPermissions" : true + } ], + "accountGroup" : { + "accountGroupName" : "Account A", + "aid" : "1234" + } + }, { + "roles" : [ { + "roleId" : "35", + "name" : "Organization Admin", + "isBuiltin" : true, + "hasManagementPermissions" : true + }, { + "roleId" : "35", + "name" : "Organization Admin", + "isBuiltin" : true, + "hasManagementPermissions" : true + } ], + "accountGroup" : { + "accountGroupName" : "Account A", + "aid" : "1234" + } + } ], + "name" : "User X", + "email" : "userx@thousandeyes.com", + "dateRegistered" : "2020-07-17T22:00:54Z" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.admin.models.UserDetail.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-administrative/test/test_utils.py b/thousandeyes-sdk-administrative/test/test_utils.py new file mode 100644 index 00000000..930528d9 --- /dev/null +++ b/thousandeyes-sdk-administrative/test/test_utils.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +import json +import unittest + +from pydantic import BaseModel + + +def assert_constructed_model_matches_example_json(model: BaseModel, loaded_json: dict): + test_case = unittest.TestCase() + test_case.maxDiff = None + test_case.assertIsNotNone(model) + constructed_json = json.loads(model.to_json()) + sorted_loaded_json = json.dumps(loaded_json, sort_keys=True) + sorted_constructed_json = json.dumps(constructed_json, sort_keys=True) + test_case.assertEqual(sorted_loaded_json, sorted_constructed_json) diff --git a/thousandeyes-sdk-agents/.openapi-generator/FILES b/thousandeyes-sdk-agents/.openapi-generator/FILES index d15d6395..a7a6dd40 100644 --- a/thousandeyes-sdk-agents/.openapi-generator/FILES +++ b/thousandeyes-sdk-agents/.openapi-generator/FILES @@ -117,54 +117,8 @@ src/thousandeyes_sdk/agents/models/validation_error.py src/thousandeyes_sdk/agents/models/validation_error_item.py src/thousandeyes_sdk/agents/py.typed test/__init__.py -test/test_account_group.py -test/test_agent.py -test/test_agent_base.py -test/test_agent_cluster_assign_request.py -test/test_agent_cluster_unassign_request.py -test/test_agent_details.py -test/test_agent_details_expand.py -test/test_agent_ipv6_policy.py -test/test_agent_list_expand.py -test/test_agent_proxies.py -test/test_agent_proxy.py -test/test_agent_request.py -test/test_alert_email.py -test/test_alert_integration_base.py -test/test_alert_integration_type.py -test/test_cloud_agent_detail.py -test/test_cloud_enterprise_agent.py -test/test_cloud_enterprise_agent_type.py -test/test_cloud_enterprise_agents.py -test/test_cluster_member.py -test/test_enterprise_agent.py -test/test_enterprise_agent_cluster_detail.py -test/test_enterprise_agent_data.py -test/test_enterprise_agent_detail.py -test/test_enterprise_agent_ipv6_policy.py -test/test_enterprise_agent_response_expands.py -test/test_enterprise_agent_state.py -test/test_error.py -test/test_error_detail.py -test/test_error_detail_code.py -test/test_interface_ip_mapping.py -test/test_labels.py -test/test_link.py -test/test_list_notification_rules_response.py -test/test_notification.py -test/test_notification_rule.py -test/test_notification_rule_detail.py -test/test_notification_rules.py -test/test_proxy_auth_type.py -test/test_proxy_type.py -test/test_self_links.py -test/test_simple_agent.py -test/test_simple_enterprise_agent.py -test/test_simple_test.py -test/test_test_interval.py -test/test_test_links.py -test/test_test_self_link.py -test/test_test_type.py -test/test_unauthorized_error.py -test/test_validation_error.py -test/test_validation_error_item.py +test/test_cloud_and_enterprise_agent_notification_rules_api.py +test/test_cloud_and_enterprise_agents_api.py +test/test_enterprise_agent_cluster_api.py +test/test_proxies_api.py +test/test_utils.py diff --git a/thousandeyes-sdk-agents/README.md b/thousandeyes-sdk-agents/README.md index 5d5cc0f8..29c5159d 100644 --- a/thousandeyes-sdk-agents/README.md +++ b/thousandeyes-sdk-agents/README.md @@ -5,8 +5,7 @@ Manage all agents available to your account in ThousandEyes, including both Clou This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.4 -- Package version: 1.0.0 +- API version: 7.0.6 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator @@ -20,9 +19,9 @@ Python 3.7+ If the python package is hosted on a repository, you can install directly using: ```sh -pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +pip install -e git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git#egg=thousandeyes-sdk-agents\&subdirectory=thousandeyes-sdk-agents ``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) +(you may need to run `pip` with root permission: `sudo pip install -e git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git#egg=thousandeyes-sdk-agents\&subdirectory=thousandeyes-sdk-agents`) Then import the package: ```python @@ -100,13 +99,13 @@ Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *CloudAndEnterpriseAgentNotificationRulesApi* | [**get_agents_notification_rule**](docs/CloudAndEnterpriseAgentNotificationRulesApi.md#get_agents_notification_rule) | **GET** /v7/agents/notification-rules/{notificationRuleId} | Retrieve agent notification rule *CloudAndEnterpriseAgentNotificationRulesApi* | [**get_agents_notification_rules**](docs/CloudAndEnterpriseAgentNotificationRulesApi.md#get_agents_notification_rules) | **GET** /v7/agents/notification-rules | List agent notification rules -*CloudAndEnterpriseAgentsApi* | [**delete_enterprise_agent**](docs/CloudAndEnterpriseAgentsApi.md#delete_enterprise_agent) | **DELETE** /v7/agents/{agentId} | Delete Enterprise Agent -*CloudAndEnterpriseAgentsApi* | [**get_agent_details**](docs/CloudAndEnterpriseAgentsApi.md#get_agent_details) | **GET** /v7/agents/{agentId} | Retrieve Cloud and Enterprise Agent +*CloudAndEnterpriseAgentsApi* | [**delete_agent**](docs/CloudAndEnterpriseAgentsApi.md#delete_agent) | **DELETE** /v7/agents/{agentId} | Delete Enterprise Agent +*CloudAndEnterpriseAgentsApi* | [**get_agent**](docs/CloudAndEnterpriseAgentsApi.md#get_agent) | **GET** /v7/agents/{agentId} | Retrieve Cloud and Enterprise Agent *CloudAndEnterpriseAgentsApi* | [**get_agents**](docs/CloudAndEnterpriseAgentsApi.md#get_agents) | **GET** /v7/agents | List Cloud and Enterprise Agents -*CloudAndEnterpriseAgentsApi* | [**update_enterprise_agent_details**](docs/CloudAndEnterpriseAgentsApi.md#update_enterprise_agent_details) | **PUT** /v7/agents/{agentId} | Update Enterprise Agent -*EnterpriseAgentClusterApi* | [**assign_enterprise_agent_cluster**](docs/EnterpriseAgentClusterApi.md#assign_enterprise_agent_cluster) | **POST** /v7/agents/{agentId}/cluster/assign | Add member to Enterprise Agent cluster -*EnterpriseAgentClusterApi* | [**unassign_enterprise_agent_from_cluster**](docs/EnterpriseAgentClusterApi.md#unassign_enterprise_agent_from_cluster) | **POST** /v7/agents/{agentId}/cluster/unassign | Remove member from Enterprise Agent cluster -*ProxiesApi* | [**get_agent_proxies**](docs/ProxiesApi.md#get_agent_proxies) | **GET** /v7/agents/proxies | List agent proxies +*CloudAndEnterpriseAgentsApi* | [**update_agent**](docs/CloudAndEnterpriseAgentsApi.md#update_agent) | **PUT** /v7/agents/{agentId} | Update Enterprise Agent +*EnterpriseAgentClusterApi* | [**assign_agent_to_cluster**](docs/EnterpriseAgentClusterApi.md#assign_agent_to_cluster) | **POST** /v7/agents/{agentId}/cluster/assign | Add member to Enterprise Agent cluster +*EnterpriseAgentClusterApi* | [**unassign_agent_from_cluster**](docs/EnterpriseAgentClusterApi.md#unassign_agent_from_cluster) | **POST** /v7/agents/{agentId}/cluster/unassign | Remove member from Enterprise Agent cluster +*ProxiesApi* | [**get_agents_proxies**](docs/ProxiesApi.md#get_agents_proxies) | **GET** /v7/agents/proxies | List agent proxies ## Documentation For Models diff --git a/thousandeyes-sdk-agents/docs/CloudAndEnterpriseAgentNotificationRulesApi.md b/thousandeyes-sdk-agents/docs/CloudAndEnterpriseAgentNotificationRulesApi.md index cd22ccfc..bfd4cf45 100644 --- a/thousandeyes-sdk-agents/docs/CloudAndEnterpriseAgentNotificationRulesApi.md +++ b/thousandeyes-sdk-agents/docs/CloudAndEnterpriseAgentNotificationRulesApi.md @@ -78,7 +78,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -163,7 +163,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-agents/docs/CloudAndEnterpriseAgentsApi.md b/thousandeyes-sdk-agents/docs/CloudAndEnterpriseAgentsApi.md index 19f3bcd8..0e24317d 100644 --- a/thousandeyes-sdk-agents/docs/CloudAndEnterpriseAgentsApi.md +++ b/thousandeyes-sdk-agents/docs/CloudAndEnterpriseAgentsApi.md @@ -4,14 +4,14 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**delete_enterprise_agent**](CloudAndEnterpriseAgentsApi.md#delete_enterprise_agent) | **DELETE** /v7/agents/{agentId} | Delete Enterprise Agent -[**get_agent_details**](CloudAndEnterpriseAgentsApi.md#get_agent_details) | **GET** /v7/agents/{agentId} | Retrieve Cloud and Enterprise Agent +[**delete_agent**](CloudAndEnterpriseAgentsApi.md#delete_agent) | **DELETE** /v7/agents/{agentId} | Delete Enterprise Agent +[**get_agent**](CloudAndEnterpriseAgentsApi.md#get_agent) | **GET** /v7/agents/{agentId} | Retrieve Cloud and Enterprise Agent [**get_agents**](CloudAndEnterpriseAgentsApi.md#get_agents) | **GET** /v7/agents | List Cloud and Enterprise Agents -[**update_enterprise_agent_details**](CloudAndEnterpriseAgentsApi.md#update_enterprise_agent_details) | **PUT** /v7/agents/{agentId} | Update Enterprise Agent +[**update_agent**](CloudAndEnterpriseAgentsApi.md#update_agent) | **PUT** /v7/agents/{agentId} | Update Enterprise Agent -# **delete_enterprise_agent** -> delete_enterprise_agent(agent_id, aid=aid) +# **delete_agent** +> delete_agent(agent_id, aid=aid) Delete Enterprise Agent @@ -51,9 +51,9 @@ with thousandeyes_sdk.agents.ApiClient(configuration) as api_client: try: # Delete Enterprise Agent - api_instance.delete_enterprise_agent(agent_id, aid=aid) + api_instance.delete_agent(agent_id, aid=aid) except Exception as e: - print("Exception when calling CloudAndEnterpriseAgentsApi->delete_enterprise_agent: %s\n" % e) + print("Exception when calling CloudAndEnterpriseAgentsApi->delete_agent: %s\n" % e) ``` @@ -77,7 +77,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/problem+json + - **Accept**: application/json, application/problem+json ### HTTP response details @@ -94,8 +94,8 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_agent_details** -> AgentDetails get_agent_details(agent_id, aid=aid, expand=expand) +# **get_agent** +> AgentDetails get_agent(agent_id, aid=aid, expand=expand) Retrieve Cloud and Enterprise Agent @@ -138,11 +138,11 @@ with thousandeyes_sdk.agents.ApiClient(configuration) as api_client: try: # Retrieve Cloud and Enterprise Agent - api_response = api_instance.get_agent_details(agent_id, aid=aid, expand=expand) - print("The response of CloudAndEnterpriseAgentsApi->get_agent_details:\n") + api_response = api_instance.get_agent(agent_id, aid=aid, expand=expand) + print("The response of CloudAndEnterpriseAgentsApi->get_agent:\n") pprint(api_response) except Exception as e: - print("Exception when calling CloudAndEnterpriseAgentsApi->get_agent_details: %s\n" % e) + print("Exception when calling CloudAndEnterpriseAgentsApi->get_agent: %s\n" % e) ``` @@ -167,7 +167,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -258,7 +258,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -275,8 +275,8 @@ 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_enterprise_agent_details** -> AgentDetails update_enterprise_agent_details(agent_id, agent_request, aid=aid, expand=expand) +# **update_agent** +> AgentDetails update_agent(agent_id, agent_request, aid=aid, expand=expand) Update Enterprise Agent @@ -321,11 +321,11 @@ with thousandeyes_sdk.agents.ApiClient(configuration) as api_client: try: # Update Enterprise Agent - api_response = api_instance.update_enterprise_agent_details(agent_id, agent_request, aid=aid, expand=expand) - print("The response of CloudAndEnterpriseAgentsApi->update_enterprise_agent_details:\n") + api_response = api_instance.update_agent(agent_id, agent_request, aid=aid, expand=expand) + print("The response of CloudAndEnterpriseAgentsApi->update_agent:\n") pprint(api_response) except Exception as e: - print("Exception when calling CloudAndEnterpriseAgentsApi->update_enterprise_agent_details: %s\n" % e) + print("Exception when calling CloudAndEnterpriseAgentsApi->update_agent: %s\n" % e) ``` @@ -351,7 +351,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-agents/docs/EnterpriseAgentClusterApi.md b/thousandeyes-sdk-agents/docs/EnterpriseAgentClusterApi.md index 8e8955ab..f7ae480f 100644 --- a/thousandeyes-sdk-agents/docs/EnterpriseAgentClusterApi.md +++ b/thousandeyes-sdk-agents/docs/EnterpriseAgentClusterApi.md @@ -4,12 +4,12 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**assign_enterprise_agent_cluster**](EnterpriseAgentClusterApi.md#assign_enterprise_agent_cluster) | **POST** /v7/agents/{agentId}/cluster/assign | Add member to Enterprise Agent cluster -[**unassign_enterprise_agent_from_cluster**](EnterpriseAgentClusterApi.md#unassign_enterprise_agent_from_cluster) | **POST** /v7/agents/{agentId}/cluster/unassign | Remove member from Enterprise Agent cluster +[**assign_agent_to_cluster**](EnterpriseAgentClusterApi.md#assign_agent_to_cluster) | **POST** /v7/agents/{agentId}/cluster/assign | Add member to Enterprise Agent cluster +[**unassign_agent_from_cluster**](EnterpriseAgentClusterApi.md#unassign_agent_from_cluster) | **POST** /v7/agents/{agentId}/cluster/unassign | Remove member from Enterprise Agent cluster -# **assign_enterprise_agent_cluster** -> AgentDetails assign_enterprise_agent_cluster(agent_id, agent_cluster_assign_request, aid=aid, expand=expand) +# **assign_agent_to_cluster** +> AgentDetails assign_agent_to_cluster(agent_id, agent_cluster_assign_request, aid=aid, expand=expand) Add member to Enterprise Agent cluster @@ -54,11 +54,11 @@ with thousandeyes_sdk.agents.ApiClient(configuration) as api_client: try: # Add member to Enterprise Agent cluster - api_response = api_instance.assign_enterprise_agent_cluster(agent_id, agent_cluster_assign_request, aid=aid, expand=expand) - print("The response of EnterpriseAgentClusterApi->assign_enterprise_agent_cluster:\n") + api_response = api_instance.assign_agent_to_cluster(agent_id, agent_cluster_assign_request, aid=aid, expand=expand) + print("The response of EnterpriseAgentClusterApi->assign_agent_to_cluster:\n") pprint(api_response) except Exception as e: - print("Exception when calling EnterpriseAgentClusterApi->assign_enterprise_agent_cluster: %s\n" % e) + print("Exception when calling EnterpriseAgentClusterApi->assign_agent_to_cluster: %s\n" % e) ``` @@ -84,7 +84,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -102,8 +102,8 @@ 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) -# **unassign_enterprise_agent_from_cluster** -> CloudEnterpriseAgents unassign_enterprise_agent_from_cluster(agent_id, agent_cluster_unassign_request, aid=aid, expand=expand) +# **unassign_agent_from_cluster** +> CloudEnterpriseAgents unassign_agent_from_cluster(agent_id, agent_cluster_unassign_request, aid=aid, expand=expand) Remove member from Enterprise Agent cluster @@ -148,11 +148,11 @@ with thousandeyes_sdk.agents.ApiClient(configuration) as api_client: try: # Remove member from Enterprise Agent cluster - api_response = api_instance.unassign_enterprise_agent_from_cluster(agent_id, agent_cluster_unassign_request, aid=aid, expand=expand) - print("The response of EnterpriseAgentClusterApi->unassign_enterprise_agent_from_cluster:\n") + api_response = api_instance.unassign_agent_from_cluster(agent_id, agent_cluster_unassign_request, aid=aid, expand=expand) + print("The response of EnterpriseAgentClusterApi->unassign_agent_from_cluster:\n") pprint(api_response) except Exception as e: - print("Exception when calling EnterpriseAgentClusterApi->unassign_enterprise_agent_from_cluster: %s\n" % e) + print("Exception when calling EnterpriseAgentClusterApi->unassign_agent_from_cluster: %s\n" % e) ``` @@ -178,7 +178,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-agents/docs/ProxiesApi.md b/thousandeyes-sdk-agents/docs/ProxiesApi.md index 02614981..7275f103 100644 --- a/thousandeyes-sdk-agents/docs/ProxiesApi.md +++ b/thousandeyes-sdk-agents/docs/ProxiesApi.md @@ -4,11 +4,11 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**get_agent_proxies**](ProxiesApi.md#get_agent_proxies) | **GET** /v7/agents/proxies | List agent proxies +[**get_agents_proxies**](ProxiesApi.md#get_agents_proxies) | **GET** /v7/agents/proxies | List agent proxies -# **get_agent_proxies** -> AgentProxies get_agent_proxies(aid=aid) +# **get_agents_proxies** +> AgentProxies get_agents_proxies(aid=aid) List agent proxies @@ -48,11 +48,11 @@ with thousandeyes_sdk.agents.ApiClient(configuration) as api_client: try: # List agent proxies - api_response = api_instance.get_agent_proxies(aid=aid) - print("The response of ProxiesApi->get_agent_proxies:\n") + api_response = api_instance.get_agents_proxies(aid=aid) + print("The response of ProxiesApi->get_agents_proxies:\n") pprint(api_response) except Exception as e: - print("Exception when calling ProxiesApi->get_agent_proxies: %s\n" % e) + print("Exception when calling ProxiesApi->get_agents_proxies: %s\n" % e) ``` @@ -75,7 +75,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-agents/docs/ValidationErrorItem.md b/thousandeyes-sdk-agents/docs/ValidationErrorItem.md index 94325485..bc69aa30 100644 --- a/thousandeyes-sdk-agents/docs/ValidationErrorItem.md +++ b/thousandeyes-sdk-agents/docs/ValidationErrorItem.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **code** | **str** | (Optional) A unique error type/code that can be referenced in the documentation for further details. | [optional] -**var_field** | **int** | Identifies the field that triggered this particular error. | [optional] +**var_field** | **str** | Identifies the field that triggered this particular error. | [optional] **message** | **str** | A short, human-readable summary of the error. | [optional] ## Example diff --git a/thousandeyes-sdk-agents/pyproject.toml b/thousandeyes-sdk-agents/pyproject.toml index c1e13969..0637042a 100644 --- a/thousandeyes-sdk-agents/pyproject.toml +++ b/thousandeyes-sdk-agents/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "thousandeyes-sdk-agents" -version = "1.0.0" +dynamic = ["version"] authors = [ { name = "ThousandEyes API Team", email = "api-team@thousandeyes.com" } ] @@ -11,9 +11,12 @@ dependencies = [ "python-dateutil >=2.8.2", "pydantic >=2", "typing-extensions >=4.7.1", - "thousandeyes-sdk-client==1.0.0", + "thousandeyes-sdk-core", ] +[tool.setuptools.dynamic] +version = {attr = "thousandeyes_sdk.client.__version__"} + [project.optional-dependencies] test = [ "pytest~=7.1.3", diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/__init__.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/__init__.py index 15697c26..2ea022ee 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/__init__.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/__init__.py @@ -7,15 +7,13 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 -__version__ = "1.0.0" - # import apis into sdk package from thousandeyes_sdk.agents.api.cloud_and_enterprise_agent_notification_rules_api import CloudAndEnterpriseAgentNotificationRulesApi from thousandeyes_sdk.agents.api.cloud_and_enterprise_agents_api import CloudAndEnterpriseAgentsApi diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/api/cloud_and_enterprise_agent_notification_rules_api.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/api/cloud_and_enterprise_agent_notification_rules_api.py index 91cd93cc..a0895fba 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/api/cloud_and_enterprise_agent_notification_rules_api.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/api/cloud_and_enterprise_agent_notification_rules_api.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -27,6 +27,7 @@ from thousandeyes_sdk.agents.models.notification_rule_detail import Notification from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class CloudAndEnterpriseAgentNotificationRulesApi: @@ -39,6 +40,7 @@ class CloudAndEnterpriseAgentNotificationRulesApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @@ -310,6 +312,7 @@ class CloudAndEnterpriseAgentNotificationRulesApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -591,6 +594,7 @@ class CloudAndEnterpriseAgentNotificationRulesApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/api/cloud_and_enterprise_agents_api.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/api/cloud_and_enterprise_agents_api.py index 94aacbd3..24445b99 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/api/cloud_and_enterprise_agents_api.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/api/cloud_and_enterprise_agents_api.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -31,6 +31,7 @@ from thousandeyes_sdk.agents.models.cloud_enterprise_agents import CloudEnterpri from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class CloudAndEnterpriseAgentsApi: @@ -43,11 +44,12 @@ class CloudAndEnterpriseAgentsApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @validate_call - def delete_enterprise_agent( + def delete_agent( self, agent_id: Annotated[StrictStr, Field(description="Unique ID for the agent.")], 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, @@ -94,7 +96,7 @@ class CloudAndEnterpriseAgentsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._delete_enterprise_agent_serialize( + _param = self._delete_agent_serialize( agent_id=agent_id, aid=aid, _request_auth=_request_auth, @@ -125,7 +127,7 @@ class CloudAndEnterpriseAgentsApi: @validate_call - def delete_enterprise_agent_with_http_info( + def delete_agent_with_http_info( self, agent_id: Annotated[StrictStr, Field(description="Unique ID for the agent.")], 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, @@ -172,7 +174,7 @@ class CloudAndEnterpriseAgentsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._delete_enterprise_agent_serialize( + _param = self._delete_agent_serialize( agent_id=agent_id, aid=aid, _request_auth=_request_auth, @@ -203,7 +205,7 @@ class CloudAndEnterpriseAgentsApi: @validate_call - def delete_enterprise_agent_without_preload_content( + def delete_agent_without_preload_content( self, agent_id: Annotated[StrictStr, Field(description="Unique ID for the agent.")], 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, @@ -250,7 +252,7 @@ class CloudAndEnterpriseAgentsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._delete_enterprise_agent_serialize( + _param = self._delete_agent_serialize( agent_id=agent_id, aid=aid, _request_auth=_request_auth, @@ -275,7 +277,7 @@ class CloudAndEnterpriseAgentsApi: return response_data.response - def _delete_enterprise_agent_serialize( + def _delete_agent_serialize( self, agent_id, aid, @@ -313,6 +315,7 @@ class CloudAndEnterpriseAgentsApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ + 'application/json', 'application/problem+json' ] ) @@ -342,7 +345,7 @@ class CloudAndEnterpriseAgentsApi: @validate_call - def get_agent_details( + def get_agent( self, agent_id: Annotated[StrictStr, Field(description="Unique ID for the agent.")], 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, @@ -392,7 +395,7 @@ class CloudAndEnterpriseAgentsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_agent_details_serialize( + _param = self._get_agent_serialize( agent_id=agent_id, aid=aid, expand=expand, @@ -424,7 +427,7 @@ class CloudAndEnterpriseAgentsApi: @validate_call - def get_agent_details_with_http_info( + def get_agent_with_http_info( self, agent_id: Annotated[StrictStr, Field(description="Unique ID for the agent.")], 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, @@ -474,7 +477,7 @@ class CloudAndEnterpriseAgentsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_agent_details_serialize( + _param = self._get_agent_serialize( agent_id=agent_id, aid=aid, expand=expand, @@ -506,7 +509,7 @@ class CloudAndEnterpriseAgentsApi: @validate_call - def get_agent_details_without_preload_content( + def get_agent_without_preload_content( self, agent_id: Annotated[StrictStr, Field(description="Unique ID for the agent.")], 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, @@ -556,7 +559,7 @@ class CloudAndEnterpriseAgentsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_agent_details_serialize( + _param = self._get_agent_serialize( agent_id=agent_id, aid=aid, expand=expand, @@ -582,7 +585,7 @@ class CloudAndEnterpriseAgentsApi: return response_data.response - def _get_agent_details_serialize( + def _get_agent_serialize( self, agent_id, aid, @@ -627,6 +630,7 @@ class CloudAndEnterpriseAgentsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -944,6 +948,7 @@ class CloudAndEnterpriseAgentsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -973,7 +978,7 @@ class CloudAndEnterpriseAgentsApi: @validate_call - def update_enterprise_agent_details( + def update_agent( self, agent_id: Annotated[StrictStr, Field(description="Unique ID for the agent.")], agent_request: AgentRequest, @@ -1026,7 +1031,7 @@ class CloudAndEnterpriseAgentsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._update_enterprise_agent_details_serialize( + _param = self._update_agent_serialize( agent_id=agent_id, agent_request=agent_request, aid=aid, @@ -1060,7 +1065,7 @@ class CloudAndEnterpriseAgentsApi: @validate_call - def update_enterprise_agent_details_with_http_info( + def update_agent_with_http_info( self, agent_id: Annotated[StrictStr, Field(description="Unique ID for the agent.")], agent_request: AgentRequest, @@ -1113,7 +1118,7 @@ class CloudAndEnterpriseAgentsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._update_enterprise_agent_details_serialize( + _param = self._update_agent_serialize( agent_id=agent_id, agent_request=agent_request, aid=aid, @@ -1147,7 +1152,7 @@ class CloudAndEnterpriseAgentsApi: @validate_call - def update_enterprise_agent_details_without_preload_content( + def update_agent_without_preload_content( self, agent_id: Annotated[StrictStr, Field(description="Unique ID for the agent.")], agent_request: AgentRequest, @@ -1200,7 +1205,7 @@ class CloudAndEnterpriseAgentsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._update_enterprise_agent_details_serialize( + _param = self._update_agent_serialize( agent_id=agent_id, agent_request=agent_request, aid=aid, @@ -1228,7 +1233,7 @@ class CloudAndEnterpriseAgentsApi: return response_data.response - def _update_enterprise_agent_details_serialize( + def _update_agent_serialize( self, agent_id, agent_request, @@ -1276,6 +1281,7 @@ class CloudAndEnterpriseAgentsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/api/enterprise_agent_cluster_api.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/api/enterprise_agent_cluster_api.py index 9af22787..51134593 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/api/enterprise_agent_cluster_api.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/api/enterprise_agent_cluster_api.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -30,6 +30,7 @@ from thousandeyes_sdk.agents.models.cloud_enterprise_agents import CloudEnterpri from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class EnterpriseAgentClusterApi: @@ -42,11 +43,12 @@ class EnterpriseAgentClusterApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @validate_call - def assign_enterprise_agent_cluster( + def assign_agent_to_cluster( self, agent_id: Annotated[StrictStr, Field(description="Unique ID for the Enterprise Agent cluster to add new agents to.")], agent_cluster_assign_request: AgentClusterAssignRequest, @@ -99,7 +101,7 @@ class EnterpriseAgentClusterApi: :return: Returns the result object. """ # noqa: E501 - _param = self._assign_enterprise_agent_cluster_serialize( + _param = self._assign_agent_to_cluster_serialize( agent_id=agent_id, agent_cluster_assign_request=agent_cluster_assign_request, aid=aid, @@ -133,7 +135,7 @@ class EnterpriseAgentClusterApi: @validate_call - def assign_enterprise_agent_cluster_with_http_info( + def assign_agent_to_cluster_with_http_info( self, agent_id: Annotated[StrictStr, Field(description="Unique ID for the Enterprise Agent cluster to add new agents to.")], agent_cluster_assign_request: AgentClusterAssignRequest, @@ -186,7 +188,7 @@ class EnterpriseAgentClusterApi: :return: Returns the result object. """ # noqa: E501 - _param = self._assign_enterprise_agent_cluster_serialize( + _param = self._assign_agent_to_cluster_serialize( agent_id=agent_id, agent_cluster_assign_request=agent_cluster_assign_request, aid=aid, @@ -220,7 +222,7 @@ class EnterpriseAgentClusterApi: @validate_call - def assign_enterprise_agent_cluster_without_preload_content( + def assign_agent_to_cluster_without_preload_content( self, agent_id: Annotated[StrictStr, Field(description="Unique ID for the Enterprise Agent cluster to add new agents to.")], agent_cluster_assign_request: AgentClusterAssignRequest, @@ -273,7 +275,7 @@ class EnterpriseAgentClusterApi: :return: Returns the result object. """ # noqa: E501 - _param = self._assign_enterprise_agent_cluster_serialize( + _param = self._assign_agent_to_cluster_serialize( agent_id=agent_id, agent_cluster_assign_request=agent_cluster_assign_request, aid=aid, @@ -301,7 +303,7 @@ class EnterpriseAgentClusterApi: return response_data.response - def _assign_enterprise_agent_cluster_serialize( + def _assign_agent_to_cluster_serialize( self, agent_id, agent_cluster_assign_request, @@ -349,6 +351,7 @@ class EnterpriseAgentClusterApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -391,7 +394,7 @@ class EnterpriseAgentClusterApi: @validate_call - def unassign_enterprise_agent_from_cluster( + def unassign_agent_from_cluster( self, agent_id: Annotated[StrictStr, Field(description="Unique ID for the Enterprise Agent cluster to remove agents from.")], agent_cluster_unassign_request: AgentClusterUnassignRequest, @@ -444,7 +447,7 @@ class EnterpriseAgentClusterApi: :return: Returns the result object. """ # noqa: E501 - _param = self._unassign_enterprise_agent_from_cluster_serialize( + _param = self._unassign_agent_from_cluster_serialize( agent_id=agent_id, agent_cluster_unassign_request=agent_cluster_unassign_request, aid=aid, @@ -478,7 +481,7 @@ class EnterpriseAgentClusterApi: @validate_call - def unassign_enterprise_agent_from_cluster_with_http_info( + def unassign_agent_from_cluster_with_http_info( self, agent_id: Annotated[StrictStr, Field(description="Unique ID for the Enterprise Agent cluster to remove agents from.")], agent_cluster_unassign_request: AgentClusterUnassignRequest, @@ -531,7 +534,7 @@ class EnterpriseAgentClusterApi: :return: Returns the result object. """ # noqa: E501 - _param = self._unassign_enterprise_agent_from_cluster_serialize( + _param = self._unassign_agent_from_cluster_serialize( agent_id=agent_id, agent_cluster_unassign_request=agent_cluster_unassign_request, aid=aid, @@ -565,7 +568,7 @@ class EnterpriseAgentClusterApi: @validate_call - def unassign_enterprise_agent_from_cluster_without_preload_content( + def unassign_agent_from_cluster_without_preload_content( self, agent_id: Annotated[StrictStr, Field(description="Unique ID for the Enterprise Agent cluster to remove agents from.")], agent_cluster_unassign_request: AgentClusterUnassignRequest, @@ -618,7 +621,7 @@ class EnterpriseAgentClusterApi: :return: Returns the result object. """ # noqa: E501 - _param = self._unassign_enterprise_agent_from_cluster_serialize( + _param = self._unassign_agent_from_cluster_serialize( agent_id=agent_id, agent_cluster_unassign_request=agent_cluster_unassign_request, aid=aid, @@ -646,7 +649,7 @@ class EnterpriseAgentClusterApi: return response_data.response - def _unassign_enterprise_agent_from_cluster_serialize( + def _unassign_agent_from_cluster_serialize( self, agent_id, agent_cluster_unassign_request, @@ -694,6 +697,7 @@ class EnterpriseAgentClusterApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/api/proxies_api.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/api/proxies_api.py index 41ea441d..3d82855c 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/api/proxies_api.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/api/proxies_api.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -26,6 +26,7 @@ from thousandeyes_sdk.agents.models.agent_proxies import AgentProxies from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class ProxiesApi: @@ -38,11 +39,12 @@ class ProxiesApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @validate_call - def get_agent_proxies( + def get_agents_proxies( 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[ @@ -86,7 +88,7 @@ class ProxiesApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_agent_proxies_serialize( + _param = self._get_agents_proxies_serialize( aid=aid, _request_auth=_request_auth, _content_type=_content_type, @@ -116,7 +118,7 @@ class ProxiesApi: @validate_call - def get_agent_proxies_with_http_info( + def get_agents_proxies_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[ @@ -160,7 +162,7 @@ class ProxiesApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_agent_proxies_serialize( + _param = self._get_agents_proxies_serialize( aid=aid, _request_auth=_request_auth, _content_type=_content_type, @@ -190,7 +192,7 @@ class ProxiesApi: @validate_call - def get_agent_proxies_without_preload_content( + def get_agents_proxies_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[ @@ -234,7 +236,7 @@ class ProxiesApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_agent_proxies_serialize( + _param = self._get_agents_proxies_serialize( aid=aid, _request_auth=_request_auth, _content_type=_content_type, @@ -258,7 +260,7 @@ class ProxiesApi: return response_data.response - def _get_agent_proxies_serialize( + def _get_agents_proxies_serialize( self, aid, _request_auth, @@ -294,6 +296,7 @@ class ProxiesApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/__init__.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/__init__.py index 11489b9e..897a7293 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/__init__.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/__init__.py @@ -6,7 +6,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/account_group.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/account_group.py index 1f89049a..35f971f8 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/account_group.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/account_group.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class AccountGroup(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class AccountGroup(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/agent.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/agent.py index 1beaeb71..4ed2835e 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/agent.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/agent.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -44,6 +44,7 @@ class Agent(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -54,7 +55,7 @@ class Agent(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/agent_base.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/agent_base.py index f30f6bdf..8be7d804 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/agent_base.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/agent_base.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class AgentBase(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class AgentBase(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/agent_cluster_assign_request.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/agent_cluster_assign_request.py index e1b94e34..55eedc43 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/agent_cluster_assign_request.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/agent_cluster_assign_request.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -33,6 +33,7 @@ class AgentClusterAssignRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -43,7 +44,7 @@ class AgentClusterAssignRequest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/agent_cluster_unassign_request.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/agent_cluster_unassign_request.py index 4c720ec8..1f38afc8 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/agent_cluster_unassign_request.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/agent_cluster_unassign_request.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -33,6 +33,7 @@ class AgentClusterUnassignRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -43,7 +44,7 @@ class AgentClusterUnassignRequest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/agent_details.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/agent_details.py index 688cc916..65e697ee 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/agent_details.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/agent_details.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -20,7 +20,7 @@ from typing import Any, List, Optional from thousandeyes_sdk.agents.models.cloud_agent_detail import CloudAgentDetail from thousandeyes_sdk.agents.models.enterprise_agent_cluster_detail import EnterpriseAgentClusterDetail from thousandeyes_sdk.agents.models.enterprise_agent_detail import EnterpriseAgentDetail -from pydantic import StrictStr, Field +from pydantic import StrictStr, Field, model_serializer from typing import Union, List, Set, Optional, Dict from typing_extensions import Literal, Self @@ -126,6 +126,10 @@ class AgentDetails(BaseModel): 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: diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/agent_details_expand.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/agent_details_expand.py index 507aa2c6..83cf2e6c 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/agent_details_expand.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/agent_details_expand.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/agent_ipv6_policy.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/agent_ipv6_policy.py index a033ef6e..8b64fe90 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/agent_ipv6_policy.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/agent_ipv6_policy.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/agent_list_expand.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/agent_list_expand.py index 35931e35..00fb1e2a 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/agent_list_expand.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/agent_list_expand.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/agent_proxies.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/agent_proxies.py index 956b354d..fee32ed9 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/agent_proxies.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/agent_proxies.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class AgentProxies(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class AgentProxies(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/agent_proxy.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/agent_proxy.py index 11f0dd52..f64e95bb 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/agent_proxy.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/agent_proxy.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -46,6 +46,7 @@ class AgentProxy(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -56,7 +57,7 @@ class AgentProxy(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/agent_request.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/agent_request.py index f4700e5a..6b55bd71 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/agent_request.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/agent_request.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -41,6 +41,7 @@ class AgentRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -51,7 +52,7 @@ class AgentRequest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/alert_email.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/alert_email.py index a3f99df8..938aebae 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/alert_email.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/alert_email.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class AlertEmail(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class AlertEmail(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/alert_integration_base.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/alert_integration_base.py index afeb6a64..e3304fe8 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/alert_integration_base.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/alert_integration_base.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -41,6 +41,7 @@ class AlertIntegrationBase(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -51,7 +52,7 @@ class AlertIntegrationBase(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/alert_integration_type.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/alert_integration_type.py index 5aa36e43..6a36100f 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/alert_integration_type.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/alert_integration_type.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/cloud_agent_detail.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/cloud_agent_detail.py index c3f4a293..93fa6ecc 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/cloud_agent_detail.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/cloud_agent_detail.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -57,6 +57,7 @@ class CloudAgentDetail(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -67,7 +68,7 @@ class CloudAgentDetail(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/cloud_enterprise_agent.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/cloud_enterprise_agent.py index ddbd3fc6..7cc2f424 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/cloud_enterprise_agent.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/cloud_enterprise_agent.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -23,7 +23,7 @@ from thousandeyes_sdk.agents.models.agent import Agent from thousandeyes_sdk.agents.models.enterprise_agent import EnterpriseAgent from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict from typing_extensions import Literal, Self -from pydantic import Field +from pydantic import Field, model_serializer CLOUDENTERPRISEAGENT_ANY_OF_SCHEMAS = ["Agent", "EnterpriseAgent"] @@ -107,6 +107,10 @@ class CloudEnterpriseAgent(BaseModel): 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: diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/cloud_enterprise_agent_type.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/cloud_enterprise_agent_type.py index 32c2b4e4..b5b8b254 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/cloud_enterprise_agent_type.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/cloud_enterprise_agent_type.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/cloud_enterprise_agents.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/cloud_enterprise_agents.py index 0e910187..a93fea77 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/cloud_enterprise_agents.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/cloud_enterprise_agents.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class CloudEnterpriseAgents(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class CloudEnterpriseAgents(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/cluster_member.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/cluster_member.py index c9d780a5..25b6b4f8 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/cluster_member.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/cluster_member.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -45,6 +45,7 @@ class ClusterMember(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -55,7 +56,7 @@ class ClusterMember(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/enterprise_agent.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/enterprise_agent.py index 6dc62710..41fcaea5 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/enterprise_agent.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/enterprise_agent.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -64,6 +64,7 @@ class EnterpriseAgent(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -74,7 +75,7 @@ class EnterpriseAgent(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/enterprise_agent_cluster_detail.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/enterprise_agent_cluster_detail.py index 1f43d0b4..352b2cd0 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/enterprise_agent_cluster_detail.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/enterprise_agent_cluster_detail.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -79,6 +79,7 @@ class EnterpriseAgentClusterDetail(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -89,7 +90,7 @@ class EnterpriseAgentClusterDetail(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/enterprise_agent_data.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/enterprise_agent_data.py index bd5b3350..6850b5c4 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/enterprise_agent_data.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/enterprise_agent_data.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -52,6 +52,7 @@ class EnterpriseAgentData(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -62,7 +63,7 @@ class EnterpriseAgentData(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/enterprise_agent_detail.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/enterprise_agent_detail.py index 27d65e4b..21f9a02a 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/enterprise_agent_detail.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/enterprise_agent_detail.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -79,6 +79,7 @@ class EnterpriseAgentDetail(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -89,7 +90,7 @@ class EnterpriseAgentDetail(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/enterprise_agent_ipv6_policy.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/enterprise_agent_ipv6_policy.py index 0b77fa79..5a79651b 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/enterprise_agent_ipv6_policy.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/enterprise_agent_ipv6_policy.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/enterprise_agent_response_expands.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/enterprise_agent_response_expands.py index 522b3dd8..e95159fc 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/enterprise_agent_response_expands.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/enterprise_agent_response_expands.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -38,6 +38,7 @@ class EnterpriseAgentResponseExpands(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -48,7 +49,7 @@ class EnterpriseAgentResponseExpands(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/enterprise_agent_state.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/enterprise_agent_state.py index 31779038..85aaa0c5 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/enterprise_agent_state.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/enterprise_agent_state.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/error.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/error.py index 0f733162..9413cc54 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/error.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/error.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -37,6 +37,7 @@ class Error(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -47,7 +48,7 @@ class Error(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/error_detail.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/error_detail.py index 36208a4c..997562a4 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/error_detail.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/error_detail.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class ErrorDetail(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class ErrorDetail(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/error_detail_code.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/error_detail_code.py index bd4604ef..b726a6de 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/error_detail_code.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/error_detail_code.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/interface_ip_mapping.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/interface_ip_mapping.py index 832e0d5b..cb6183f1 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/interface_ip_mapping.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/interface_ip_mapping.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class InterfaceIpMapping(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class InterfaceIpMapping(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/labels.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/labels.py index de6c928f..690d2e74 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/labels.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/labels.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class Labels(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class Labels(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/link.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/link.py index 496c9d3b..7a6c763f 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/link.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/link.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -40,6 +40,7 @@ class Link(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -50,7 +51,7 @@ class Link(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/list_notification_rules_response.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/list_notification_rules_response.py index f1122153..244ee33a 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/list_notification_rules_response.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/list_notification_rules_response.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class ListNotificationRulesResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class ListNotificationRulesResponse(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/notification.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/notification.py index a690dfdc..5291860b 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/notification.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/notification.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -37,6 +37,7 @@ class Notification(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -47,7 +48,7 @@ class Notification(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/notification_rule.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/notification_rule.py index b0749a3f..48a2ebaa 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/notification_rule.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/notification_rule.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -37,6 +37,7 @@ class NotificationRule(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -47,7 +48,7 @@ class NotificationRule(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/notification_rule_detail.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/notification_rule_detail.py index 130fb405..91eb025d 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/notification_rule_detail.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/notification_rule_detail.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -43,6 +43,7 @@ class NotificationRuleDetail(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -53,7 +54,7 @@ class NotificationRuleDetail(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/notification_rules.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/notification_rules.py index 35999f1d..9de7f224 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/notification_rules.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/notification_rules.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class NotificationRules(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class NotificationRules(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/proxy_auth_type.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/proxy_auth_type.py index 52219c44..b495a9cd 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/proxy_auth_type.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/proxy_auth_type.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/proxy_type.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/proxy_type.py index dec472f1..62947a16 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/proxy_type.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/proxy_type.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/self_links.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/self_links.py index 272748d2..e1ff36fc 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/self_links.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/self_links.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class SelfLinks(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class SelfLinks(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/simple_agent.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/simple_agent.py index 77d16bc4..6d9449c1 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/simple_agent.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/simple_agent.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -42,6 +42,7 @@ class SimpleAgent(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -52,7 +53,7 @@ class SimpleAgent(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/simple_enterprise_agent.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/simple_enterprise_agent.py index 95d86a97..0d3c6379 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/simple_enterprise_agent.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/simple_enterprise_agent.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -62,6 +62,7 @@ class SimpleEnterpriseAgent(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -72,7 +73,7 @@ class SimpleEnterpriseAgent(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/simple_test.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/simple_test.py index 2a801c0c..869756b1 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/simple_test.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/simple_test.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -51,6 +51,7 @@ class SimpleTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -61,7 +62,7 @@ class SimpleTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/test_interval.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/test_interval.py index ab2b9999..86ef45a0 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/test_interval.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/test_interval.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/test_links.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/test_links.py index 5431d851..9a0533be 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/test_links.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/test_links.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class TestLinks(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class TestLinks(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/test_self_link.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/test_self_link.py index 3ef4a3ea..42a79669 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/test_self_link.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/test_self_link.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -40,6 +40,7 @@ class TestSelfLink(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -50,7 +51,7 @@ class TestSelfLink(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/test_type.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/test_type.py index 1271644d..f57f2a29 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/test_type.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/test_type.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -26,6 +26,7 @@ class TestType(str, Enum): """ allowed enum values """ + API = 'api' AGENT_MINUS_TO_MINUS_AGENT = 'agent-to-agent' AGENT_MINUS_TO_MINUS_SERVER = 'agent-to-server' BGP = 'bgp' diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/unauthorized_error.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/unauthorized_error.py index f8cb3552..d1b2de92 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/unauthorized_error.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/unauthorized_error.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class UnauthorizedError(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class UnauthorizedError(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/validation_error.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/validation_error.py index 6ce60685..d2b7f907 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/validation_error.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/validation_error.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -39,6 +39,7 @@ class ValidationError(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -49,7 +50,7 @@ class ValidationError(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/validation_error_item.py b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/validation_error_item.py index a90af4df..c3ee6d40 100644 --- a/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/validation_error_item.py +++ b/thousandeyes-sdk-agents/src/thousandeyes_sdk/agents/models/validation_error_item.py @@ -5,7 +5,7 @@ ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,7 +17,7 @@ import pprint import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +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 @@ -27,7 +27,7 @@ class ValidationErrorItem(BaseModel): ValidationErrorItem """ # noqa: E501 code: Optional[StrictStr] = Field(default=None, description="(Optional) A unique error type/code that can be referenced in the documentation for further details.") - var_field: Optional[StrictInt] = Field(default=None, description="Identifies the field that triggered this particular error.", alias="field") + var_field: Optional[StrictStr] = Field(default=None, description="Identifies the field that triggered this particular error.", alias="field") message: Optional[StrictStr] = Field(default=None, description="A short, human-readable summary of the error.") __properties: ClassVar[List[str]] = ["code", "field", "message"] @@ -35,6 +35,7 @@ class ValidationErrorItem(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class ValidationErrorItem(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-agents/test/test_cloud_and_enterprise_agent_notification_rules_api.py b/thousandeyes-sdk-agents/test/test_cloud_and_enterprise_agent_notification_rules_api.py new file mode 100644 index 00000000..34b1b36c --- /dev/null +++ b/thousandeyes-sdk-agents/test/test_cloud_and_enterprise_agent_notification_rules_api.py @@ -0,0 +1,167 @@ +# coding: utf-8 + +""" + Agents API + + ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.agents.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.agents.api.cloud_and_enterprise_agent_notification_rules_api import CloudAndEnterpriseAgentNotificationRulesApi + + +class TestCloudAndEnterpriseAgentNotificationRulesApi(unittest.TestCase): + """CloudAndEnterpriseAgentNotificationRulesApi unit test stubs""" + + def setUp(self) -> None: + self.api = CloudAndEnterpriseAgentNotificationRulesApi() + + def tearDown(self) -> None: + pass + + def test_get_agents_notification_rule_models_validation(self) -> None: + """Test case for get_agents_notification_rule request and response models""" + + response_body_json = """ + { + "isDefault" : false, + "expression" : "((lastContact >= 30 min))", + "_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" + } + }, + "ruleName" : "Default Agent Offline Notification", + "ruleId" : "281474976710706", + "notifications" : { + "thirdParty" : [ { + "integrationType" : "slack", + "integrationName" : "integrationSlack1", + "authToken" : "0VqDYEpidpHVAK397x8PBsmZ", + "channel" : "#slackChannel", + "integrationId" : "wb-78", + "authMethod" : "Basic", + "authUser" : "user123", + "target" : "https://hooks.slack.com/services/asd/0VqDYEpidpHVAK397x8PBsmZ" + }, { + "integrationType" : "slack", + "integrationName" : "integrationSlack1", + "authToken" : "0VqDYEpidpHVAK397x8PBsmZ", + "channel" : "#slackChannel", + "integrationId" : "wb-78", + "authMethod" : "Basic", + "authUser" : "user123", + "target" : "https://hooks.slack.com/services/asd/0VqDYEpidpHVAK397x8PBsmZ" + } ], + "webhook" : [ { + "integrationType" : "slack", + "integrationName" : "integrationSlack1", + "authToken" : "0VqDYEpidpHVAK397x8PBsmZ", + "channel" : "#slackChannel", + "integrationId" : "wb-78", + "authMethod" : "Basic", + "authUser" : "user123", + "target" : "https://hooks.slack.com/services/asd/0VqDYEpidpHVAK397x8PBsmZ" + }, { + "integrationType" : "slack", + "integrationName" : "integrationSlack1", + "authToken" : "0VqDYEpidpHVAK397x8PBsmZ", + "channel" : "#slackChannel", + "integrationId" : "wb-78", + "authMethod" : "Basic", + "authUser" : "user123", + "target" : "https://hooks.slack.com/services/asd/0VqDYEpidpHVAK397x8PBsmZ" + } ], + "email" : { + "recipients" : [ "user1@thousandeyes.com", "user2@cisco.com" ], + "message" : "This test is failing, check as soon as possible." + } + }, + "notifyOnClear" : true, + "agents" : [ { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + }, { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.agents.models.NotificationRuleDetail.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_agents_notification_rules_models_validation(self) -> None: + """Test case for get_agents_notification_rules request and response models""" + + response_body_json = """ + { + "agentAlertRules" : [ { + "ruleId" : "281474976710706", + "ruleName" : "Default Agent Offline Notification", + "expression" : "((lastContact >= 30 min))", + "notifyOnClear" : true, + "isDefault" : false + }, { + "ruleId" : "281474976710709", + "ruleName" : "Test Rule", + "expression" : "((lastContact >= 40 min))", + "notifyOnClear" : true, + "isDefault" : 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" + } + } + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.agents.models.ListNotificationRulesResponse.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-agents/test/test_cloud_and_enterprise_agents_api.py b/thousandeyes-sdk-agents/test/test_cloud_and_enterprise_agents_api.py new file mode 100644 index 00000000..e896004f --- /dev/null +++ b/thousandeyes-sdk-agents/test/test_cloud_and_enterprise_agents_api.py @@ -0,0 +1,309 @@ +# coding: utf-8 + +""" + Agents API + + ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.agents.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.agents.api.cloud_and_enterprise_agents_api import CloudAndEnterpriseAgentsApi + + +class TestCloudAndEnterpriseAgentsApi(unittest.TestCase): + """CloudAndEnterpriseAgentsApi unit test stubs""" + + def setUp(self) -> None: + self.api = CloudAndEnterpriseAgentsApi() + + def tearDown(self) -> None: + pass + + def test_delete_agent_models_validation(self) -> None: + """Test case for delete_agent request and response models""" + + + def test_get_agent_models_validation(self) -> None: + """Test case for get_agent request and response models""" + + response_body_json = """ + { + "agentId" : "281474976710706", + "agentType" : "cloud", + "_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" + } + }, + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "labels" : [ { + "labelId" : "11", + "name" : "Label name" + }, { + "labelId" : "11", + "name" : "Label name" + } ], + "tests" : [ { + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "savedEvent" : true, + "description" : "ThousandEyes Test", + "type" : "agent-to-server", + "enabled" : true, + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test" + }, { + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "savedEvent" : true, + "description" : "ThousandEyes Test", + "type" : "agent-to-server", + "enabled" : true, + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test" + } ], + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "verifySslCertificates" : true + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.agents.models.AgentDetails.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_agents_models_validation(self) -> None: + """Test case for get_agents request and response models""" + + response_body_json = """ + { + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "agents" : [ { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + }, { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.agents.models.CloudEnterpriseAgents.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_update_agent_models_validation(self) -> None: + """Test case for update_agent request and response models""" + request_body_json = """ + { + "localResolutionPrefixes" : [ "10.2.3.3/24", "10.2.3.3/25" ], + "tests" : [ "12313145", "12345" ], + "ipv6Policy" : "force-ipv4", + "keepBrowserCache" : true, + "targetForTests" : "1.1.1.1", + "agentName" : "thousandeyes-stg-va-254", + "enabled" : true, + "accountGroups" : [ "1234", "1" ] + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.agents.models.AgentRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "agentId" : "281474976710706", + "agentType" : "cloud", + "_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" + } + }, + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "labels" : [ { + "labelId" : "11", + "name" : "Label name" + }, { + "labelId" : "11", + "name" : "Label name" + } ], + "tests" : [ { + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "savedEvent" : true, + "description" : "ThousandEyes Test", + "type" : "agent-to-server", + "enabled" : true, + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test" + }, { + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "savedEvent" : true, + "description" : "ThousandEyes Test", + "type" : "agent-to-server", + "enabled" : true, + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test" + } ], + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "verifySslCertificates" : true + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.agents.models.AgentDetails.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-agents/test/test_enterprise_agent_cluster_api.py b/thousandeyes-sdk-agents/test/test_enterprise_agent_cluster_api.py new file mode 100644 index 00000000..019e5b36 --- /dev/null +++ b/thousandeyes-sdk-agents/test/test_enterprise_agent_cluster_api.py @@ -0,0 +1,202 @@ +# coding: utf-8 + +""" + Agents API + + ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.agents.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.agents.api.enterprise_agent_cluster_api import EnterpriseAgentClusterApi + + +class TestEnterpriseAgentClusterApi(unittest.TestCase): + """EnterpriseAgentClusterApi unit test stubs""" + + def setUp(self) -> None: + self.api = EnterpriseAgentClusterApi() + + def tearDown(self) -> None: + pass + + def test_assign_agent_to_cluster_models_validation(self) -> None: + """Test case for assign_agent_to_cluster request and response models""" + request_body_json = """ + { + "agents" : [ "281474976710706" ] + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.agents.models.AgentClusterAssignRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "agentId" : "281474976710706", + "agentType" : "cloud", + "_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" + } + }, + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "labels" : [ { + "labelId" : "11", + "name" : "Label name" + }, { + "labelId" : "11", + "name" : "Label name" + } ], + "tests" : [ { + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "savedEvent" : true, + "description" : "ThousandEyes Test", + "type" : "agent-to-server", + "enabled" : true, + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test" + }, { + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "savedEvent" : true, + "description" : "ThousandEyes Test", + "type" : "agent-to-server", + "enabled" : true, + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test" + } ], + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "verifySslCertificates" : true + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.agents.models.AgentDetails.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_unassign_agent_from_cluster_models_validation(self) -> None: + """Test case for unassign_agent_from_cluster request and response models""" + request_body_json = """ + { + "members" : [ "281474976710706" ] + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.agents.models.AgentClusterUnassignRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "agents" : [ { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + }, { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.agents.models.CloudEnterpriseAgents.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-agents/test/test_proxies_api.py b/thousandeyes-sdk-agents/test/test_proxies_api.py new file mode 100644 index 00000000..b38a0326 --- /dev/null +++ b/thousandeyes-sdk-agents/test/test_proxies_api.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + Agents API + + ## Overview Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.agents.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.agents.api.proxies_api import ProxiesApi + + +class TestProxiesApi(unittest.TestCase): + """ProxiesApi unit test stubs""" + + def setUp(self) -> None: + self.api = ProxiesApi() + + def tearDown(self) -> None: + pass + + def test_get_agents_proxies_models_validation(self) -> None: + """Test case for get_agents_proxies request and response models""" + + response_body_json = """ + { + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "agentProxies" : [ { + "password" : "**********", + "isLocalConfigured" : true, + "name" : "Test Proxy - Auth Type - BASIC", + "location" : "proxy.thousandeyes.com:3128", + "lastModified" : "2022-07-17T22:00:54Z", + "authType" : "basic", + "type" : "static", + "aid" : "1234", + "bypassList" : [ "10.0.0.0/16", "*.thousandeyes.com" ], + "user" : "user1", + "proxyId" : "281474976710706" + }, { + "password" : "**********", + "isLocalConfigured" : true, + "name" : "Test Proxy - Auth Type - BASIC", + "location" : "proxy.thousandeyes.com:3128", + "lastModified" : "2022-07-17T22:00:54Z", + "authType" : "basic", + "type" : "static", + "aid" : "1234", + "bypassList" : [ "10.0.0.0/16", "*.thousandeyes.com" ], + "user" : "user1", + "proxyId" : "281474976710706" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.agents.models.AgentProxies.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-agents/test/test_utils.py b/thousandeyes-sdk-agents/test/test_utils.py new file mode 100644 index 00000000..930528d9 --- /dev/null +++ b/thousandeyes-sdk-agents/test/test_utils.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +import json +import unittest + +from pydantic import BaseModel + + +def assert_constructed_model_matches_example_json(model: BaseModel, loaded_json: dict): + test_case = unittest.TestCase() + test_case.maxDiff = None + test_case.assertIsNotNone(model) + constructed_json = json.loads(model.to_json()) + sorted_loaded_json = json.dumps(loaded_json, sort_keys=True) + sorted_constructed_json = json.dumps(constructed_json, sort_keys=True) + test_case.assertEqual(sorted_loaded_json, sorted_constructed_json) diff --git a/thousandeyes-sdk-alerts/.openapi-generator/FILES b/thousandeyes-sdk-alerts/.openapi-generator/FILES index ad04424c..73ece852 100644 --- a/thousandeyes-sdk-alerts/.openapi-generator/FILES +++ b/thousandeyes-sdk-alerts/.openapi-generator/FILES @@ -113,53 +113,7 @@ src/thousandeyes_sdk/alerts/models/validation_error_item.py src/thousandeyes_sdk/alerts/models/webhook_integration_type.py src/thousandeyes_sdk/alerts/py.typed test/__init__.py -test/test_alert.py -test/test_alert_detail.py -test/test_alert_direction.py -test/test_alert_links.py -test/test_alert_meta.py -test/test_alert_metric_detail.py -test/test_alert_rounds_violation_mode.py -test/test_alert_rule.py -test/test_alert_suppression_window.py -test/test_alert_suppression_window_detail.py -test/test_alert_suppression_window_request.py -test/test_alert_suppression_window_state.py -test/test_alert_suppression_windows.py -test/test_alert_type.py -test/test_alerts.py -test/test_base_alert.py -test/test_base_alert_suppression_window.py -test/test_base_rule.py -test/test_base_test.py -test/test_days_of_week.py -test/test_end_alert_metrics.py -test/test_end_repeat.py -test/test_end_repeat_type.py -test/test_error.py -test/test_expand.py -test/test_interval_type.py -test/test_legacy_alert.py -test/test_link.py -test/test_notification.py -test/test_notification_email.py -test/test_notification_third_party.py -test/test_notification_webhook.py -test/test_pagination_links.py -test/test_repeat.py -test/test_repeat_type.py -test/test_rule.py -test/test_rule_detail.py -test/test_rule_detail_update.py -test/test_rules.py -test/test_self_links.py -test/test_severity.py -test/test_start_alert_metrics.py -test/test_state.py -test/test_test_interval.py -test/test_third_party_integration_type.py -test/test_unauthorized_error.py -test/test_unexpanded_test.py -test/test_validation_error.py -test/test_validation_error_item.py -test/test_webhook_integration_type.py +test/test_alert_rules_api.py +test/test_alert_suppression_windows_api.py +test/test_alerts_api.py +test/test_utils.py diff --git a/thousandeyes-sdk-alerts/README.md b/thousandeyes-sdk-alerts/README.md index f23278c0..63ae9568 100644 --- a/thousandeyes-sdk-alerts/README.md +++ b/thousandeyes-sdk-alerts/README.md @@ -12,8 +12,7 @@ For more information about the alerts, see [Alerts](https://docs.thousandeyes.co This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.4 -- Package version: 1.0.0 +- API version: 7.0.6 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator @@ -27,9 +26,9 @@ Python 3.7+ If the python package is hosted on a repository, you can install directly using: ```sh -pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +pip install -e git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git#egg=thousandeyes-sdk-alerts\&subdirectory=thousandeyes-sdk-alerts ``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) +(you may need to run `pip` with root permission: `sudo pip install -e git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git#egg=thousandeyes-sdk-alerts\&subdirectory=thousandeyes-sdk-alerts`) Then import the package: ```python @@ -107,15 +106,15 @@ Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *AlertRulesApi* | [**create_alert_rule**](docs/AlertRulesApi.md#create_alert_rule) | **POST** /v7/alerts/rules | Create alert rule *AlertRulesApi* | [**delete_alert_rule**](docs/AlertRulesApi.md#delete_alert_rule) | **DELETE** /v7/alerts/rules/{ruleId} | Delete alert rule -*AlertRulesApi* | [**get_alert_rule_details**](docs/AlertRulesApi.md#get_alert_rule_details) | **GET** /v7/alerts/rules/{ruleId} | Retrieve alert rule +*AlertRulesApi* | [**get_alert_rule**](docs/AlertRulesApi.md#get_alert_rule) | **GET** /v7/alerts/rules/{ruleId} | Retrieve alert rule *AlertRulesApi* | [**get_alerts_rules**](docs/AlertRulesApi.md#get_alerts_rules) | **GET** /v7/alerts/rules | List alert rules *AlertRulesApi* | [**update_alert_rule**](docs/AlertRulesApi.md#update_alert_rule) | **PUT** /v7/alerts/rules/{ruleId} | Update alert rule -*AlertSuppressionWindowsApi* | [**create_suppression_windows**](docs/AlertSuppressionWindowsApi.md#create_suppression_windows) | **POST** /v7/alert-suppression-windows | Create alert suppression window -*AlertSuppressionWindowsApi* | [**delete_suppression_window**](docs/AlertSuppressionWindowsApi.md#delete_suppression_window) | **DELETE** /v7/alert-suppression-windows/{windowId} | Delete alert suppression window -*AlertSuppressionWindowsApi* | [**get_suppression_window_details**](docs/AlertSuppressionWindowsApi.md#get_suppression_window_details) | **GET** /v7/alert-suppression-windows/{windowId} | Retrieve alert suppression window -*AlertSuppressionWindowsApi* | [**get_suppression_windows**](docs/AlertSuppressionWindowsApi.md#get_suppression_windows) | **GET** /v7/alert-suppression-windows | List alert suppression windows -*AlertSuppressionWindowsApi* | [**update_suppression_window**](docs/AlertSuppressionWindowsApi.md#update_suppression_window) | **PUT** /v7/alert-suppression-windows/{windowId} | Update alert suppression window -*AlertsApi* | [**get_alert_details**](docs/AlertsApi.md#get_alert_details) | **GET** /v7/alerts/{alertId} | Retrieve alert details +*AlertSuppressionWindowsApi* | [**create_alert_suppression_window**](docs/AlertSuppressionWindowsApi.md#create_alert_suppression_window) | **POST** /v7/alert-suppression-windows | Create alert suppression window +*AlertSuppressionWindowsApi* | [**delete_alert_suppression_window**](docs/AlertSuppressionWindowsApi.md#delete_alert_suppression_window) | **DELETE** /v7/alert-suppression-windows/{windowId} | Delete alert suppression window +*AlertSuppressionWindowsApi* | [**get_alert_suppression_window**](docs/AlertSuppressionWindowsApi.md#get_alert_suppression_window) | **GET** /v7/alert-suppression-windows/{windowId} | Retrieve alert suppression window +*AlertSuppressionWindowsApi* | [**get_alert_suppression_windows**](docs/AlertSuppressionWindowsApi.md#get_alert_suppression_windows) | **GET** /v7/alert-suppression-windows | List alert suppression windows +*AlertSuppressionWindowsApi* | [**update_alert_suppression_window**](docs/AlertSuppressionWindowsApi.md#update_alert_suppression_window) | **PUT** /v7/alert-suppression-windows/{windowId} | Update alert suppression window +*AlertsApi* | [**get_alert**](docs/AlertsApi.md#get_alert) | **GET** /v7/alerts/{alertId} | Retrieve alert details *AlertsApi* | [**get_alerts**](docs/AlertsApi.md#get_alerts) | **GET** /v7/alerts | List active alerts diff --git a/thousandeyes-sdk-alerts/docs/Alert.md b/thousandeyes-sdk-alerts/docs/Alert.md index 64f19907..45b34b1e 100644 --- a/thousandeyes-sdk-alerts/docs/Alert.md +++ b/thousandeyes-sdk-alerts/docs/Alert.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **start_date** | **datetime** | The start date and time (in UTC, ISO 8601 format) for querying alerts. | [optional] [readonly] **end_date** | **datetime** | The end date and time (in UTC, ISO 8601 format) for querying alerts. | [optional] [readonly] **violation_count** | **int** | Number of sources that meet the alert criteria. | [optional] -**duration** | **float** | Duration in seconds the alert was active | [optional] +**duration** | **int** | Duration in seconds the alert was active | [optional] **suppressed** | **bool** | Indicates whether the alert is currently suppressed by a real-time ASW. | [optional] **meta** | [**AlertMeta**](AlertMeta.md) | | [optional] **links** | [**AlertLinks**](AlertLinks.md) | | [optional] diff --git a/thousandeyes-sdk-alerts/docs/AlertDetail.md b/thousandeyes-sdk-alerts/docs/AlertDetail.md index 42f2a57a..027a3df6 100644 --- a/thousandeyes-sdk-alerts/docs/AlertDetail.md +++ b/thousandeyes-sdk-alerts/docs/AlertDetail.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **start_date** | **datetime** | The start date and time (in UTC, ISO 8601 format) for querying alerts. | [optional] [readonly] **end_date** | **datetime** | The end date and time (in UTC, ISO 8601 format) for querying alerts. | [optional] [readonly] **violation_count** | **int** | Number of sources that meet the alert criteria. | [optional] -**duration** | **float** | Duration in seconds the alert was active | [optional] +**duration** | **int** | Duration in seconds the alert was active | [optional] **suppressed** | **bool** | Indicates whether the alert is currently suppressed by a real-time ASW. | [optional] **meta** | [**AlertMeta**](AlertMeta.md) | | [optional] **links** | [**AlertLinks**](AlertLinks.md) | | [optional] diff --git a/thousandeyes-sdk-alerts/docs/AlertRulesApi.md b/thousandeyes-sdk-alerts/docs/AlertRulesApi.md index caa6ba1b..4da81b02 100644 --- a/thousandeyes-sdk-alerts/docs/AlertRulesApi.md +++ b/thousandeyes-sdk-alerts/docs/AlertRulesApi.md @@ -6,7 +6,7 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**create_alert_rule**](AlertRulesApi.md#create_alert_rule) | **POST** /v7/alerts/rules | Create alert rule [**delete_alert_rule**](AlertRulesApi.md#delete_alert_rule) | **DELETE** /v7/alerts/rules/{ruleId} | Delete alert rule -[**get_alert_rule_details**](AlertRulesApi.md#get_alert_rule_details) | **GET** /v7/alerts/rules/{ruleId} | Retrieve alert rule +[**get_alert_rule**](AlertRulesApi.md#get_alert_rule) | **GET** /v7/alerts/rules/{ruleId} | Retrieve alert rule [**get_alerts_rules**](AlertRulesApi.md#get_alerts_rules) | **GET** /v7/alerts/rules | List alert rules [**update_alert_rule**](AlertRulesApi.md#update_alert_rule) | **PUT** /v7/alerts/rules/{ruleId} | Update alert rule @@ -82,7 +82,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -165,7 +165,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/problem+json + - **Accept**: application/json, application/problem+json ### HTTP response details @@ -181,8 +181,8 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_alert_rule_details** -> RuleDetail get_alert_rule_details(rule_id, aid=aid) +# **get_alert_rule** +> RuleDetail get_alert_rule(rule_id, aid=aid) Retrieve alert rule @@ -223,11 +223,11 @@ with thousandeyes_sdk.alerts.ApiClient(configuration) as api_client: try: # Retrieve alert rule - api_response = api_instance.get_alert_rule_details(rule_id, aid=aid) - print("The response of AlertRulesApi->get_alert_rule_details:\n") + api_response = api_instance.get_alert_rule(rule_id, aid=aid) + print("The response of AlertRulesApi->get_alert_rule:\n") pprint(api_response) except Exception as e: - print("Exception when calling AlertRulesApi->get_alert_rule_details: %s\n" % e) + print("Exception when calling AlertRulesApi->get_alert_rule: %s\n" % e) ``` @@ -251,7 +251,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -334,7 +334,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -422,7 +422,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-alerts/docs/AlertSuppressionWindowsApi.md b/thousandeyes-sdk-alerts/docs/AlertSuppressionWindowsApi.md index 1fec6872..3099ce52 100644 --- a/thousandeyes-sdk-alerts/docs/AlertSuppressionWindowsApi.md +++ b/thousandeyes-sdk-alerts/docs/AlertSuppressionWindowsApi.md @@ -4,15 +4,15 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**create_suppression_windows**](AlertSuppressionWindowsApi.md#create_suppression_windows) | **POST** /v7/alert-suppression-windows | Create alert suppression window -[**delete_suppression_window**](AlertSuppressionWindowsApi.md#delete_suppression_window) | **DELETE** /v7/alert-suppression-windows/{windowId} | Delete alert suppression window -[**get_suppression_window_details**](AlertSuppressionWindowsApi.md#get_suppression_window_details) | **GET** /v7/alert-suppression-windows/{windowId} | Retrieve alert suppression window -[**get_suppression_windows**](AlertSuppressionWindowsApi.md#get_suppression_windows) | **GET** /v7/alert-suppression-windows | List alert suppression windows -[**update_suppression_window**](AlertSuppressionWindowsApi.md#update_suppression_window) | **PUT** /v7/alert-suppression-windows/{windowId} | Update alert suppression window +[**create_alert_suppression_window**](AlertSuppressionWindowsApi.md#create_alert_suppression_window) | **POST** /v7/alert-suppression-windows | Create alert suppression window +[**delete_alert_suppression_window**](AlertSuppressionWindowsApi.md#delete_alert_suppression_window) | **DELETE** /v7/alert-suppression-windows/{windowId} | Delete alert suppression window +[**get_alert_suppression_window**](AlertSuppressionWindowsApi.md#get_alert_suppression_window) | **GET** /v7/alert-suppression-windows/{windowId} | Retrieve alert suppression window +[**get_alert_suppression_windows**](AlertSuppressionWindowsApi.md#get_alert_suppression_windows) | **GET** /v7/alert-suppression-windows | List alert suppression windows +[**update_alert_suppression_window**](AlertSuppressionWindowsApi.md#update_alert_suppression_window) | **PUT** /v7/alert-suppression-windows/{windowId} | Update alert suppression window -# **create_suppression_windows** -> AlertSuppressionWindowDetail create_suppression_windows(alert_suppression_window_request, aid=aid, expand=expand) +# **create_alert_suppression_window** +> AlertSuppressionWindowDetail create_alert_suppression_window(alert_suppression_window_request, aid=aid, expand=expand) Create alert suppression window @@ -56,11 +56,11 @@ with thousandeyes_sdk.alerts.ApiClient(configuration) as api_client: try: # Create alert suppression window - api_response = api_instance.create_suppression_windows(alert_suppression_window_request, aid=aid, expand=expand) - print("The response of AlertSuppressionWindowsApi->create_suppression_windows:\n") + api_response = api_instance.create_alert_suppression_window(alert_suppression_window_request, aid=aid, expand=expand) + print("The response of AlertSuppressionWindowsApi->create_alert_suppression_window:\n") pprint(api_response) except Exception as e: - print("Exception when calling AlertSuppressionWindowsApi->create_suppression_windows: %s\n" % e) + print("Exception when calling AlertSuppressionWindowsApi->create_alert_suppression_window: %s\n" % e) ``` @@ -85,7 +85,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -101,8 +101,8 @@ 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) -# **delete_suppression_window** -> delete_suppression_window(window_id, aid=aid) +# **delete_alert_suppression_window** +> delete_alert_suppression_window(window_id, aid=aid) Delete alert suppression window @@ -142,9 +142,9 @@ with thousandeyes_sdk.alerts.ApiClient(configuration) as api_client: try: # Delete alert suppression window - api_instance.delete_suppression_window(window_id, aid=aid) + api_instance.delete_alert_suppression_window(window_id, aid=aid) except Exception as e: - print("Exception when calling AlertSuppressionWindowsApi->delete_suppression_window: %s\n" % e) + print("Exception when calling AlertSuppressionWindowsApi->delete_alert_suppression_window: %s\n" % e) ``` @@ -168,7 +168,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/problem+json + - **Accept**: application/json, application/problem+json ### HTTP response details @@ -184,8 +184,8 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_suppression_window_details** -> AlertSuppressionWindowDetail get_suppression_window_details(window_id, aid=aid, expand=expand) +# **get_alert_suppression_window** +> AlertSuppressionWindowDetail get_alert_suppression_window(window_id, aid=aid, expand=expand) Retrieve alert suppression window @@ -228,11 +228,11 @@ with thousandeyes_sdk.alerts.ApiClient(configuration) as api_client: try: # Retrieve alert suppression window - api_response = api_instance.get_suppression_window_details(window_id, aid=aid, expand=expand) - print("The response of AlertSuppressionWindowsApi->get_suppression_window_details:\n") + api_response = api_instance.get_alert_suppression_window(window_id, aid=aid, expand=expand) + print("The response of AlertSuppressionWindowsApi->get_alert_suppression_window:\n") pprint(api_response) except Exception as e: - print("Exception when calling AlertSuppressionWindowsApi->get_suppression_window_details: %s\n" % e) + print("Exception when calling AlertSuppressionWindowsApi->get_alert_suppression_window: %s\n" % e) ``` @@ -257,7 +257,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -272,8 +272,8 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_suppression_windows** -> AlertSuppressionWindows get_suppression_windows(aid=aid) +# **get_alert_suppression_windows** +> AlertSuppressionWindows get_alert_suppression_windows(aid=aid) List alert suppression windows @@ -313,11 +313,11 @@ with thousandeyes_sdk.alerts.ApiClient(configuration) as api_client: try: # List alert suppression windows - api_response = api_instance.get_suppression_windows(aid=aid) - print("The response of AlertSuppressionWindowsApi->get_suppression_windows:\n") + api_response = api_instance.get_alert_suppression_windows(aid=aid) + print("The response of AlertSuppressionWindowsApi->get_alert_suppression_windows:\n") pprint(api_response) except Exception as e: - print("Exception when calling AlertSuppressionWindowsApi->get_suppression_windows: %s\n" % e) + print("Exception when calling AlertSuppressionWindowsApi->get_alert_suppression_windows: %s\n" % e) ``` @@ -340,7 +340,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -355,8 +355,8 @@ 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_suppression_window** -> AlertSuppressionWindowDetail update_suppression_window(window_id, alert_suppression_window_request, aid=aid, expand=expand) +# **update_alert_suppression_window** +> AlertSuppressionWindowDetail update_alert_suppression_window(window_id, alert_suppression_window_request, aid=aid, expand=expand) Update alert suppression window @@ -401,11 +401,11 @@ with thousandeyes_sdk.alerts.ApiClient(configuration) as api_client: try: # Update alert suppression window - api_response = api_instance.update_suppression_window(window_id, alert_suppression_window_request, aid=aid, expand=expand) - print("The response of AlertSuppressionWindowsApi->update_suppression_window:\n") + api_response = api_instance.update_alert_suppression_window(window_id, alert_suppression_window_request, aid=aid, expand=expand) + print("The response of AlertSuppressionWindowsApi->update_alert_suppression_window:\n") pprint(api_response) except Exception as e: - print("Exception when calling AlertSuppressionWindowsApi->update_suppression_window: %s\n" % e) + print("Exception when calling AlertSuppressionWindowsApi->update_alert_suppression_window: %s\n" % e) ``` @@ -431,7 +431,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-alerts/docs/AlertsApi.md b/thousandeyes-sdk-alerts/docs/AlertsApi.md index e932fe58..ce748b31 100644 --- a/thousandeyes-sdk-alerts/docs/AlertsApi.md +++ b/thousandeyes-sdk-alerts/docs/AlertsApi.md @@ -4,12 +4,12 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**get_alert_details**](AlertsApi.md#get_alert_details) | **GET** /v7/alerts/{alertId} | Retrieve alert details +[**get_alert**](AlertsApi.md#get_alert) | **GET** /v7/alerts/{alertId} | Retrieve alert details [**get_alerts**](AlertsApi.md#get_alerts) | **GET** /v7/alerts | List active alerts -# **get_alert_details** -> AlertDetail get_alert_details(alert_id, aid=aid) +# **get_alert** +> AlertDetail get_alert(alert_id, aid=aid) Retrieve alert details @@ -50,11 +50,11 @@ with thousandeyes_sdk.alerts.ApiClient(configuration) as api_client: try: # Retrieve alert details - api_response = api_instance.get_alert_details(alert_id, aid=aid) - print("The response of AlertsApi->get_alert_details:\n") + api_response = api_instance.get_alert(alert_id, aid=aid) + print("The response of AlertsApi->get_alert:\n") pprint(api_response) except Exception as e: - print("Exception when calling AlertsApi->get_alert_details: %s\n" % e) + print("Exception when calling AlertsApi->get_alert: %s\n" % e) ``` @@ -78,7 +78,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -134,7 +134,7 @@ with thousandeyes_sdk.alerts.ApiClient(configuration) as api_client: window = '12h' # str | 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`. (optional) start_date = '2022-07-17T22:00:54Z' # datetime | 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`. (optional) end_date = '2022-07-18T22:00:54Z' # datetime | Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. (optional) - max = 5 # float | (Optional) Maximum number of objects to return. (optional) + max = 5 # int | (Optional) Maximum number of objects to return. (optional) state = thousandeyes_sdk.alerts.State() # State | Optional parameter to match a specific alert state. If not specified, it defaults to `trigger`. (optional) try: @@ -157,7 +157,7 @@ Name | Type | Description | Notes **window** | **str**| 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`. | [optional] **start_date** | **datetime**| 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`. | [optional] **end_date** | **datetime**| Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. | [optional] - **max** | **float**| (Optional) Maximum number of objects to return. | [optional] + **max** | **int**| (Optional) Maximum number of objects to return. | [optional] **state** | [**State**](.md)| Optional parameter to match a specific alert state. If not specified, it defaults to `trigger`. | [optional] ### Return type @@ -171,7 +171,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-alerts/docs/BaseAlert.md b/thousandeyes-sdk-alerts/docs/BaseAlert.md index 8fe58f1f..7824c126 100644 --- a/thousandeyes-sdk-alerts/docs/BaseAlert.md +++ b/thousandeyes-sdk-alerts/docs/BaseAlert.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **start_date** | **datetime** | The start date and time (in UTC, ISO 8601 format) for querying alerts. | [optional] [readonly] **end_date** | **datetime** | The end date and time (in UTC, ISO 8601 format) for querying alerts. | [optional] [readonly] **violation_count** | **int** | Number of sources that meet the alert criteria. | [optional] -**duration** | **float** | Duration in seconds the alert was active | [optional] +**duration** | **int** | Duration in seconds the alert was active | [optional] **suppressed** | **bool** | Indicates whether the alert is currently suppressed by a real-time ASW. | [optional] **meta** | [**AlertMeta**](AlertMeta.md) | | [optional] **links** | [**AlertLinks**](AlertLinks.md) | | [optional] diff --git a/thousandeyes-sdk-alerts/docs/ValidationErrorItem.md b/thousandeyes-sdk-alerts/docs/ValidationErrorItem.md index b964930c..a9e5c0eb 100644 --- a/thousandeyes-sdk-alerts/docs/ValidationErrorItem.md +++ b/thousandeyes-sdk-alerts/docs/ValidationErrorItem.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **code** | **str** | (Optional) A unique error type/code that can be referenced in the documentation for further details. | [optional] -**var_field** | **int** | Identifies the field that triggered this particular error. | [optional] +**var_field** | **str** | Identifies the field that triggered this particular error. | [optional] **message** | **str** | A short, human-readable summary of the error. | [optional] ## Example diff --git a/thousandeyes-sdk-alerts/pyproject.toml b/thousandeyes-sdk-alerts/pyproject.toml index 10a2fb3f..75bdf637 100644 --- a/thousandeyes-sdk-alerts/pyproject.toml +++ b/thousandeyes-sdk-alerts/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "thousandeyes-sdk-alerts" -version = "1.0.0" +dynamic = ["version"] authors = [ { name = "ThousandEyes API Team", email = "api-team@thousandeyes.com" } ] @@ -11,9 +11,12 @@ dependencies = [ "python-dateutil >=2.8.2", "pydantic >=2", "typing-extensions >=4.7.1", - "thousandeyes-sdk-client==1.0.0", + "thousandeyes-sdk-core", ] +[tool.setuptools.dynamic] +version = {attr = "thousandeyes_sdk.client.__version__"} + [project.optional-dependencies] test = [ "pytest~=7.1.3", diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/__init__.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/__init__.py index a7dc96ff..13646fe8 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/__init__.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/__init__.py @@ -7,15 +7,13 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 -__version__ = "1.0.0" - # import apis into sdk package from thousandeyes_sdk.alerts.api.alert_rules_api import AlertRulesApi from thousandeyes_sdk.alerts.api.alert_suppression_windows_api import AlertSuppressionWindowsApi diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/api/alert_rules_api.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/api/alert_rules_api.py index acefd758..7064aec6 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/api/alert_rules_api.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/api/alert_rules_api.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -29,6 +29,7 @@ from thousandeyes_sdk.alerts.models.rules import Rules from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class AlertRulesApi: @@ -41,6 +42,7 @@ class AlertRulesApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @@ -312,6 +314,7 @@ class AlertRulesApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -620,6 +623,7 @@ class AlertRulesApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ + 'application/json', 'application/problem+json' ] ) @@ -649,7 +653,7 @@ class AlertRulesApi: @validate_call - def get_alert_rule_details( + def get_alert_rule( self, rule_id: Annotated[StrictStr, Field(description="Unique alert rule ID.")], 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, @@ -696,7 +700,7 @@ class AlertRulesApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_alert_rule_details_serialize( + _param = self._get_alert_rule_serialize( rule_id=rule_id, aid=aid, _request_auth=_request_auth, @@ -726,7 +730,7 @@ class AlertRulesApi: @validate_call - def get_alert_rule_details_with_http_info( + def get_alert_rule_with_http_info( self, rule_id: Annotated[StrictStr, Field(description="Unique alert rule ID.")], 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, @@ -773,7 +777,7 @@ class AlertRulesApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_alert_rule_details_serialize( + _param = self._get_alert_rule_serialize( rule_id=rule_id, aid=aid, _request_auth=_request_auth, @@ -803,7 +807,7 @@ class AlertRulesApi: @validate_call - def get_alert_rule_details_without_preload_content( + def get_alert_rule_without_preload_content( self, rule_id: Annotated[StrictStr, Field(description="Unique alert rule ID.")], 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, @@ -850,7 +854,7 @@ class AlertRulesApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_alert_rule_details_serialize( + _param = self._get_alert_rule_serialize( rule_id=rule_id, aid=aid, _request_auth=_request_auth, @@ -874,7 +878,7 @@ class AlertRulesApi: return response_data.response - def _get_alert_rule_details_serialize( + def _get_alert_rule_serialize( self, rule_id, aid, @@ -913,6 +917,7 @@ class AlertRulesApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1191,6 +1196,7 @@ class AlertRulesApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1502,6 +1508,7 @@ class AlertRulesApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/api/alert_suppression_windows_api.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/api/alert_suppression_windows_api.py index 48698e2a..fca55827 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/api/alert_suppression_windows_api.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/api/alert_suppression_windows_api.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -29,6 +29,7 @@ from thousandeyes_sdk.alerts.models.expand import Expand from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class AlertSuppressionWindowsApi: @@ -41,11 +42,12 @@ class AlertSuppressionWindowsApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @validate_call - def create_suppression_windows( + def create_alert_suppression_window( self, alert_suppression_window_request: AlertSuppressionWindowRequest, 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, @@ -95,7 +97,7 @@ class AlertSuppressionWindowsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._create_suppression_windows_serialize( + _param = self._create_alert_suppression_window_serialize( alert_suppression_window_request=alert_suppression_window_request, aid=aid, expand=expand, @@ -127,7 +129,7 @@ class AlertSuppressionWindowsApi: @validate_call - def create_suppression_windows_with_http_info( + def create_alert_suppression_window_with_http_info( self, alert_suppression_window_request: AlertSuppressionWindowRequest, 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, @@ -177,7 +179,7 @@ class AlertSuppressionWindowsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._create_suppression_windows_serialize( + _param = self._create_alert_suppression_window_serialize( alert_suppression_window_request=alert_suppression_window_request, aid=aid, expand=expand, @@ -209,7 +211,7 @@ class AlertSuppressionWindowsApi: @validate_call - def create_suppression_windows_without_preload_content( + def create_alert_suppression_window_without_preload_content( self, alert_suppression_window_request: AlertSuppressionWindowRequest, 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, @@ -259,7 +261,7 @@ class AlertSuppressionWindowsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._create_suppression_windows_serialize( + _param = self._create_alert_suppression_window_serialize( alert_suppression_window_request=alert_suppression_window_request, aid=aid, expand=expand, @@ -285,7 +287,7 @@ class AlertSuppressionWindowsApi: return response_data.response - def _create_suppression_windows_serialize( + def _create_alert_suppression_window_serialize( self, alert_suppression_window_request, aid, @@ -330,6 +332,7 @@ class AlertSuppressionWindowsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -372,7 +375,7 @@ class AlertSuppressionWindowsApi: @validate_call - def delete_suppression_window( + def delete_alert_suppression_window( self, window_id: Annotated[StrictStr, Field(description="Unique window ID.")], 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, @@ -419,7 +422,7 @@ class AlertSuppressionWindowsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._delete_suppression_window_serialize( + _param = self._delete_alert_suppression_window_serialize( window_id=window_id, aid=aid, _request_auth=_request_auth, @@ -450,7 +453,7 @@ class AlertSuppressionWindowsApi: @validate_call - def delete_suppression_window_with_http_info( + def delete_alert_suppression_window_with_http_info( self, window_id: Annotated[StrictStr, Field(description="Unique window ID.")], 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, @@ -497,7 +500,7 @@ class AlertSuppressionWindowsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._delete_suppression_window_serialize( + _param = self._delete_alert_suppression_window_serialize( window_id=window_id, aid=aid, _request_auth=_request_auth, @@ -528,7 +531,7 @@ class AlertSuppressionWindowsApi: @validate_call - def delete_suppression_window_without_preload_content( + def delete_alert_suppression_window_without_preload_content( self, window_id: Annotated[StrictStr, Field(description="Unique window ID.")], 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, @@ -575,7 +578,7 @@ class AlertSuppressionWindowsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._delete_suppression_window_serialize( + _param = self._delete_alert_suppression_window_serialize( window_id=window_id, aid=aid, _request_auth=_request_auth, @@ -600,7 +603,7 @@ class AlertSuppressionWindowsApi: return response_data.response - def _delete_suppression_window_serialize( + def _delete_alert_suppression_window_serialize( self, window_id, aid, @@ -638,6 +641,7 @@ class AlertSuppressionWindowsApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ + 'application/json', 'application/problem+json' ] ) @@ -667,7 +671,7 @@ class AlertSuppressionWindowsApi: @validate_call - def get_suppression_window_details( + def get_alert_suppression_window( self, window_id: Annotated[StrictStr, Field(description="Unique window ID.")], 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, @@ -717,7 +721,7 @@ class AlertSuppressionWindowsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_suppression_window_details_serialize( + _param = self._get_alert_suppression_window_serialize( window_id=window_id, aid=aid, expand=expand, @@ -748,7 +752,7 @@ class AlertSuppressionWindowsApi: @validate_call - def get_suppression_window_details_with_http_info( + def get_alert_suppression_window_with_http_info( self, window_id: Annotated[StrictStr, Field(description="Unique window ID.")], 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, @@ -798,7 +802,7 @@ class AlertSuppressionWindowsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_suppression_window_details_serialize( + _param = self._get_alert_suppression_window_serialize( window_id=window_id, aid=aid, expand=expand, @@ -829,7 +833,7 @@ class AlertSuppressionWindowsApi: @validate_call - def get_suppression_window_details_without_preload_content( + def get_alert_suppression_window_without_preload_content( self, window_id: Annotated[StrictStr, Field(description="Unique window ID.")], 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, @@ -879,7 +883,7 @@ class AlertSuppressionWindowsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_suppression_window_details_serialize( + _param = self._get_alert_suppression_window_serialize( window_id=window_id, aid=aid, expand=expand, @@ -904,7 +908,7 @@ class AlertSuppressionWindowsApi: return response_data.response - def _get_suppression_window_details_serialize( + def _get_alert_suppression_window_serialize( self, window_id, aid, @@ -949,6 +953,7 @@ class AlertSuppressionWindowsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -978,7 +983,7 @@ class AlertSuppressionWindowsApi: @validate_call - def get_suppression_windows( + def get_alert_suppression_windows( 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[ @@ -1022,7 +1027,7 @@ class AlertSuppressionWindowsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_suppression_windows_serialize( + _param = self._get_alert_suppression_windows_serialize( aid=aid, _request_auth=_request_auth, _content_type=_content_type, @@ -1051,7 +1056,7 @@ class AlertSuppressionWindowsApi: @validate_call - def get_suppression_windows_with_http_info( + def get_alert_suppression_windows_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[ @@ -1095,7 +1100,7 @@ class AlertSuppressionWindowsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_suppression_windows_serialize( + _param = self._get_alert_suppression_windows_serialize( aid=aid, _request_auth=_request_auth, _content_type=_content_type, @@ -1124,7 +1129,7 @@ class AlertSuppressionWindowsApi: @validate_call - def get_suppression_windows_without_preload_content( + def get_alert_suppression_windows_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[ @@ -1168,7 +1173,7 @@ class AlertSuppressionWindowsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_suppression_windows_serialize( + _param = self._get_alert_suppression_windows_serialize( aid=aid, _request_auth=_request_auth, _content_type=_content_type, @@ -1191,7 +1196,7 @@ class AlertSuppressionWindowsApi: return response_data.response - def _get_suppression_windows_serialize( + def _get_alert_suppression_windows_serialize( self, aid, _request_auth, @@ -1227,6 +1232,7 @@ class AlertSuppressionWindowsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1256,7 +1262,7 @@ class AlertSuppressionWindowsApi: @validate_call - def update_suppression_window( + def update_alert_suppression_window( self, window_id: Annotated[StrictStr, Field(description="Unique window ID.")], alert_suppression_window_request: AlertSuppressionWindowRequest, @@ -1309,7 +1315,7 @@ class AlertSuppressionWindowsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._update_suppression_window_serialize( + _param = self._update_alert_suppression_window_serialize( window_id=window_id, alert_suppression_window_request=alert_suppression_window_request, aid=aid, @@ -1342,7 +1348,7 @@ class AlertSuppressionWindowsApi: @validate_call - def update_suppression_window_with_http_info( + def update_alert_suppression_window_with_http_info( self, window_id: Annotated[StrictStr, Field(description="Unique window ID.")], alert_suppression_window_request: AlertSuppressionWindowRequest, @@ -1395,7 +1401,7 @@ class AlertSuppressionWindowsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._update_suppression_window_serialize( + _param = self._update_alert_suppression_window_serialize( window_id=window_id, alert_suppression_window_request=alert_suppression_window_request, aid=aid, @@ -1428,7 +1434,7 @@ class AlertSuppressionWindowsApi: @validate_call - def update_suppression_window_without_preload_content( + def update_alert_suppression_window_without_preload_content( self, window_id: Annotated[StrictStr, Field(description="Unique window ID.")], alert_suppression_window_request: AlertSuppressionWindowRequest, @@ -1481,7 +1487,7 @@ class AlertSuppressionWindowsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._update_suppression_window_serialize( + _param = self._update_alert_suppression_window_serialize( window_id=window_id, alert_suppression_window_request=alert_suppression_window_request, aid=aid, @@ -1508,7 +1514,7 @@ class AlertSuppressionWindowsApi: return response_data.response - def _update_suppression_window_serialize( + def _update_alert_suppression_window_serialize( self, window_id, alert_suppression_window_request, @@ -1556,6 +1562,7 @@ class AlertSuppressionWindowsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/api/alerts_api.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/api/alerts_api.py index 1b9be2c2..a060ef7b 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/api/alerts_api.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/api/alerts_api.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -19,8 +19,8 @@ from typing_extensions import Annotated import thousandeyes_sdk.alerts.models from datetime import datetime -from pydantic import Field, StrictFloat, StrictInt, StrictStr, field_validator -from typing import Any, Optional, Union +from pydantic import Field, StrictInt, StrictStr, field_validator +from typing import Any, Optional from typing_extensions import Annotated from thousandeyes_sdk.alerts.models.alert_detail import AlertDetail from thousandeyes_sdk.alerts.models.alerts import Alerts @@ -28,6 +28,7 @@ from thousandeyes_sdk.alerts.models.alerts import Alerts from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class AlertsApi: @@ -40,11 +41,12 @@ class AlertsApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @validate_call - def get_alert_details( + def get_alert( self, alert_id: Annotated[StrictStr, Field(description="Unique alert ID.")], 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, @@ -91,7 +93,7 @@ class AlertsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_alert_details_serialize( + _param = self._get_alert_serialize( alert_id=alert_id, aid=aid, _request_auth=_request_auth, @@ -121,7 +123,7 @@ class AlertsApi: @validate_call - def get_alert_details_with_http_info( + def get_alert_with_http_info( self, alert_id: Annotated[StrictStr, Field(description="Unique alert ID.")], 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, @@ -168,7 +170,7 @@ class AlertsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_alert_details_serialize( + _param = self._get_alert_serialize( alert_id=alert_id, aid=aid, _request_auth=_request_auth, @@ -198,7 +200,7 @@ class AlertsApi: @validate_call - def get_alert_details_without_preload_content( + def get_alert_without_preload_content( self, alert_id: Annotated[StrictStr, Field(description="Unique alert ID.")], 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, @@ -245,7 +247,7 @@ class AlertsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_alert_details_serialize( + _param = self._get_alert_serialize( alert_id=alert_id, aid=aid, _request_auth=_request_auth, @@ -269,7 +271,7 @@ class AlertsApi: return response_data.response - def _get_alert_details_serialize( + def _get_alert_serialize( self, alert_id, aid, @@ -308,6 +310,7 @@ class AlertsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -343,7 +346,7 @@ class AlertsApi: 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="(Optional) Maximum number of objects to return.")] = None, + max: Annotated[Optional[StrictInt], Field(description="(Optional) Maximum number of objects to return.")] = None, state: Annotated[Optional[Any], Field(description="Optional parameter to match a specific alert state. If not specified, it defaults to `trigger`.")] = None, _request_timeout: Union[ None, @@ -371,7 +374,7 @@ class AlertsApi: :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: (Optional) Maximum number of objects to return. - :type max: float + :type max: int :param state: Optional parameter to match a specific alert state. If not specified, it defaults to `trigger`. :type state: State :param _request_timeout: timeout setting for this request. If one @@ -436,7 +439,7 @@ class AlertsApi: 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="(Optional) Maximum number of objects to return.")] = None, + max: Annotated[Optional[StrictInt], Field(description="(Optional) Maximum number of objects to return.")] = None, state: Annotated[Optional[Any], Field(description="Optional parameter to match a specific alert state. If not specified, it defaults to `trigger`.")] = None, _request_timeout: Union[ None, @@ -464,7 +467,7 @@ class AlertsApi: :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: (Optional) Maximum number of objects to return. - :type max: float + :type max: int :param state: Optional parameter to match a specific alert state. If not specified, it defaults to `trigger`. :type state: State :param _request_timeout: timeout setting for this request. If one @@ -529,7 +532,7 @@ class AlertsApi: 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="(Optional) Maximum number of objects to return.")] = None, + max: Annotated[Optional[StrictInt], Field(description="(Optional) Maximum number of objects to return.")] = None, state: Annotated[Optional[Any], Field(description="Optional parameter to match a specific alert state. If not specified, it defaults to `trigger`.")] = None, _request_timeout: Union[ None, @@ -557,7 +560,7 @@ class AlertsApi: :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: (Optional) Maximum number of objects to return. - :type max: float + :type max: int :param state: Optional parameter to match a specific alert state. If not specified, it defaults to `trigger`. :type state: State :param _request_timeout: timeout setting for this request. If one @@ -689,6 +692,7 @@ class AlertsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/__init__.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/__init__.py index 977a6df0..275aa0a5 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/__init__.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/__init__.py @@ -6,7 +6,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert.py index c88d7449..a6ebe3b6 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,8 +18,8 @@ import re # noqa: F401 import json from datetime import datetime -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional, Union +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional from thousandeyes_sdk.alerts.models.alert_links import AlertLinks from thousandeyes_sdk.alerts.models.alert_meta import AlertMeta from thousandeyes_sdk.alerts.models.alert_type import AlertType @@ -37,7 +37,7 @@ class Alert(BaseModel): start_date: Optional[datetime] = Field(default=None, description="The start date and time (in UTC, ISO 8601 format) for querying alerts.", alias="startDate") end_date: Optional[datetime] = Field(default=None, description="The end date and time (in UTC, ISO 8601 format) for querying alerts.", alias="endDate") violation_count: Optional[StrictInt] = Field(default=None, description="Number of sources that meet the alert criteria.", alias="violationCount") - duration: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Duration in seconds the alert was active") + duration: Optional[StrictInt] = Field(default=None, description="Duration in seconds the alert was active") suppressed: Optional[StrictBool] = Field(default=None, description="Indicates whether the alert is currently suppressed by a real-time ASW.") meta: Optional[AlertMeta] = None links: Optional[AlertLinks] = Field(default=None, alias="_links") @@ -78,6 +78,7 @@ class Alert(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -88,7 +89,7 @@ class Alert(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_detail.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_detail.py index 1ce7edeb..1bbffb8a 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_detail.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_detail.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,8 +18,8 @@ import re # noqa: F401 import json from datetime import datetime -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional from thousandeyes_sdk.alerts.models.alert_links import AlertLinks from thousandeyes_sdk.alerts.models.alert_meta import AlertMeta from thousandeyes_sdk.alerts.models.alert_metric_detail import AlertMetricDetail @@ -38,7 +38,7 @@ class AlertDetail(BaseModel): start_date: Optional[datetime] = Field(default=None, description="The start date and time (in UTC, ISO 8601 format) for querying alerts.", alias="startDate") end_date: Optional[datetime] = Field(default=None, description="The end date and time (in UTC, ISO 8601 format) for querying alerts.", alias="endDate") violation_count: Optional[StrictInt] = Field(default=None, description="Number of sources that meet the alert criteria.", alias="violationCount") - duration: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Duration in seconds the alert was active") + duration: Optional[StrictInt] = Field(default=None, description="Duration in seconds the alert was active") suppressed: Optional[StrictBool] = Field(default=None, description="Indicates whether the alert is currently suppressed by a real-time ASW.") meta: Optional[AlertMeta] = None links: Optional[AlertLinks] = Field(default=None, alias="_links") @@ -51,6 +51,7 @@ class AlertDetail(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -61,7 +62,7 @@ class AlertDetail(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_direction.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_direction.py index c1f428bc..31d40be6 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_direction.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_direction.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_links.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_links.py index b043c594..8ce292e6 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_links.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_links.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -37,6 +37,7 @@ class AlertLinks(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -47,7 +48,7 @@ class AlertLinks(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_meta.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_meta.py index 3fdb32ac..d0fb5f87 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_meta.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_meta.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -33,6 +33,7 @@ class AlertMeta(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -43,7 +44,7 @@ class AlertMeta(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_metric_detail.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_metric_detail.py index 7d923df9..60011a79 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_metric_detail.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_metric_detail.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -41,6 +41,7 @@ class AlertMetricDetail(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -51,7 +52,7 @@ class AlertMetricDetail(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_rounds_violation_mode.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_rounds_violation_mode.py index 24630ae2..5199e52c 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_rounds_violation_mode.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_rounds_violation_mode.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_rule.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_rule.py index 84732272..6f1556ac 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_rule.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_rule.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -48,6 +48,7 @@ class AlertRule(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -58,7 +59,7 @@ class AlertRule(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_suppression_window.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_suppression_window.py index d86d1429..be834393 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_suppression_window.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_suppression_window.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -46,6 +46,7 @@ class AlertSuppressionWindow(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -56,7 +57,7 @@ class AlertSuppressionWindow(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_suppression_window_detail.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_suppression_window_detail.py index cdb7887a..b78ec80f 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_suppression_window_detail.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_suppression_window_detail.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -48,6 +48,7 @@ class AlertSuppressionWindowDetail(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -58,7 +59,7 @@ class AlertSuppressionWindowDetail(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_suppression_window_request.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_suppression_window_request.py index 1dbc4d3f..6a087c85 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_suppression_window_request.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_suppression_window_request.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -45,6 +45,7 @@ class AlertSuppressionWindowRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -55,7 +56,7 @@ class AlertSuppressionWindowRequest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_suppression_window_state.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_suppression_window_state.py index 57d0cae4..6af1cb29 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_suppression_window_state.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_suppression_window_state.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_suppression_windows.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_suppression_windows.py index c30864db..09e0a7d7 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_suppression_windows.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_suppression_windows.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class AlertSuppressionWindows(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class AlertSuppressionWindows(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_type.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_type.py index d243b1ac..bb6ba53b 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_type.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alert_type.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alerts.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alerts.py index 77b906ae..1b95a9d3 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alerts.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/alerts.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class Alerts(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class Alerts(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/base_alert.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/base_alert.py index 6395b82d..b8cd715e 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/base_alert.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/base_alert.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,8 +18,8 @@ import re # noqa: F401 import json from datetime import datetime -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional from thousandeyes_sdk.alerts.models.alert_links import AlertLinks from thousandeyes_sdk.alerts.models.alert_meta import AlertMeta from thousandeyes_sdk.alerts.models.alert_type import AlertType @@ -35,7 +35,7 @@ class BaseAlert(BaseModel): start_date: Optional[datetime] = Field(default=None, description="The start date and time (in UTC, ISO 8601 format) for querying alerts.", alias="startDate") end_date: Optional[datetime] = Field(default=None, description="The end date and time (in UTC, ISO 8601 format) for querying alerts.", alias="endDate") violation_count: Optional[StrictInt] = Field(default=None, description="Number of sources that meet the alert criteria.", alias="violationCount") - duration: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Duration in seconds the alert was active") + duration: Optional[StrictInt] = Field(default=None, description="Duration in seconds the alert was active") suppressed: Optional[StrictBool] = Field(default=None, description="Indicates whether the alert is currently suppressed by a real-time ASW.") meta: Optional[AlertMeta] = None links: Optional[AlertLinks] = Field(default=None, alias="_links") @@ -45,6 +45,7 @@ class BaseAlert(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -55,7 +56,7 @@ class BaseAlert(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/base_alert_suppression_window.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/base_alert_suppression_window.py index 6ab0d7c5..7acf24e5 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/base_alert_suppression_window.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/base_alert_suppression_window.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -44,6 +44,7 @@ class BaseAlertSuppressionWindow(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -54,7 +55,7 @@ class BaseAlertSuppressionWindow(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/base_rule.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/base_rule.py index 47f6442f..b73f7777 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/base_rule.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/base_rule.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -50,6 +50,7 @@ class BaseRule(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -60,7 +61,7 @@ class BaseRule(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/base_test.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/base_test.py index e9a9384c..de76b66b 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/base_test.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/base_test.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -38,6 +38,7 @@ class BaseTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -48,7 +49,7 @@ class BaseTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/days_of_week.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/days_of_week.py index cbca4ecf..141c60b4 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/days_of_week.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/days_of_week.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/end_alert_metrics.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/end_alert_metrics.py index 976564f3..f0daa2a9 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/end_alert_metrics.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/end_alert_metrics.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -33,6 +33,7 @@ class EndAlertMetrics(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -43,7 +44,7 @@ class EndAlertMetrics(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/end_repeat.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/end_repeat.py index c9f3665d..3c03114b 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/end_repeat.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/end_repeat.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -37,6 +37,7 @@ class EndRepeat(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -47,7 +48,7 @@ class EndRepeat(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/end_repeat_type.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/end_repeat_type.py index 90bf391d..3fb4e490 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/end_repeat_type.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/end_repeat_type.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/error.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/error.py index c5538a53..eed6fd80 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/error.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/error.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -37,6 +37,7 @@ class Error(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -47,7 +48,7 @@ class Error(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/expand.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/expand.py index d5c38f8d..0d55a955 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/expand.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/expand.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/interval_type.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/interval_type.py index d7f37724..7952ed85 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/interval_type.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/interval_type.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/legacy_alert.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/legacy_alert.py index ed84010f..5d2706b8 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/legacy_alert.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/legacy_alert.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -60,6 +60,7 @@ class LegacyAlert(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -70,7 +71,7 @@ class LegacyAlert(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/link.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/link.py index a90ee28b..5db5f116 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/link.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/link.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -40,6 +40,7 @@ class Link(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -50,7 +51,7 @@ class Link(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/notification.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/notification.py index 5ef19de2..1df09895 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/notification.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/notification.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -38,6 +38,7 @@ class Notification(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -48,7 +49,7 @@ class Notification(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/notification_email.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/notification_email.py index 5bc8abaf..c3bd3cda 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/notification_email.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/notification_email.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class NotificationEmail(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class NotificationEmail(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/notification_third_party.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/notification_third_party.py index e3c4f557..8cfa588d 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/notification_third_party.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/notification_third_party.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class NotificationThirdParty(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class NotificationThirdParty(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/notification_webhook.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/notification_webhook.py index 4f010553..efcc08c1 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/notification_webhook.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/notification_webhook.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class NotificationWebhook(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class NotificationWebhook(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/pagination_links.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/pagination_links.py index fd2e7564..206fdc60 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/pagination_links.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/pagination_links.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class PaginationLinks(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class PaginationLinks(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/repeat.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/repeat.py index 13d21300..9cc858bf 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/repeat.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/repeat.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -39,6 +39,7 @@ class Repeat(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -49,7 +50,7 @@ class Repeat(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/repeat_type.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/repeat_type.py index 58c3cd5f..a4750211 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/repeat_type.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/repeat_type.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/rule.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/rule.py index ff36eafd..c634b65f 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/rule.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/rule.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -55,6 +55,7 @@ class Rule(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -65,7 +66,7 @@ class Rule(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/rule_detail.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/rule_detail.py index 184582ff..f62ede74 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/rule_detail.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/rule_detail.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -56,6 +56,7 @@ class RuleDetail(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -66,7 +67,7 @@ class RuleDetail(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/rule_detail_update.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/rule_detail_update.py index 83756810..2308b61e 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/rule_detail_update.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/rule_detail_update.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -53,6 +53,7 @@ class RuleDetailUpdate(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -63,7 +64,7 @@ class RuleDetailUpdate(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/rules.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/rules.py index 2ae03116..599246b7 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/rules.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/rules.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class Rules(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class Rules(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/self_links.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/self_links.py index 6c54d7f3..4ae903bc 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/self_links.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/self_links.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class SelfLinks(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class SelfLinks(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/severity.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/severity.py index b8aed690..5cda5be6 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/severity.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/severity.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/start_alert_metrics.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/start_alert_metrics.py index 94733814..c6ec46b4 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/start_alert_metrics.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/start_alert_metrics.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -33,6 +33,7 @@ class StartAlertMetrics(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -43,7 +44,7 @@ class StartAlertMetrics(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/state.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/state.py index 1fe841e8..928a364d 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/state.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/state.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/test_interval.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/test_interval.py index 4bdbf845..00967ee2 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/test_interval.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/test_interval.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/third_party_integration_type.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/third_party_integration_type.py index 2378206e..16cc879a 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/third_party_integration_type.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/third_party_integration_type.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/unauthorized_error.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/unauthorized_error.py index ffb7d4de..8fff01a0 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/unauthorized_error.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/unauthorized_error.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class UnauthorizedError(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class UnauthorizedError(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/unexpanded_test.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/unexpanded_test.py index ff13944a..f916e4c6 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/unexpanded_test.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/unexpanded_test.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class UnexpandedTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class UnexpandedTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/validation_error.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/validation_error.py index f84eb83a..39b52e02 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/validation_error.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/validation_error.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -39,6 +39,7 @@ class ValidationError(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -49,7 +50,7 @@ class ValidationError(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/validation_error_item.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/validation_error_item.py index 304dc40c..9ac49d8d 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/validation_error_item.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/validation_error_item.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,7 +17,7 @@ import pprint import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +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 @@ -27,7 +27,7 @@ class ValidationErrorItem(BaseModel): ValidationErrorItem """ # noqa: E501 code: Optional[StrictStr] = Field(default=None, description="(Optional) A unique error type/code that can be referenced in the documentation for further details.") - var_field: Optional[StrictInt] = Field(default=None, description="Identifies the field that triggered this particular error.", alias="field") + var_field: Optional[StrictStr] = Field(default=None, description="Identifies the field that triggered this particular error.", alias="field") message: Optional[StrictStr] = Field(default=None, description="A short, human-readable summary of the error.") __properties: ClassVar[List[str]] = ["code", "field", "message"] @@ -35,6 +35,7 @@ class ValidationErrorItem(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class ValidationErrorItem(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/webhook_integration_type.py b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/webhook_integration_type.py index c939a8cd..019f1250 100644 --- a/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/webhook_integration_type.py +++ b/thousandeyes-sdk-alerts/src/thousandeyes_sdk/alerts/models/webhook_integration_type.py @@ -5,7 +5,7 @@ You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-alerts/test/test_alert_rules_api.py b/thousandeyes-sdk-alerts/test/test_alert_rules_api.py new file mode 100644 index 00000000..926db0d6 --- /dev/null +++ b/thousandeyes-sdk-alerts/test/test_alert_rules_api.py @@ -0,0 +1,412 @@ +# coding: utf-8 + +""" + Alerts API + + You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.alerts.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.alerts.api.alert_rules_api import AlertRulesApi + + +class TestAlertRulesApi(unittest.TestCase): + """AlertRulesApi unit test stubs""" + + def setUp(self) -> None: + self.api = AlertRulesApi() + + def tearDown(self) -> None: + pass + + def test_create_alert_rule_models_validation(self) -> None: + """Test case for create_alert_rule request and response models""" + request_body_json = """ + { + "severity" : "major", + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "includeCoveredPrefixes" : true, + "roundsViolatingMode" : "exact", + "notifyOnClear" : true, + "testIds" : [ "281474976710706", "271659" ], + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "ruleId" : "127094", + "notifications" : { + "thirdParty" : [ { + "integrationType" : "slack", + "integrationId" : "sl-101" + }, { + "integrationType" : "slack", + "integrationId" : "sl-101" + } ], + "webhook" : [ { + "integrationType" : "webhook", + "integrationId" : "wb-201" + }, { + "integrationType" : "webhook", + "integrationId" : "wb-201" + } ], + "email" : { + "recipients" : [ "noreply@thousandeyes.com" ], + "message" : "Notification message" + } + }, + "direction" : "to-target" + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.alerts.models.RuleDetailUpdate.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "severity" : "major", + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "_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" + } + }, + "includeCoveredPrefixes" : true, + "roundsViolatingMode" : "exact", + "notifyOnClear" : true, + "testIds" : [ "281474976710706", "271659" ], + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "ruleId" : "127094", + "notifications" : { + "thirdParty" : [ { + "integrationType" : "slack", + "integrationId" : "sl-101" + }, { + "integrationType" : "slack", + "integrationId" : "sl-101" + } ], + "webhook" : [ { + "integrationType" : "webhook", + "integrationId" : "wb-201" + }, { + "integrationType" : "webhook", + "integrationId" : "wb-201" + } ], + "email" : { + "recipients" : [ "noreply@thousandeyes.com" ], + "message" : "Notification message" + } + }, + "direction" : "to-target" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.alerts.models.Rule.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_delete_alert_rule_models_validation(self) -> None: + """Test case for delete_alert_rule request and response models""" + + + def test_get_alert_rule_models_validation(self) -> None: + """Test case for get_alert_rule request and response models""" + + response_body_json = """ + { + "severity" : "major", + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "_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" + } + }, + "includeCoveredPrefixes" : true, + "roundsViolatingMode" : "exact", + "notifyOnClear" : true, + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "tests" : [ { + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "interval" : 120, + "alertsEnabled" : true, + "enabled" : true + }, { + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "interval" : 120, + "alertsEnabled" : true, + "enabled" : true + } ], + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "ruleId" : "127094", + "notifications" : { + "thirdParty" : [ { + "integrationType" : "slack", + "integrationId" : "sl-101" + }, { + "integrationType" : "slack", + "integrationId" : "sl-101" + } ], + "webhook" : [ { + "integrationType" : "webhook", + "integrationId" : "wb-201" + }, { + "integrationType" : "webhook", + "integrationId" : "wb-201" + } ], + "email" : { + "recipients" : [ "noreply@thousandeyes.com" ], + "message" : "Notification message" + } + }, + "direction" : "to-target" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.alerts.models.RuleDetail.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_alerts_rules_models_validation(self) -> None: + """Test case for get_alerts_rules request and response models""" + + response_body_json = """ + { + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "alertRules" : [ { + "severity" : "major", + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "includeCoveredPrefixes" : true, + "roundsViolatingMode" : "exact", + "notifyOnClear" : true, + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "includeCoveredPrefixes" : true, + "roundsViolatingMode" : "exact", + "notifyOnClear" : true, + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "ruleId" : "127094", + "direction" : "to-target" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.alerts.models.Rules.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_update_alert_rule_models_validation(self) -> None: + """Test case for update_alert_rule request and response models""" + request_body_json = """ + { + "severity" : "major", + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "includeCoveredPrefixes" : true, + "roundsViolatingMode" : "exact", + "notifyOnClear" : true, + "testIds" : [ "281474976710706", "271659" ], + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "ruleId" : "127094", + "notifications" : { + "thirdParty" : [ { + "integrationType" : "slack", + "integrationId" : "sl-101" + }, { + "integrationType" : "slack", + "integrationId" : "sl-101" + } ], + "webhook" : [ { + "integrationType" : "webhook", + "integrationId" : "wb-201" + }, { + "integrationType" : "webhook", + "integrationId" : "wb-201" + } ], + "email" : { + "recipients" : [ "noreply@thousandeyes.com" ], + "message" : "Notification message" + } + }, + "direction" : "to-target" + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.alerts.models.RuleDetailUpdate.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "severity" : "major", + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "_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" + } + }, + "includeCoveredPrefixes" : true, + "roundsViolatingMode" : "exact", + "notifyOnClear" : true, + "testIds" : [ "281474976710706", "271659" ], + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "ruleId" : "127094", + "notifications" : { + "thirdParty" : [ { + "integrationType" : "slack", + "integrationId" : "sl-101" + }, { + "integrationType" : "slack", + "integrationId" : "sl-101" + } ], + "webhook" : [ { + "integrationType" : "webhook", + "integrationId" : "wb-201" + }, { + "integrationType" : "webhook", + "integrationId" : "wb-201" + } ], + "email" : { + "recipients" : [ "noreply@thousandeyes.com" ], + "message" : "Notification message" + } + }, + "direction" : "to-target" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.alerts.models.Rule.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-alerts/test/test_alert_suppression_windows_api.py b/thousandeyes-sdk-alerts/test/test_alert_suppression_windows_api.py new file mode 100644 index 00000000..baacd4da --- /dev/null +++ b/thousandeyes-sdk-alerts/test/test_alert_suppression_windows_api.py @@ -0,0 +1,481 @@ +# coding: utf-8 + +""" + Alerts API + + You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.alerts.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.alerts.api.alert_suppression_windows_api import AlertSuppressionWindowsApi + + +class TestAlertSuppressionWindowsApi(unittest.TestCase): + """AlertSuppressionWindowsApi unit test stubs""" + + def setUp(self) -> None: + self.api = AlertSuppressionWindowsApi() + + def tearDown(self) -> None: + pass + + def test_create_alert_suppression_window_models_validation(self) -> None: + """Test case for create_alert_suppression_window request and response models""" + request_body_json = """ + { + "duration" : 0, + "alertSuppressionWindowId" : "2411", + "tests" : [ "71687", "71687" ], + "isEnabled" : false, + "repeat" : { + "intervalType" : "day", + "intervalLength" : 2, + "type" : "week", + "daysOfWeek" : [ "sun", "sun" ] + }, + "endRepeat" : { + "date" : "2017-07-01", + "count" : 3, + "type" : "never" + }, + "name" : "Monthly maintenance", + "startDate" : "2017-07-01T05:00:00Z", + "status" : "ended" + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.alerts.models.AlertSuppressionWindowRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "duration" : 0, + "alertSuppressionWindowId" : "2411", + "tests" : [ { + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "interval" : 120, + "alertsEnabled" : true, + "enabled" : true + }, { + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "interval" : 120, + "alertsEnabled" : true, + "enabled" : 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" + } + }, + "isEnabled" : false, + "repeat" : { + "intervalType" : "day", + "intervalLength" : 2, + "type" : "week", + "daysOfWeek" : [ "sun", "sun" ] + }, + "endRepeat" : { + "date" : "2017-07-01", + "count" : 3, + "type" : "never" + }, + "name" : "Monthly maintenance", + "startDate" : "2017-07-01T05:00:00Z", + "status" : "ended" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.alerts.models.AlertSuppressionWindowDetail.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_delete_alert_suppression_window_models_validation(self) -> None: + """Test case for delete_alert_suppression_window request and response models""" + + + def test_get_alert_suppression_window_models_validation(self) -> None: + """Test case for get_alert_suppression_window request and response models""" + + response_body_json = """ + { + "duration" : 0, + "alertSuppressionWindowId" : "2411", + "tests" : [ { + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "interval" : 120, + "alertsEnabled" : true, + "enabled" : true + }, { + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "interval" : 120, + "alertsEnabled" : true, + "enabled" : 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" + } + }, + "isEnabled" : false, + "repeat" : { + "intervalType" : "day", + "intervalLength" : 2, + "type" : "week", + "daysOfWeek" : [ "sun", "sun" ] + }, + "endRepeat" : { + "date" : "2017-07-01", + "count" : 3, + "type" : "never" + }, + "name" : "Monthly maintenance", + "startDate" : "2017-07-01T05:00:00Z", + "status" : "ended" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.alerts.models.AlertSuppressionWindowDetail.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_alert_suppression_windows_models_validation(self) -> None: + """Test case for get_alert_suppression_windows request and response models""" + + response_body_json = """ + { + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "alertSuppressionWindows" : [ { + "duration" : 0, + "alertSuppressionWindowId" : "2411", + "_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" + } + }, + "isEnabled" : false, + "repeat" : { + "intervalType" : "day", + "intervalLength" : 2, + "type" : "week", + "daysOfWeek" : [ "sun", "sun" ] + }, + "endRepeat" : { + "date" : "2017-07-01", + "count" : 3, + "type" : "never" + }, + "name" : "Monthly maintenance", + "startDate" : "2017-07-01T05:00:00Z", + "status" : "ended" + }, { + "duration" : 0, + "alertSuppressionWindowId" : "2411", + "_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" + } + }, + "isEnabled" : false, + "repeat" : { + "intervalType" : "day", + "intervalLength" : 2, + "type" : "week", + "daysOfWeek" : [ "sun", "sun" ] + }, + "endRepeat" : { + "date" : "2017-07-01", + "count" : 3, + "type" : "never" + }, + "name" : "Monthly maintenance", + "startDate" : "2017-07-01T05:00:00Z", + "status" : "ended" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.alerts.models.AlertSuppressionWindows.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_update_alert_suppression_window_models_validation(self) -> None: + """Test case for update_alert_suppression_window request and response models""" + request_body_json = """ + { + "duration" : 0, + "alertSuppressionWindowId" : "2411", + "tests" : [ "71687", "71687" ], + "isEnabled" : false, + "repeat" : { + "intervalType" : "day", + "intervalLength" : 2, + "type" : "week", + "daysOfWeek" : [ "sun", "sun" ] + }, + "endRepeat" : { + "date" : "2017-07-01", + "count" : 3, + "type" : "never" + }, + "name" : "Monthly maintenance", + "startDate" : "2017-07-01T05:00:00Z", + "status" : "ended" + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.alerts.models.AlertSuppressionWindowRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "duration" : 0, + "alertSuppressionWindowId" : "2411", + "tests" : [ { + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "interval" : 120, + "alertsEnabled" : true, + "enabled" : true + }, { + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "interval" : 120, + "alertsEnabled" : true, + "enabled" : 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" + } + }, + "isEnabled" : false, + "repeat" : { + "intervalType" : "day", + "intervalLength" : 2, + "type" : "week", + "daysOfWeek" : [ "sun", "sun" ] + }, + "endRepeat" : { + "date" : "2017-07-01", + "count" : 3, + "type" : "never" + }, + "name" : "Monthly maintenance", + "startDate" : "2017-07-01T05:00:00Z", + "status" : "ended" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.alerts.models.AlertSuppressionWindowDetail.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-alerts/test/test_alerts_api.py b/thousandeyes-sdk-alerts/test/test_alerts_api.py new file mode 100644 index 00000000..6f93423f --- /dev/null +++ b/thousandeyes-sdk-alerts/test/test_alerts_api.py @@ -0,0 +1,302 @@ +# coding: utf-8 + +""" + Alerts API + + You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: * **Alerts**: Retrieve alert details. Alerts are assigned to tests through alert rules. * **Alert Rules**: Conditions that you configure in order to highlight or be notified of events of interest in your ThousandEyes tests. When an alert rule’s conditions are met, the associated alert is triggered and the alert becomes active. It remains active until the alert is cleared. Alert rules are reusable across multiple tests.. * **Alert Suppression Windows**: Suppress alerts for tests during periods such as planned maintenance. Windows can be one-time events or recurring events to handle periodic occurrences such as monthly downtime for maintenance. For more information about the alerts, see [Alerts](https://docs.thousandeyes.com/product-documentation/alerts). + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.alerts.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.alerts.api.alerts_api import AlertsApi + + +class TestAlertsApi(unittest.TestCase): + """AlertsApi unit test stubs""" + + def setUp(self) -> None: + self.api = AlertsApi() + + def tearDown(self) -> None: + pass + + def test_get_alert_models_validation(self) -> None: + """Test case for get_alert request and response models""" + + response_body_json = """ + { + "duration" : 60, + "severity" : "major", + "alertType" : "http-server", + "violationCount" : 2, + "endDate" : "2020-04-23T13:43:16Z", + "_links" : { + "appLink" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + }, + "test" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + }, + "rule" : { + "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" + } + }, + "meta" : { + "version" : 1 + }, + "details" : [ { + "name" : "Bucharest, Romania", + "start" : { + "metrics" : "metrics" + }, + "end" : { + "metrics" : "metrics" + }, + "id" : "3379", + "state" : "active", + "type" : "cea_agent" + }, { + "name" : "Bucharest, Romania", + "start" : { + "metrics" : "metrics" + }, + "end" : { + "metrics" : "metrics" + }, + "id" : "3379", + "state" : "active", + "type" : "cea_agent" + } ], + "id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569", + "suppressed" : false, + "state" : "active", + "startDate" : "2020-04-23T13:43:16Z" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.alerts.models.AlertDetail.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_alerts_models_validation(self) -> None: + """Test case for get_alerts request and response models""" + + response_body_json = """ + { + "alerts" : [ { + "severity" : "MAJOR", + "alertType" : "http-server", + "endDate" : "2020-04-23T13:43:16Z", + "_links" : { + "appLink" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + }, + "test" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + }, + "rule" : { + "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" + } + }, + "apiLinks" : [ { + "key" : "" + }, { + "key" : "" + } ], + "alertSeverity" : "major", + "dateEnd" : "2020-04-23 13:43:16", + "duration" : 60, + "violationCount" : 2, + "dateStart" : "2020-04-23 13:43:16", + "meta" : { + "version" : 1 + }, + "id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569", + "suppressed" : false, + "alertId" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569", + "state" : "ACTIVE", + "ruleId" : 127094, + "permalink" : "https://app.thousandeyes.com/alerts/list?__a=75&alertId=2783&agentId=12", + "alertState" : "active", + "startDate" : "2020-04-23T13:43:16Z", + "alertRuleId" : "127094" + }, { + "severity" : "MAJOR", + "alertType" : "http-server", + "endDate" : "2020-04-23T13:43:16Z", + "_links" : { + "appLink" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + }, + "test" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + }, + "rule" : { + "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" + } + }, + "apiLinks" : [ { + "key" : "" + }, { + "key" : "" + } ], + "alertSeverity" : "major", + "dateEnd" : "2020-04-23 13:43:16", + "duration" : 60, + "violationCount" : 2, + "dateStart" : "2020-04-23 13:43:16", + "meta" : { + "version" : 1 + }, + "id" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569", + "suppressed" : false, + "alertId" : "e9c3bf02-a48c-4aa8-9e5f-898800d6f569", + "state" : "ACTIVE", + "ruleId" : 127094, + "permalink" : "https://app.thousandeyes.com/alerts/list?__a=75&alertId=2783&agentId=12", + "alertState" : "active", + "startDate" : "2020-04-23T13:43:16Z", + "alertRuleId" : "127094" + } ], + "_links" : { + "next" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + }, + "previous" : { + "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" + } + } + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.alerts.models.Alerts.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-alerts/test/test_utils.py b/thousandeyes-sdk-alerts/test/test_utils.py new file mode 100644 index 00000000..930528d9 --- /dev/null +++ b/thousandeyes-sdk-alerts/test/test_utils.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +import json +import unittest + +from pydantic import BaseModel + + +def assert_constructed_model_matches_example_json(model: BaseModel, loaded_json: dict): + test_case = unittest.TestCase() + test_case.maxDiff = None + test_case.assertIsNotNone(model) + constructed_json = json.loads(model.to_json()) + sorted_loaded_json = json.dumps(loaded_json, sort_keys=True) + sorted_constructed_json = json.dumps(constructed_json, sort_keys=True) + test_case.assertEqual(sorted_loaded_json, sorted_constructed_json) diff --git a/thousandeyes-sdk-bgp-monitors/.openapi-generator-ignore b/thousandeyes-sdk-bgp-monitors/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/thousandeyes-sdk-bgp-monitors/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/thousandeyes-sdk-bgp-monitors/.openapi-generator/FILES b/thousandeyes-sdk-bgp-monitors/.openapi-generator/FILES new file mode 100644 index 00000000..7e5275f8 --- /dev/null +++ b/thousandeyes-sdk-bgp-monitors/.openapi-generator/FILES @@ -0,0 +1,27 @@ +.openapi-generator-ignore +README.md +docs/Error.md +docs/Link.md +docs/ListBGPMonitorsApi.md +docs/Monitor.md +docs/MonitorType.md +docs/Monitors.md +docs/SelfLinks.md +docs/UnauthorizedError.md +pyproject.toml +setup.cfg +src/thousandeyes_sdk/bgp_monitors/__init__.py +src/thousandeyes_sdk/bgp_monitors/api/__init__.py +src/thousandeyes_sdk/bgp_monitors/api/list_bgp_monitors_api.py +src/thousandeyes_sdk/bgp_monitors/models/__init__.py +src/thousandeyes_sdk/bgp_monitors/models/error.py +src/thousandeyes_sdk/bgp_monitors/models/link.py +src/thousandeyes_sdk/bgp_monitors/models/monitor.py +src/thousandeyes_sdk/bgp_monitors/models/monitor_type.py +src/thousandeyes_sdk/bgp_monitors/models/monitors.py +src/thousandeyes_sdk/bgp_monitors/models/self_links.py +src/thousandeyes_sdk/bgp_monitors/models/unauthorized_error.py +src/thousandeyes_sdk/bgp_monitors/py.typed +test/__init__.py +test/test_list_bgp_monitors_api.py +test/test_utils.py diff --git a/thousandeyes-sdk-bgp-monitors/.openapi-generator/VERSION b/thousandeyes-sdk-bgp-monitors/.openapi-generator/VERSION new file mode 100644 index 00000000..93c8ddab --- /dev/null +++ b/thousandeyes-sdk-bgp-monitors/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.6.0 diff --git a/thousandeyes-sdk-bgp-monitors/README.md b/thousandeyes-sdk-bgp-monitors/README.md new file mode 100644 index 00000000..28e5fce9 --- /dev/null +++ b/thousandeyes-sdk-bgp-monitors/README.md @@ -0,0 +1,132 @@ +# thousandeyes-sdk-bgp-monitors + +Retrieve information about BGP monitors available to your ThousandEyes account. ThousandEyes ingests BGP routing data from dozens of global BGP collectors and automatically integrates that visibility as a configurable layer under service, network, and path visualization layers. + +When you specify a service URL in a test, layered BGP tests automatically track reachability and path changes for any relevant prefix. When you use an IP address as the target for a test, the ThousandEyes platform monitors the relevant internet-routed prefix. You can also create specific BGP monitoring for a prefix, and can alert on hijacks and leaks. + +For more information about monitors, see [Inside-Out BGP Visibility](https://docs.thousandeyes.com/product-documentation/internet-and-wan-monitoring/tests/bgp-tests/inside-out-bgp-visibility). + + +This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: 7.0.6 +- Generator version: 7.6.0 +- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator + +## Requirements. + +Python 3.7+ + +## Installation & Usage +### pip install + +If the python package is hosted on a repository, you can install directly using: + +```sh +pip install -e git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git#egg=thousandeyes-sdk-bgp-monitors\&subdirectory=thousandeyes-sdk-bgp-monitors +``` +(you may need to run `pip` with root permission: `sudo pip install -e git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git#egg=thousandeyes-sdk-bgp-monitors\&subdirectory=thousandeyes-sdk-bgp-monitors`) + +Then import the package: +```python +import thousandeyes_sdk.bgp_monitors +``` + +### Setuptools + +Install via [Setuptools](http://pypi.python.org/pypi/setuptools). + +```sh +python setup.py install --user +``` +(or `sudo python setup.py install` to install the package for all users) + +Then import the package: +```python +import thousandeyes_sdk.bgp_monitors +``` + +### Tests + +Execute `pytest` to run the tests. + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```python + +import thousandeyes_sdk.client +import thousandeyes_sdk.bgp_monitors +from thousandeyes_sdk.client.exceptions import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + + +# Enter a context with an instance of the API client +with thousandeyes_sdk.client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.bgp_monitors.ListBGPMonitorsApi(api_client) + 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: + # List BGP monitors + api_response = api_instance.get_bgp_monitors(aid=aid) + print("The response of ListBGPMonitorsApi->get_bgp_monitors:\n") + pprint(api_response) + except ApiException as e: + print("Exception when calling ListBGPMonitorsApi->get_bgp_monitors: %s\n" % e) + +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.thousandeyes.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*ListBGPMonitorsApi* | [**get_bgp_monitors**](docs/ListBGPMonitorsApi.md#get_bgp_monitors) | **GET** /v7/monitors | List BGP monitors + + +## Documentation For Models + + - [Error](docs/Error.md) + - [Link](docs/Link.md) + - [Monitor](docs/Monitor.md) + - [MonitorType](docs/MonitorType.md) + - [Monitors](docs/Monitors.md) + - [SelfLinks](docs/SelfLinks.md) + - [UnauthorizedError](docs/UnauthorizedError.md) + + + +## Documentation For Authorization + + +Authentication schemes defined for the API: + +### BearerAuth + +- **Type**: Bearer authentication + + +## Author + + + + diff --git a/thousandeyes-sdk-bgp-monitors/docs/Error.md b/thousandeyes-sdk-bgp-monitors/docs/Error.md new file mode 100644 index 00000000..4c5d99c7 --- /dev/null +++ b/thousandeyes-sdk-bgp-monitors/docs/Error.md @@ -0,0 +1,33 @@ +# Error + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\". | [optional] +**title** | **str** | A short, human-readable summary of the problem type. | [optional] +**status** | **int** | The HTTP status code generated by the origin server for this occurrence of the problem. | [optional] +**detail** | **str** | A human-readable explanation specific to this occurrence of the problem. | [optional] +**instance** | **str** | A URI reference that identifies the specific occurrence of the problem. | [optional] + +## Example + +```python +from thousandeyes_sdk.bgp_monitors.models.error import Error + +# TODO update the JSON string below +json = "{}" +# create an instance of Error from a JSON string +error_instance = Error.from_json(json) +# print the JSON string representation of the object +print(Error.to_json()) + +# convert the object into a dict +error_dict = error_instance.to_dict() +# create an instance of Error from a dict +error_from_dict = Error.from_dict(error_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-bgp-monitors/docs/Link.md b/thousandeyes-sdk-bgp-monitors/docs/Link.md new file mode 100644 index 00000000..7823e521 --- /dev/null +++ b/thousandeyes-sdk-bgp-monitors/docs/Link.md @@ -0,0 +1,37 @@ +# Link + +A hyperlink from the containing resource to a URI. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **str** | Its value is either a URI [RFC3986] or a URI template [RFC6570]. | +**templated** | **bool** | Should be true when the link object's \"href\" property is a URI template. | [optional] +**type** | **str** | Used as a hint to indicate the media type expected when dereferencing the target resource. | [optional] +**deprecation** | **str** | Its presence indicates that the link is to be deprecated at a future date. Its value is a URL that should provide further information about the deprecation. | [optional] +**name** | **str** | Its value may be used as a secondary key for selecting link objects that share the same relation type. | [optional] +**profile** | **str** | A URI that hints about the profile of the target resource. | [optional] +**title** | **str** | Intended for labelling the link with a human-readable identifier | [optional] +**hreflang** | **str** | Indicates the language of the target resource | [optional] + +## Example + +```python +from thousandeyes_sdk.bgp_monitors.models.link import Link + +# TODO update the JSON string below +json = "{}" +# create an instance of Link from a JSON string +link_instance = Link.from_json(json) +# print the JSON string representation of the object +print(Link.to_json()) + +# convert the object into a dict +link_dict = link_instance.to_dict() +# create an instance of Link from a dict +link_from_dict = Link.from_dict(link_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-bgp-monitors/docs/ListBGPMonitorsApi.md b/thousandeyes-sdk-bgp-monitors/docs/ListBGPMonitorsApi.md new file mode 100644 index 00000000..7ad34a02 --- /dev/null +++ b/thousandeyes-sdk-bgp-monitors/docs/ListBGPMonitorsApi.md @@ -0,0 +1,92 @@ +# thousandeyes_sdk.bgp_monitors.ListBGPMonitorsApi + +All URIs are relative to *https://api.thousandeyes.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_bgp_monitors**](ListBGPMonitorsApi.md#get_bgp_monitors) | **GET** /v7/monitors | List BGP monitors + + +# **get_bgp_monitors** +> Monitors get_bgp_monitors(aid=aid) + +List BGP monitors + +Retrieves a list of BGP monitors available to your account in ThousandEyes, including public and private feeds. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.bgp_monitors +from thousandeyes_sdk.bgp_monitors.models.monitors import Monitors +from thousandeyes_sdk.bgp_monitors.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.bgp_monitors.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.bgp_monitors.ListBGPMonitorsApi(api_client) + 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: + # List BGP monitors + api_response = api_instance.get_bgp_monitors(aid=aid) + print("The response of ListBGPMonitorsApi->get_bgp_monitors:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ListBGPMonitorsApi->get_bgp_monitors: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **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 + +[**Monitors**](Monitors.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**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) + diff --git a/thousandeyes-sdk-bgp-monitors/docs/Monitor.md b/thousandeyes-sdk-bgp-monitors/docs/Monitor.md new file mode 100644 index 00000000..04b6eade --- /dev/null +++ b/thousandeyes-sdk-bgp-monitors/docs/Monitor.md @@ -0,0 +1,34 @@ +# Monitor + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**country_id** | **str** | Country ID | [optional] [readonly] +**monitor_id** | **str** | BGP monitor ID | [optional] [readonly] +**ip_address** | **str** | IP address of the BGP monitor | [optional] +**network** | **str** | Name of the autonomous system in which the monitor is found | [optional] +**monitor_type** | [**MonitorType**](MonitorType.md) | | [optional] +**monitor_name** | **str** | Display name of the BGP monitor | [optional] + +## Example + +```python +from thousandeyes_sdk.bgp_monitors.models.monitor import Monitor + +# TODO update the JSON string below +json = "{}" +# create an instance of Monitor from a JSON string +monitor_instance = Monitor.from_json(json) +# print the JSON string representation of the object +print(Monitor.to_json()) + +# convert the object into a dict +monitor_dict = monitor_instance.to_dict() +# create an instance of Monitor from a dict +monitor_from_dict = Monitor.from_dict(monitor_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-bgp-monitors/docs/MonitorType.md b/thousandeyes-sdk-bgp-monitors/docs/MonitorType.md new file mode 100644 index 00000000..5f7d589b --- /dev/null +++ b/thousandeyes-sdk-bgp-monitors/docs/MonitorType.md @@ -0,0 +1,12 @@ +# MonitorType + +Type of monitor + +## 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-bgp-monitors/docs/Monitors.md b/thousandeyes-sdk-bgp-monitors/docs/Monitors.md new file mode 100644 index 00000000..441cf768 --- /dev/null +++ b/thousandeyes-sdk-bgp-monitors/docs/Monitors.md @@ -0,0 +1,30 @@ +# Monitors + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**monitors** | [**List[Monitor]**](Monitor.md) | | [optional] +**links** | [**SelfLinks**](SelfLinks.md) | | [optional] + +## Example + +```python +from thousandeyes_sdk.bgp_monitors.models.monitors import Monitors + +# TODO update the JSON string below +json = "{}" +# create an instance of Monitors from a JSON string +monitors_instance = Monitors.from_json(json) +# print the JSON string representation of the object +print(Monitors.to_json()) + +# convert the object into a dict +monitors_dict = monitors_instance.to_dict() +# create an instance of Monitors from a dict +monitors_from_dict = Monitors.from_dict(monitors_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-bgp-monitors/docs/SelfLinks.md b/thousandeyes-sdk-bgp-monitors/docs/SelfLinks.md new file mode 100644 index 00000000..17afe991 --- /dev/null +++ b/thousandeyes-sdk-bgp-monitors/docs/SelfLinks.md @@ -0,0 +1,30 @@ +# SelfLinks + +A links object containing the self link. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**var_self** | [**Link**](Link.md) | | [optional] + +## Example + +```python +from thousandeyes_sdk.bgp_monitors.models.self_links import SelfLinks + +# TODO update the JSON string below +json = "{}" +# create an instance of SelfLinks from a JSON string +self_links_instance = SelfLinks.from_json(json) +# print the JSON string representation of the object +print(SelfLinks.to_json()) + +# convert the object into a dict +self_links_dict = self_links_instance.to_dict() +# create an instance of SelfLinks from a dict +self_links_from_dict = SelfLinks.from_dict(self_links_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-bgp-monitors/docs/UnauthorizedError.md b/thousandeyes-sdk-bgp-monitors/docs/UnauthorizedError.md new file mode 100644 index 00000000..e50e8c43 --- /dev/null +++ b/thousandeyes-sdk-bgp-monitors/docs/UnauthorizedError.md @@ -0,0 +1,30 @@ +# UnauthorizedError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | | [optional] +**error_description** | **str** | | [optional] + +## Example + +```python +from thousandeyes_sdk.bgp_monitors.models.unauthorized_error import UnauthorizedError + +# TODO update the JSON string below +json = "{}" +# create an instance of UnauthorizedError from a JSON string +unauthorized_error_instance = UnauthorizedError.from_json(json) +# print the JSON string representation of the object +print(UnauthorizedError.to_json()) + +# convert the object into a dict +unauthorized_error_dict = unauthorized_error_instance.to_dict() +# create an instance of UnauthorizedError from a dict +unauthorized_error_from_dict = UnauthorizedError.from_dict(unauthorized_error_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-bgp-monitors/pyproject.toml b/thousandeyes-sdk-bgp-monitors/pyproject.toml new file mode 100644 index 00000000..2b1d2ccb --- /dev/null +++ b/thousandeyes-sdk-bgp-monitors/pyproject.toml @@ -0,0 +1,80 @@ +[project] +name = "thousandeyes-sdk-bgp-monitors" +dynamic = ["version"] +authors = [ + { name = "ThousandEyes API Team", email = "api-team@thousandeyes.com" } +] +description = "BGP Monitors API" +license = { text = "../LICENSE" } +dependencies = [ + "urllib3 >= 1.25.3", + "python-dateutil >=2.8.2", + "pydantic >=2", + "typing-extensions >=4.7.1", + "thousandeyes-sdk-core", +] + +[tool.setuptools.dynamic] +version = {attr = "thousandeyes_sdk.client.__version__"} + +[project.optional-dependencies] +test = [ + "pytest~=7.1.3", + "pytest-cov>=2.8.1", + "pytest-randomly>=3.12.0", + "mypy>=1.4.1", + "types-python-dateutil>=2.8.19", +] +dev = [ + "flake8>=4.0.0", + "mypy>=1.4.1", + "types-python-dateutil>=2.8.19", +] + +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[tool.setuptools] +include-package-data = true + +[tool.pylint.'MESSAGES CONTROL'] +extension-pkg-whitelist = "pydantic" + +[tool.mypy] +files = [ + "src", + #"test", # auto-generated tests + "tests", # hand-written tests +] +# TODO: enable "strict" once all these individual checks are passing +# strict = true + +# List from: https://mypy.readthedocs.io/en/stable/existing_code.html#introduce-stricter-options +warn_unused_configs = true +warn_redundant_casts = true +warn_unused_ignores = true + +## Getting these passing should be easy +strict_equality = true +strict_concatenate = true + +## Strongly recommend enabling this one as soon as you can +check_untyped_defs = true + +## These shouldn't be too much additional work, but may be tricky to +## get passing if you use a lot of untyped libraries +disallow_subclassing_any = true +disallow_untyped_decorators = true +disallow_any_generics = true + +### These next few are various gradations of forcing use of type annotations +#disallow_untyped_calls = true +#disallow_incomplete_defs = true +#disallow_untyped_defs = true +# +### This one isn't too hard to get passing, but return on investment is lower +#no_implicit_reexport = true +# +### This one can be tricky to get passing if you use a lot of untyped libraries +#warn_return_any = true diff --git a/thousandeyes-sdk-bgp-monitors/setup.cfg b/thousandeyes-sdk-bgp-monitors/setup.cfg new file mode 100644 index 00000000..11433ee8 --- /dev/null +++ b/thousandeyes-sdk-bgp-monitors/setup.cfg @@ -0,0 +1,2 @@ +[flake8] +max-line-length=99 diff --git a/thousandeyes-sdk-bgp-monitors/src/thousandeyes_sdk/bgp_monitors/__init__.py b/thousandeyes-sdk-bgp-monitors/src/thousandeyes_sdk/bgp_monitors/__init__.py new file mode 100644 index 00000000..080c7b74 --- /dev/null +++ b/thousandeyes-sdk-bgp-monitors/src/thousandeyes_sdk/bgp_monitors/__init__.py @@ -0,0 +1,28 @@ +# coding: utf-8 + +# flake8: noqa + +""" + BGP Monitors API + + Retrieve information about BGP monitors available to your ThousandEyes account. ThousandEyes ingests BGP routing data from dozens of global BGP collectors and automatically integrates that visibility as a configurable layer under service, network, and path visualization layers. When you specify a service URL in a test, layered BGP tests automatically track reachability and path changes for any relevant prefix. When you use an IP address as the target for a test, the ThousandEyes platform monitors the relevant internet-routed prefix. You can also create specific BGP monitoring for a prefix, and can alert on hijacks and leaks. For more information about monitors, see [Inside-Out BGP Visibility](https://docs.thousandeyes.com/product-documentation/internet-and-wan-monitoring/tests/bgp-tests/inside-out-bgp-visibility). + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import apis into sdk package +from thousandeyes_sdk.bgp_monitors.api.list_bgp_monitors_api import ListBGPMonitorsApi + + +# import models into sdk package +from thousandeyes_sdk.bgp_monitors.models.error import Error +from thousandeyes_sdk.bgp_monitors.models.link import Link +from thousandeyes_sdk.bgp_monitors.models.monitor import Monitor +from thousandeyes_sdk.bgp_monitors.models.monitor_type import MonitorType +from thousandeyes_sdk.bgp_monitors.models.monitors import Monitors +from thousandeyes_sdk.bgp_monitors.models.self_links import SelfLinks +from thousandeyes_sdk.bgp_monitors.models.unauthorized_error import UnauthorizedError diff --git a/thousandeyes-sdk-bgp-monitors/src/thousandeyes_sdk/bgp_monitors/api/__init__.py b/thousandeyes-sdk-bgp-monitors/src/thousandeyes_sdk/bgp_monitors/api/__init__.py new file mode 100644 index 00000000..36c92d39 --- /dev/null +++ b/thousandeyes-sdk-bgp-monitors/src/thousandeyes_sdk/bgp_monitors/api/__init__.py @@ -0,0 +1,5 @@ +# flake8: noqa + +# import apis into api package +from thousandeyes_sdk.bgp_monitors.api.list_bgp_monitors_api import ListBGPMonitorsApi + diff --git a/thousandeyes-sdk-bgp-monitors/src/thousandeyes_sdk/bgp_monitors/api/list_bgp_monitors_api.py b/thousandeyes-sdk-bgp-monitors/src/thousandeyes_sdk/bgp_monitors/api/list_bgp_monitors_api.py new file mode 100644 index 00000000..18770481 --- /dev/null +++ b/thousandeyes-sdk-bgp-monitors/src/thousandeyes_sdk/bgp_monitors/api/list_bgp_monitors_api.py @@ -0,0 +1,322 @@ +# coding: utf-8 + +""" + BGP Monitors API + + Retrieve information about BGP monitors available to your ThousandEyes account. ThousandEyes ingests BGP routing data from dozens of global BGP collectors and automatically integrates that visibility as a configurable layer under service, network, and path visualization layers. When you specify a service URL in a test, layered BGP tests automatically track reachability and path changes for any relevant prefix. When you use an IP address as the target for a test, the ThousandEyes platform monitors the relevant internet-routed prefix. You can also create specific BGP monitoring for a prefix, and can alert on hijacks and leaks. For more information about monitors, see [Inside-Out BGP Visibility](https://docs.thousandeyes.com/product-documentation/internet-and-wan-monitoring/tests/bgp-tests/inside-out-bgp-visibility). + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +import thousandeyes_sdk.bgp_monitors.models + +from pydantic import Field, StrictStr +from typing import Optional +from typing_extensions import Annotated +from thousandeyes_sdk.bgp_monitors.models.monitors import Monitors + +from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized +from thousandeyes_sdk.client.api_response import ApiResponse +from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version + + +class ListBGPMonitorsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) + self.api_client = api_client + + + @validate_call + def get_bgp_monitors( + 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, + ) -> Monitors: + """List BGP monitors + + Retrieves a list of BGP monitors available to your account in ThousandEyes, including public and private feeds. + + :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_bgp_monitors_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': "Monitors", + '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.bgp_monitors.models, + ).data + + + @validate_call + def get_bgp_monitors_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[Monitors]: + """List BGP monitors + + Retrieves a list of BGP monitors available to your account in ThousandEyes, including public and private feeds. + + :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_bgp_monitors_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': "Monitors", + '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.bgp_monitors.models, + ) + + + @validate_call + def get_bgp_monitors_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 BGP monitors + + Retrieves a list of BGP monitors available to your account in ThousandEyes, including public and private feeds. + + :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_bgp_monitors_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': "Monitors", + '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_bgp_monitors_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='/v7/monitors', + 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 + ) + + diff --git a/thousandeyes-sdk-bgp-monitors/src/thousandeyes_sdk/bgp_monitors/models/__init__.py b/thousandeyes-sdk-bgp-monitors/src/thousandeyes_sdk/bgp_monitors/models/__init__.py new file mode 100644 index 00000000..5c776c86 --- /dev/null +++ b/thousandeyes-sdk-bgp-monitors/src/thousandeyes_sdk/bgp_monitors/models/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +# flake8: noqa +""" + BGP Monitors API + + Retrieve information about BGP monitors available to your ThousandEyes account. ThousandEyes ingests BGP routing data from dozens of global BGP collectors and automatically integrates that visibility as a configurable layer under service, network, and path visualization layers. When you specify a service URL in a test, layered BGP tests automatically track reachability and path changes for any relevant prefix. When you use an IP address as the target for a test, the ThousandEyes platform monitors the relevant internet-routed prefix. You can also create specific BGP monitoring for a prefix, and can alert on hijacks and leaks. For more information about monitors, see [Inside-Out BGP Visibility](https://docs.thousandeyes.com/product-documentation/internet-and-wan-monitoring/tests/bgp-tests/inside-out-bgp-visibility). + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +# import models into model package +from thousandeyes_sdk.bgp_monitors.models.error import Error +from thousandeyes_sdk.bgp_monitors.models.link import Link +from thousandeyes_sdk.bgp_monitors.models.monitor import Monitor +from thousandeyes_sdk.bgp_monitors.models.monitor_type import MonitorType +from thousandeyes_sdk.bgp_monitors.models.monitors import Monitors +from thousandeyes_sdk.bgp_monitors.models.self_links import SelfLinks +from thousandeyes_sdk.bgp_monitors.models.unauthorized_error import UnauthorizedError diff --git a/thousandeyes-sdk-bgp-monitors/src/thousandeyes_sdk/bgp_monitors/models/error.py b/thousandeyes-sdk-bgp-monitors/src/thousandeyes_sdk/bgp_monitors/models/error.py new file mode 100644 index 00000000..9a483afc --- /dev/null +++ b/thousandeyes-sdk-bgp-monitors/src/thousandeyes_sdk/bgp_monitors/models/error.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + BGP Monitors API + + Retrieve information about BGP monitors available to your ThousandEyes account. ThousandEyes ingests BGP routing data from dozens of global BGP collectors and automatically integrates that visibility as a configurable layer under service, network, and path visualization layers. When you specify a service URL in a test, layered BGP tests automatically track reachability and path changes for any relevant prefix. When you use an IP address as the target for a test, the ThousandEyes platform monitors the relevant internet-routed prefix. You can also create specific BGP monitoring for a prefix, and can alert on hijacks and leaks. For more information about monitors, see [Inside-Out BGP Visibility](https://docs.thousandeyes.com/product-documentation/internet-and-wan-monitoring/tests/bgp-tests/inside-out-bgp-visibility). + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class Error(BaseModel): + """ + Error + """ # noqa: E501 + type: Optional[StrictStr] = Field(default=None, description="A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\".") + title: Optional[StrictStr] = Field(default=None, description="A short, human-readable summary of the problem type.") + status: Optional[StrictInt] = Field(default=None, description="The HTTP status code generated by the origin server for this occurrence of the problem.") + detail: Optional[StrictStr] = Field(default=None, description="A human-readable explanation specific to this occurrence of the problem.") + instance: Optional[StrictStr] = Field(default=None, description="A URI reference that identifies the specific occurrence of the problem.") + __properties: ClassVar[List[str]] = ["type", "title", "status", "detail", "instance"] + + 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 Error 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 Error from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "title": obj.get("title"), + "status": obj.get("status"), + "detail": obj.get("detail"), + "instance": obj.get("instance") + }) + return _obj + + diff --git a/thousandeyes-sdk-bgp-monitors/src/thousandeyes_sdk/bgp_monitors/models/link.py b/thousandeyes-sdk-bgp-monitors/src/thousandeyes_sdk/bgp_monitors/models/link.py new file mode 100644 index 00000000..5f8cf578 --- /dev/null +++ b/thousandeyes-sdk-bgp-monitors/src/thousandeyes_sdk/bgp_monitors/models/link.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + BGP Monitors API + + Retrieve information about BGP monitors available to your ThousandEyes account. ThousandEyes ingests BGP routing data from dozens of global BGP collectors and automatically integrates that visibility as a configurable layer under service, network, and path visualization layers. When you specify a service URL in a test, layered BGP tests automatically track reachability and path changes for any relevant prefix. When you use an IP address as the target for a test, the ThousandEyes platform monitors the relevant internet-routed prefix. You can also create specific BGP monitoring for a prefix, and can alert on hijacks and leaks. For more information about monitors, see [Inside-Out BGP Visibility](https://docs.thousandeyes.com/product-documentation/internet-and-wan-monitoring/tests/bgp-tests/inside-out-bgp-visibility). + + The version of the OpenAPI document: 7.0.6 + 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 import Optional, Set +from typing_extensions import Self + +class Link(BaseModel): + """ + A hyperlink from the containing resource to a URI. + """ # noqa: E501 + href: StrictStr = Field(description="Its value is either a URI [RFC3986] or a URI template [RFC6570].") + templated: Optional[StrictBool] = Field(default=None, description="Should be true when the link object's \"href\" property is a URI template.") + type: Optional[StrictStr] = Field(default=None, description="Used as a hint to indicate the media type expected when dereferencing the target resource.") + deprecation: Optional[StrictStr] = Field(default=None, description="Its presence indicates that the link is to be deprecated at a future date. Its value is a URL that should provide further information about the deprecation.") + name: Optional[StrictStr] = Field(default=None, description="Its value may be used as a secondary key for selecting link objects that share the same relation type.") + profile: Optional[StrictStr] = Field(default=None, description="A URI that hints about the profile of the target resource.") + title: Optional[StrictStr] = Field(default=None, description="Intended for labelling the link with a human-readable identifier") + hreflang: Optional[StrictStr] = Field(default=None, description="Indicates the language of the target resource") + __properties: ClassVar[List[str]] = ["href", "templated", "type", "deprecation", "name", "profile", "title", "hreflang"] + + 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 Link 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 Link from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "href": obj.get("href"), + "templated": obj.get("templated"), + "type": obj.get("type"), + "deprecation": obj.get("deprecation"), + "name": obj.get("name"), + "profile": obj.get("profile"), + "title": obj.get("title"), + "hreflang": obj.get("hreflang") + }) + return _obj + + diff --git a/thousandeyes-sdk-bgp-monitors/src/thousandeyes_sdk/bgp_monitors/models/monitor.py b/thousandeyes-sdk-bgp-monitors/src/thousandeyes_sdk/bgp_monitors/models/monitor.py new file mode 100644 index 00000000..055bc175 --- /dev/null +++ b/thousandeyes-sdk-bgp-monitors/src/thousandeyes_sdk/bgp_monitors/models/monitor.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + BGP Monitors API + + Retrieve information about BGP monitors available to your ThousandEyes account. ThousandEyes ingests BGP routing data from dozens of global BGP collectors and automatically integrates that visibility as a configurable layer under service, network, and path visualization layers. When you specify a service URL in a test, layered BGP tests automatically track reachability and path changes for any relevant prefix. When you use an IP address as the target for a test, the ThousandEyes platform monitors the relevant internet-routed prefix. You can also create specific BGP monitoring for a prefix, and can alert on hijacks and leaks. For more information about monitors, see [Inside-Out BGP Visibility](https://docs.thousandeyes.com/product-documentation/internet-and-wan-monitoring/tests/bgp-tests/inside-out-bgp-visibility). + + The version of the OpenAPI document: 7.0.6 + 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 thousandeyes_sdk.bgp_monitors.models.monitor_type import MonitorType +from typing import Optional, Set +from typing_extensions import Self + +class Monitor(BaseModel): + """ + Monitor + """ # noqa: E501 + country_id: Optional[StrictStr] = Field(default=None, description="Country ID", alias="countryId") + monitor_id: Optional[StrictStr] = Field(default=None, description="BGP monitor ID", alias="monitorId") + ip_address: Optional[StrictStr] = Field(default=None, description="IP address of the BGP monitor", alias="ipAddress") + network: Optional[StrictStr] = Field(default=None, description="Name of the autonomous system in which the monitor is found") + monitor_type: Optional[MonitorType] = Field(default=None, alias="monitorType") + monitor_name: Optional[StrictStr] = Field(default=None, description="Display name of the BGP monitor", alias="monitorName") + __properties: ClassVar[List[str]] = ["countryId", "monitorId", "ipAddress", "network", "monitorType", "monitorName"] + + 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 Monitor from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "country_id", + "monitor_id", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Monitor from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "countryId": obj.get("countryId"), + "monitorId": obj.get("monitorId"), + "ipAddress": obj.get("ipAddress"), + "network": obj.get("network"), + "monitorType": obj.get("monitorType"), + "monitorName": obj.get("monitorName") + }) + return _obj + + diff --git a/thousandeyes-sdk-bgp-monitors/src/thousandeyes_sdk/bgp_monitors/models/monitor_type.py b/thousandeyes-sdk-bgp-monitors/src/thousandeyes_sdk/bgp_monitors/models/monitor_type.py new file mode 100644 index 00000000..e02e4f75 --- /dev/null +++ b/thousandeyes-sdk-bgp-monitors/src/thousandeyes_sdk/bgp_monitors/models/monitor_type.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + BGP Monitors API + + Retrieve information about BGP monitors available to your ThousandEyes account. ThousandEyes ingests BGP routing data from dozens of global BGP collectors and automatically integrates that visibility as a configurable layer under service, network, and path visualization layers. When you specify a service URL in a test, layered BGP tests automatically track reachability and path changes for any relevant prefix. When you use an IP address as the target for a test, the ThousandEyes platform monitors the relevant internet-routed prefix. You can also create specific BGP monitoring for a prefix, and can alert on hijacks and leaks. For more information about monitors, see [Inside-Out BGP Visibility](https://docs.thousandeyes.com/product-documentation/internet-and-wan-monitoring/tests/bgp-tests/inside-out-bgp-visibility). + + The version of the OpenAPI document: 7.0.6 + 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 MonitorType(str, Enum): + """ + Type of monitor + """ + + """ + allowed enum values + """ + PUBLIC = 'public' + PRIVATE = 'private' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of MonitorType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/thousandeyes-sdk-bgp-monitors/src/thousandeyes_sdk/bgp_monitors/models/monitors.py b/thousandeyes-sdk-bgp-monitors/src/thousandeyes_sdk/bgp_monitors/models/monitors.py new file mode 100644 index 00000000..e9b919fa --- /dev/null +++ b/thousandeyes-sdk-bgp-monitors/src/thousandeyes_sdk/bgp_monitors/models/monitors.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + BGP Monitors API + + Retrieve information about BGP monitors available to your ThousandEyes account. ThousandEyes ingests BGP routing data from dozens of global BGP collectors and automatically integrates that visibility as a configurable layer under service, network, and path visualization layers. When you specify a service URL in a test, layered BGP tests automatically track reachability and path changes for any relevant prefix. When you use an IP address as the target for a test, the ThousandEyes platform monitors the relevant internet-routed prefix. You can also create specific BGP monitoring for a prefix, and can alert on hijacks and leaks. For more information about monitors, see [Inside-Out BGP Visibility](https://docs.thousandeyes.com/product-documentation/internet-and-wan-monitoring/tests/bgp-tests/inside-out-bgp-visibility). + + The version of the OpenAPI document: 7.0.6 + 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.bgp_monitors.models.monitor import Monitor +from thousandeyes_sdk.bgp_monitors.models.self_links import SelfLinks +from typing import Optional, Set +from typing_extensions import Self + +class Monitors(BaseModel): + """ + Monitors + """ # noqa: E501 + monitors: Optional[List[Monitor]] = None + links: Optional[SelfLinks] = Field(default=None, alias="_links") + __properties: ClassVar[List[str]] = ["monitors", "_links"] + + 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 Monitors 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 each item in monitors (list) + _items = [] + if self.monitors: + for _item in self.monitors: + if _item: + _items.append(_item.to_dict()) + _dict['monitors'] = _items + # override the default output from pydantic by calling `to_dict()` of links + if self.links: + _dict['_links'] = self.links.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Monitors from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "monitors": [Monitor.from_dict(_item) for _item in obj["monitors"]] if obj.get("monitors") is not None else None, + "_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None + }) + return _obj + + diff --git a/thousandeyes-sdk-bgp-monitors/src/thousandeyes_sdk/bgp_monitors/models/self_links.py b/thousandeyes-sdk-bgp-monitors/src/thousandeyes_sdk/bgp_monitors/models/self_links.py new file mode 100644 index 00000000..e6638982 --- /dev/null +++ b/thousandeyes-sdk-bgp-monitors/src/thousandeyes_sdk/bgp_monitors/models/self_links.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + BGP Monitors API + + Retrieve information about BGP monitors available to your ThousandEyes account. ThousandEyes ingests BGP routing data from dozens of global BGP collectors and automatically integrates that visibility as a configurable layer under service, network, and path visualization layers. When you specify a service URL in a test, layered BGP tests automatically track reachability and path changes for any relevant prefix. When you use an IP address as the target for a test, the ThousandEyes platform monitors the relevant internet-routed prefix. You can also create specific BGP monitoring for a prefix, and can alert on hijacks and leaks. For more information about monitors, see [Inside-Out BGP Visibility](https://docs.thousandeyes.com/product-documentation/internet-and-wan-monitoring/tests/bgp-tests/inside-out-bgp-visibility). + + The version of the OpenAPI document: 7.0.6 + 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.bgp_monitors.models.link import Link +from typing import Optional, Set +from typing_extensions import Self + +class SelfLinks(BaseModel): + """ + A links object containing the self link. + """ # noqa: E501 + var_self: Optional[Link] = Field(default=None, alias="self") + __properties: ClassVar[List[str]] = ["self"] + + 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 SelfLinks 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 var_self + if self.var_self: + _dict['self'] = self.var_self.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SelfLinks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "self": Link.from_dict(obj["self"]) if obj.get("self") is not None else None + }) + return _obj + + diff --git a/thousandeyes-sdk-bgp-monitors/src/thousandeyes_sdk/bgp_monitors/models/unauthorized_error.py b/thousandeyes-sdk-bgp-monitors/src/thousandeyes_sdk/bgp_monitors/models/unauthorized_error.py new file mode 100644 index 00000000..3f9397a2 --- /dev/null +++ b/thousandeyes-sdk-bgp-monitors/src/thousandeyes_sdk/bgp_monitors/models/unauthorized_error.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + BGP Monitors API + + Retrieve information about BGP monitors available to your ThousandEyes account. ThousandEyes ingests BGP routing data from dozens of global BGP collectors and automatically integrates that visibility as a configurable layer under service, network, and path visualization layers. When you specify a service URL in a test, layered BGP tests automatically track reachability and path changes for any relevant prefix. When you use an IP address as the target for a test, the ThousandEyes platform monitors the relevant internet-routed prefix. You can also create specific BGP monitoring for a prefix, and can alert on hijacks and leaks. For more information about monitors, see [Inside-Out BGP Visibility](https://docs.thousandeyes.com/product-documentation/internet-and-wan-monitoring/tests/bgp-tests/inside-out-bgp-visibility). + + The version of the OpenAPI document: 7.0.6 + 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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UnauthorizedError(BaseModel): + """ + UnauthorizedError + """ # noqa: E501 + error: Optional[StrictStr] = None + error_description: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["error", "error_description"] + + 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 UnauthorizedError 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 UnauthorizedError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": obj.get("error"), + "error_description": obj.get("error_description") + }) + return _obj + + diff --git a/thousandeyes-sdk-bgp-monitors/src/thousandeyes_sdk/bgp_monitors/py.typed b/thousandeyes-sdk-bgp-monitors/src/thousandeyes_sdk/bgp_monitors/py.typed new file mode 100644 index 00000000..e69de29b diff --git a/thousandeyes-sdk-bgp-monitors/test/__init__.py b/thousandeyes-sdk-bgp-monitors/test/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/thousandeyes-sdk-bgp-monitors/test/test_list_bgp_monitors_api.py b/thousandeyes-sdk-bgp-monitors/test/test_list_bgp_monitors_api.py new file mode 100644 index 00000000..5644b394 --- /dev/null +++ b/thousandeyes-sdk-bgp-monitors/test/test_list_bgp_monitors_api.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + BGP Monitors API + + Retrieve information about BGP monitors available to your ThousandEyes account. ThousandEyes ingests BGP routing data from dozens of global BGP collectors and automatically integrates that visibility as a configurable layer under service, network, and path visualization layers. When you specify a service URL in a test, layered BGP tests automatically track reachability and path changes for any relevant prefix. When you use an IP address as the target for a test, the ThousandEyes platform monitors the relevant internet-routed prefix. You can also create specific BGP monitoring for a prefix, and can alert on hijacks and leaks. For more information about monitors, see [Inside-Out BGP Visibility](https://docs.thousandeyes.com/product-documentation/internet-and-wan-monitoring/tests/bgp-tests/inside-out-bgp-visibility). + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.bgp_monitors.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.bgp_monitors.api.list_bgp_monitors_api import ListBGPMonitorsApi + + +class TestListBGPMonitorsApi(unittest.TestCase): + """ListBGPMonitorsApi unit test stubs""" + + def setUp(self) -> None: + self.api = ListBGPMonitorsApi() + + def tearDown(self) -> None: + pass + + def test_get_bgp_monitors_models_validation(self) -> None: + """Test case for get_bgp_monitors request and response models""" + + response_body_json = """ + { + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "monitors" : [ { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + }, { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.bgp_monitors.models.Monitors.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-bgp-monitors/test/test_utils.py b/thousandeyes-sdk-bgp-monitors/test/test_utils.py new file mode 100644 index 00000000..930528d9 --- /dev/null +++ b/thousandeyes-sdk-bgp-monitors/test/test_utils.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +import json +import unittest + +from pydantic import BaseModel + + +def assert_constructed_model_matches_example_json(model: BaseModel, loaded_json: dict): + test_case = unittest.TestCase() + test_case.maxDiff = None + test_case.assertIsNotNone(model) + constructed_json = json.loads(model.to_json()) + sorted_loaded_json = json.dumps(loaded_json, sort_keys=True) + sorted_constructed_json = json.dumps(constructed_json, sort_keys=True) + test_case.assertEqual(sorted_loaded_json, sorted_constructed_json) diff --git a/thousandeyes-sdk-credentials/.openapi-generator/FILES b/thousandeyes-sdk-credentials/.openapi-generator/FILES index 1c684ac2..5b08dd1f 100644 --- a/thousandeyes-sdk-credentials/.openapi-generator/FILES +++ b/thousandeyes-sdk-credentials/.openapi-generator/FILES @@ -29,13 +29,5 @@ src/thousandeyes_sdk/credentials/models/validation_error.py src/thousandeyes_sdk/credentials/models/validation_error_item.py src/thousandeyes_sdk/credentials/py.typed test/__init__.py -test/test_credential.py -test/test_credential_request.py -test/test_credential_without_value.py -test/test_credentials.py -test/test_error.py -test/test_link.py -test/test_self_links.py -test/test_unauthorized_error.py -test/test_validation_error.py -test/test_validation_error_item.py +test/test_credentials_api.py +test/test_utils.py diff --git a/thousandeyes-sdk-credentials/README.md b/thousandeyes-sdk-credentials/README.md index 0fb27f00..db313fcd 100644 --- a/thousandeyes-sdk-credentials/README.md +++ b/thousandeyes-sdk-credentials/README.md @@ -13,8 +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.4 -- Package version: 1.0.0 +- API version: 7.0.6 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator @@ -28,9 +27,9 @@ Python 3.7+ If the python package is hosted on a repository, you can install directly using: ```sh -pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +pip install -e git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git#egg=thousandeyes-sdk-credentials\&subdirectory=thousandeyes-sdk-credentials ``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) +(you may need to run `pip` with root permission: `sudo pip install -e git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git#egg=thousandeyes-sdk-credentials\&subdirectory=thousandeyes-sdk-credentials`) Then import the package: ```python @@ -92,11 +91,11 @@ with thousandeyes_sdk.client.ApiClient(configuration) as api_client: try: # Create credential - api_response = api_instance.create_transaction_tests_credential(credential_request, aid=aid) - print("The response of CredentialsApi->create_transaction_tests_credential:\n") + api_response = api_instance.create_credential(credential_request, aid=aid) + print("The response of CredentialsApi->create_credential:\n") pprint(api_response) except ApiException as e: - print("Exception when calling CredentialsApi->create_transaction_tests_credential: %s\n" % e) + print("Exception when calling CredentialsApi->create_credential: %s\n" % e) ``` @@ -106,11 +105,11 @@ All URIs are relative to *https://api.thousandeyes.com* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*CredentialsApi* | [**create_transaction_tests_credential**](docs/CredentialsApi.md#create_transaction_tests_credential) | **POST** /v7/credentials | Create credential -*CredentialsApi* | [**delete_transaction_tests_credential**](docs/CredentialsApi.md#delete_transaction_tests_credential) | **DELETE** /v7/credentials/{id} | Delete credential -*CredentialsApi* | [**get_transaction_tests_credential_details**](docs/CredentialsApi.md#get_transaction_tests_credential_details) | **GET** /v7/credentials/{id} | Retrieve credential -*CredentialsApi* | [**get_transaction_tests_credentials_list**](docs/CredentialsApi.md#get_transaction_tests_credentials_list) | **GET** /v7/credentials | List credentials -*CredentialsApi* | [**update_transaction_tests_credential**](docs/CredentialsApi.md#update_transaction_tests_credential) | **PUT** /v7/credentials/{id} | Update credential +*CredentialsApi* | [**create_credential**](docs/CredentialsApi.md#create_credential) | **POST** /v7/credentials | Create credential +*CredentialsApi* | [**delete_credential**](docs/CredentialsApi.md#delete_credential) | **DELETE** /v7/credentials/{id} | Delete credential +*CredentialsApi* | [**get_credential**](docs/CredentialsApi.md#get_credential) | **GET** /v7/credentials/{id} | Retrieve credential +*CredentialsApi* | [**get_credentials**](docs/CredentialsApi.md#get_credentials) | **GET** /v7/credentials | List credentials +*CredentialsApi* | [**update_credential**](docs/CredentialsApi.md#update_credential) | **PUT** /v7/credentials/{id} | Update credential ## Documentation For Models diff --git a/thousandeyes-sdk-credentials/docs/CredentialsApi.md b/thousandeyes-sdk-credentials/docs/CredentialsApi.md index 50dff314..97658076 100644 --- a/thousandeyes-sdk-credentials/docs/CredentialsApi.md +++ b/thousandeyes-sdk-credentials/docs/CredentialsApi.md @@ -4,15 +4,15 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**create_transaction_tests_credential**](CredentialsApi.md#create_transaction_tests_credential) | **POST** /v7/credentials | Create credential -[**delete_transaction_tests_credential**](CredentialsApi.md#delete_transaction_tests_credential) | **DELETE** /v7/credentials/{id} | Delete credential -[**get_transaction_tests_credential_details**](CredentialsApi.md#get_transaction_tests_credential_details) | **GET** /v7/credentials/{id} | Retrieve credential -[**get_transaction_tests_credentials_list**](CredentialsApi.md#get_transaction_tests_credentials_list) | **GET** /v7/credentials | List credentials -[**update_transaction_tests_credential**](CredentialsApi.md#update_transaction_tests_credential) | **PUT** /v7/credentials/{id} | Update credential +[**create_credential**](CredentialsApi.md#create_credential) | **POST** /v7/credentials | Create credential +[**delete_credential**](CredentialsApi.md#delete_credential) | **DELETE** /v7/credentials/{id} | Delete credential +[**get_credential**](CredentialsApi.md#get_credential) | **GET** /v7/credentials/{id} | Retrieve credential +[**get_credentials**](CredentialsApi.md#get_credentials) | **GET** /v7/credentials | List credentials +[**update_credential**](CredentialsApi.md#update_credential) | **PUT** /v7/credentials/{id} | Update credential -# **create_transaction_tests_credential** -> CredentialWithoutValue create_transaction_tests_credential(credential_request, aid=aid) +# **create_credential** +> CredentialWithoutValue create_credential(credential_request, aid=aid) Create credential @@ -54,11 +54,11 @@ with thousandeyes_sdk.credentials.ApiClient(configuration) as api_client: try: # Create credential - api_response = api_instance.create_transaction_tests_credential(credential_request, aid=aid) - print("The response of CredentialsApi->create_transaction_tests_credential:\n") + api_response = api_instance.create_credential(credential_request, aid=aid) + print("The response of CredentialsApi->create_credential:\n") pprint(api_response) except Exception as e: - print("Exception when calling CredentialsApi->create_transaction_tests_credential: %s\n" % e) + print("Exception when calling CredentialsApi->create_credential: %s\n" % e) ``` @@ -82,7 +82,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -98,8 +98,8 @@ 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) -# **delete_transaction_tests_credential** -> delete_transaction_tests_credential(id, aid=aid) +# **delete_credential** +> delete_credential(id, aid=aid) Delete credential @@ -139,9 +139,9 @@ with thousandeyes_sdk.credentials.ApiClient(configuration) as api_client: try: # Delete credential - api_instance.delete_transaction_tests_credential(id, aid=aid) + api_instance.delete_credential(id, aid=aid) except Exception as e: - print("Exception when calling CredentialsApi->delete_transaction_tests_credential: %s\n" % e) + print("Exception when calling CredentialsApi->delete_credential: %s\n" % e) ``` @@ -165,7 +165,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/problem+json + - **Accept**: application/json, application/problem+json ### HTTP response details @@ -180,8 +180,8 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_transaction_tests_credential_details** -> Credential get_transaction_tests_credential_details(id, aid=aid) +# **get_credential** +> Credential get_credential(id, aid=aid) Retrieve credential @@ -222,11 +222,11 @@ with thousandeyes_sdk.credentials.ApiClient(configuration) as api_client: try: # Retrieve credential - api_response = api_instance.get_transaction_tests_credential_details(id, aid=aid) - print("The response of CredentialsApi->get_transaction_tests_credential_details:\n") + api_response = api_instance.get_credential(id, aid=aid) + print("The response of CredentialsApi->get_credential:\n") pprint(api_response) except Exception as e: - print("Exception when calling CredentialsApi->get_transaction_tests_credential_details: %s\n" % e) + print("Exception when calling CredentialsApi->get_credential: %s\n" % e) ``` @@ -250,7 +250,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -266,8 +266,8 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_transaction_tests_credentials_list** -> Credentials get_transaction_tests_credentials_list(aid=aid) +# **get_credentials** +> Credentials get_credentials(aid=aid) List credentials @@ -307,11 +307,11 @@ with thousandeyes_sdk.credentials.ApiClient(configuration) as api_client: try: # List credentials - api_response = api_instance.get_transaction_tests_credentials_list(aid=aid) - print("The response of CredentialsApi->get_transaction_tests_credentials_list:\n") + api_response = api_instance.get_credentials(aid=aid) + print("The response of CredentialsApi->get_credentials:\n") pprint(api_response) except Exception as e: - print("Exception when calling CredentialsApi->get_transaction_tests_credentials_list: %s\n" % e) + print("Exception when calling CredentialsApi->get_credentials: %s\n" % e) ``` @@ -334,7 +334,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -349,8 +349,8 @@ 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_transaction_tests_credential** -> CredentialWithoutValue update_transaction_tests_credential(id, credential_request, aid=aid) +# **update_credential** +> CredentialWithoutValue update_credential(id, credential_request, aid=aid) Update credential @@ -393,11 +393,11 @@ with thousandeyes_sdk.credentials.ApiClient(configuration) as api_client: try: # Update credential - api_response = api_instance.update_transaction_tests_credential(id, credential_request, aid=aid) - print("The response of CredentialsApi->update_transaction_tests_credential:\n") + api_response = api_instance.update_credential(id, credential_request, aid=aid) + print("The response of CredentialsApi->update_credential:\n") pprint(api_response) except Exception as e: - print("Exception when calling CredentialsApi->update_transaction_tests_credential: %s\n" % e) + print("Exception when calling CredentialsApi->update_credential: %s\n" % e) ``` @@ -422,7 +422,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-credentials/docs/ValidationErrorItem.md b/thousandeyes-sdk-credentials/docs/ValidationErrorItem.md index c8698156..ee12899c 100644 --- a/thousandeyes-sdk-credentials/docs/ValidationErrorItem.md +++ b/thousandeyes-sdk-credentials/docs/ValidationErrorItem.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **code** | **str** | (Optional) A unique error type/code that can be referenced in the documentation for further details. | [optional] -**var_field** | **int** | Identifies the field that triggered this particular error. | [optional] +**var_field** | **str** | Identifies the field that triggered this particular error. | [optional] **message** | **str** | A short, human-readable summary of the error. | [optional] ## Example diff --git a/thousandeyes-sdk-credentials/pyproject.toml b/thousandeyes-sdk-credentials/pyproject.toml index 25c9c326..ada648b2 100644 --- a/thousandeyes-sdk-credentials/pyproject.toml +++ b/thousandeyes-sdk-credentials/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "thousandeyes-sdk-credentials" -version = "1.0.0" +dynamic = ["version"] authors = [ { name = "ThousandEyes API Team", email = "api-team@thousandeyes.com" } ] @@ -11,9 +11,12 @@ dependencies = [ "python-dateutil >=2.8.2", "pydantic >=2", "typing-extensions >=4.7.1", - "thousandeyes-sdk-client==1.0.0", + "thousandeyes-sdk-core", ] +[tool.setuptools.dynamic] +version = {attr = "thousandeyes_sdk.client.__version__"} + [project.optional-dependencies] test = [ "pytest~=7.1.3", diff --git a/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/__init__.py b/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/__init__.py index 20727c91..447261d6 100644 --- a/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/__init__.py +++ b/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/__init__.py @@ -7,15 +7,13 @@ Manage credentials for transaction tests using the Credentials API. The following permissions are required to access Credentials API endpoints: * `Settings Tests Read` for read operations. * `Settings Tests Update` for write operations. * `View sensitive data in web transaction scripts` to view the encrypted value property of credentials. * `Settings Tests Create Transaction (Tx) Tests` to create credentials. For more information about credentials, see [Working With Secure Credentials](https://docs.thousandeyes.com/product-documentation/browser-synthetics/transaction-tests/getting-started/working-with-secure-credentials). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 -__version__ = "1.0.0" - # import apis into sdk package from thousandeyes_sdk.credentials.api.credentials_api import CredentialsApi diff --git a/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/api/credentials_api.py b/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/api/credentials_api.py index 7eaff53d..f9ca9357 100644 --- a/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/api/credentials_api.py +++ b/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/api/credentials_api.py @@ -5,7 +5,7 @@ Manage credentials for transaction tests using the Credentials API. The following permissions are required to access Credentials API endpoints: * `Settings Tests Read` for read operations. * `Settings Tests Update` for write operations. * `View sensitive data in web transaction scripts` to view the encrypted value property of credentials. * `Settings Tests Create Transaction (Tx) Tests` to create credentials. For more information about credentials, see [Working With Secure Credentials](https://docs.thousandeyes.com/product-documentation/browser-synthetics/transaction-tests/getting-started/working-with-secure-credentials). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -29,6 +29,7 @@ from thousandeyes_sdk.credentials.models.credentials import Credentials from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class CredentialsApi: @@ -41,11 +42,12 @@ class CredentialsApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @validate_call - def create_transaction_tests_credential( + def create_credential( self, credential_request: CredentialRequest, 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, @@ -92,7 +94,7 @@ class CredentialsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._create_transaction_tests_credential_serialize( + _param = self._create_credential_serialize( credential_request=credential_request, aid=aid, _request_auth=_request_auth, @@ -123,7 +125,7 @@ class CredentialsApi: @validate_call - def create_transaction_tests_credential_with_http_info( + def create_credential_with_http_info( self, credential_request: CredentialRequest, 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, @@ -170,7 +172,7 @@ class CredentialsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._create_transaction_tests_credential_serialize( + _param = self._create_credential_serialize( credential_request=credential_request, aid=aid, _request_auth=_request_auth, @@ -201,7 +203,7 @@ class CredentialsApi: @validate_call - def create_transaction_tests_credential_without_preload_content( + def create_credential_without_preload_content( self, credential_request: CredentialRequest, 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, @@ -248,7 +250,7 @@ class CredentialsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._create_transaction_tests_credential_serialize( + _param = self._create_credential_serialize( credential_request=credential_request, aid=aid, _request_auth=_request_auth, @@ -273,7 +275,7 @@ class CredentialsApi: return response_data.response - def _create_transaction_tests_credential_serialize( + def _create_credential_serialize( self, credential_request, aid, @@ -312,6 +314,7 @@ class CredentialsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -354,7 +357,7 @@ class CredentialsApi: @validate_call - def delete_transaction_tests_credential( + def delete_credential( self, id: Annotated[StrictStr, Field(description="The ID of the desired credential.")], 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, @@ -401,7 +404,7 @@ class CredentialsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._delete_transaction_tests_credential_serialize( + _param = self._delete_credential_serialize( id=id, aid=aid, _request_auth=_request_auth, @@ -431,7 +434,7 @@ class CredentialsApi: @validate_call - def delete_transaction_tests_credential_with_http_info( + def delete_credential_with_http_info( self, id: Annotated[StrictStr, Field(description="The ID of the desired credential.")], 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, @@ -478,7 +481,7 @@ class CredentialsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._delete_transaction_tests_credential_serialize( + _param = self._delete_credential_serialize( id=id, aid=aid, _request_auth=_request_auth, @@ -508,7 +511,7 @@ class CredentialsApi: @validate_call - def delete_transaction_tests_credential_without_preload_content( + def delete_credential_without_preload_content( self, id: Annotated[StrictStr, Field(description="The ID of the desired credential.")], 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, @@ -555,7 +558,7 @@ class CredentialsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._delete_transaction_tests_credential_serialize( + _param = self._delete_credential_serialize( id=id, aid=aid, _request_auth=_request_auth, @@ -579,7 +582,7 @@ class CredentialsApi: return response_data.response - def _delete_transaction_tests_credential_serialize( + def _delete_credential_serialize( self, id, aid, @@ -617,6 +620,7 @@ class CredentialsApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ + 'application/json', 'application/problem+json' ] ) @@ -646,7 +650,7 @@ class CredentialsApi: @validate_call - def get_transaction_tests_credential_details( + def get_credential( self, id: Annotated[StrictStr, Field(description="The ID of the desired credential.")], 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, @@ -693,7 +697,7 @@ class CredentialsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_transaction_tests_credential_details_serialize( + _param = self._get_credential_serialize( id=id, aid=aid, _request_auth=_request_auth, @@ -724,7 +728,7 @@ class CredentialsApi: @validate_call - def get_transaction_tests_credential_details_with_http_info( + def get_credential_with_http_info( self, id: Annotated[StrictStr, Field(description="The ID of the desired credential.")], 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, @@ -771,7 +775,7 @@ class CredentialsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_transaction_tests_credential_details_serialize( + _param = self._get_credential_serialize( id=id, aid=aid, _request_auth=_request_auth, @@ -802,7 +806,7 @@ class CredentialsApi: @validate_call - def get_transaction_tests_credential_details_without_preload_content( + def get_credential_without_preload_content( self, id: Annotated[StrictStr, Field(description="The ID of the desired credential.")], 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, @@ -849,7 +853,7 @@ class CredentialsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_transaction_tests_credential_details_serialize( + _param = self._get_credential_serialize( id=id, aid=aid, _request_auth=_request_auth, @@ -874,7 +878,7 @@ class CredentialsApi: return response_data.response - def _get_transaction_tests_credential_details_serialize( + def _get_credential_serialize( self, id, aid, @@ -913,6 +917,7 @@ class CredentialsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -942,7 +947,7 @@ class CredentialsApi: @validate_call - def get_transaction_tests_credentials_list( + def get_credentials( 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[ @@ -986,7 +991,7 @@ class CredentialsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_transaction_tests_credentials_list_serialize( + _param = self._get_credentials_serialize( aid=aid, _request_auth=_request_auth, _content_type=_content_type, @@ -1015,7 +1020,7 @@ class CredentialsApi: @validate_call - def get_transaction_tests_credentials_list_with_http_info( + def get_credentials_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[ @@ -1059,7 +1064,7 @@ class CredentialsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_transaction_tests_credentials_list_serialize( + _param = self._get_credentials_serialize( aid=aid, _request_auth=_request_auth, _content_type=_content_type, @@ -1088,7 +1093,7 @@ class CredentialsApi: @validate_call - def get_transaction_tests_credentials_list_without_preload_content( + def get_credentials_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[ @@ -1132,7 +1137,7 @@ class CredentialsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_transaction_tests_credentials_list_serialize( + _param = self._get_credentials_serialize( aid=aid, _request_auth=_request_auth, _content_type=_content_type, @@ -1155,7 +1160,7 @@ class CredentialsApi: return response_data.response - def _get_transaction_tests_credentials_list_serialize( + def _get_credentials_serialize( self, aid, _request_auth, @@ -1191,6 +1196,7 @@ class CredentialsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1220,7 +1226,7 @@ class CredentialsApi: @validate_call - def update_transaction_tests_credential( + def update_credential( self, id: Annotated[StrictStr, Field(description="The ID of the desired credential.")], credential_request: CredentialRequest, @@ -1270,7 +1276,7 @@ class CredentialsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._update_transaction_tests_credential_serialize( + _param = self._update_credential_serialize( id=id, credential_request=credential_request, aid=aid, @@ -1302,7 +1308,7 @@ class CredentialsApi: @validate_call - def update_transaction_tests_credential_with_http_info( + def update_credential_with_http_info( self, id: Annotated[StrictStr, Field(description="The ID of the desired credential.")], credential_request: CredentialRequest, @@ -1352,7 +1358,7 @@ class CredentialsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._update_transaction_tests_credential_serialize( + _param = self._update_credential_serialize( id=id, credential_request=credential_request, aid=aid, @@ -1384,7 +1390,7 @@ class CredentialsApi: @validate_call - def update_transaction_tests_credential_without_preload_content( + def update_credential_without_preload_content( self, id: Annotated[StrictStr, Field(description="The ID of the desired credential.")], credential_request: CredentialRequest, @@ -1434,7 +1440,7 @@ class CredentialsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._update_transaction_tests_credential_serialize( + _param = self._update_credential_serialize( id=id, credential_request=credential_request, aid=aid, @@ -1460,7 +1466,7 @@ class CredentialsApi: return response_data.response - def _update_transaction_tests_credential_serialize( + def _update_credential_serialize( self, id, credential_request, @@ -1502,6 +1508,7 @@ class CredentialsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/models/__init__.py b/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/models/__init__.py index d04cc05d..aaf6d5fa 100644 --- a/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/models/__init__.py +++ b/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/models/__init__.py @@ -6,7 +6,7 @@ Manage credentials for transaction tests using the Credentials API. The following permissions are required to access Credentials API endpoints: * `Settings Tests Read` for read operations. * `Settings Tests Update` for write operations. * `View sensitive data in web transaction scripts` to view the encrypted value property of credentials. * `Settings Tests Create Transaction (Tx) Tests` to create credentials. For more information about credentials, see [Working With Secure Credentials](https://docs.thousandeyes.com/product-documentation/browser-synthetics/transaction-tests/getting-started/working-with-secure-credentials). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/models/credential.py b/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/models/credential.py index 4b4a2a19..2e8d686d 100644 --- a/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/models/credential.py +++ b/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/models/credential.py @@ -5,7 +5,7 @@ Manage credentials for transaction tests using the Credentials API. The following permissions are required to access Credentials API endpoints: * `Settings Tests Read` for read operations. * `Settings Tests Update` for write operations. * `View sensitive data in web transaction scripts` to view the encrypted value property of credentials. * `Settings Tests Create Transaction (Tx) Tests` to create credentials. For more information about credentials, see [Working With Secure Credentials](https://docs.thousandeyes.com/product-documentation/browser-synthetics/transaction-tests/getting-started/working-with-secure-credentials). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -37,6 +37,7 @@ class Credential(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -47,7 +48,7 @@ class Credential(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/models/credential_request.py b/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/models/credential_request.py index 43fffd8d..7178b872 100644 --- a/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/models/credential_request.py +++ b/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/models/credential_request.py @@ -5,7 +5,7 @@ Manage credentials for transaction tests using the Credentials API. The following permissions are required to access Credentials API endpoints: * `Settings Tests Read` for read operations. * `Settings Tests Update` for write operations. * `View sensitive data in web transaction scripts` to view the encrypted value property of credentials. * `Settings Tests Create Transaction (Tx) Tests` to create credentials. For more information about credentials, see [Working With Secure Credentials](https://docs.thousandeyes.com/product-documentation/browser-synthetics/transaction-tests/getting-started/working-with-secure-credentials). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class CredentialRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class CredentialRequest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/models/credential_without_value.py b/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/models/credential_without_value.py index aa3f94ac..7ae33451 100644 --- a/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/models/credential_without_value.py +++ b/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/models/credential_without_value.py @@ -5,7 +5,7 @@ Manage credentials for transaction tests using the Credentials API. The following permissions are required to access Credentials API endpoints: * `Settings Tests Read` for read operations. * `Settings Tests Update` for write operations. * `View sensitive data in web transaction scripts` to view the encrypted value property of credentials. * `Settings Tests Create Transaction (Tx) Tests` to create credentials. For more information about credentials, see [Working With Secure Credentials](https://docs.thousandeyes.com/product-documentation/browser-synthetics/transaction-tests/getting-started/working-with-secure-credentials). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class CredentialWithoutValue(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class CredentialWithoutValue(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/models/credentials.py b/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/models/credentials.py index 114e0d32..1f06c427 100644 --- a/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/models/credentials.py +++ b/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/models/credentials.py @@ -5,7 +5,7 @@ Manage credentials for transaction tests using the Credentials API. The following permissions are required to access Credentials API endpoints: * `Settings Tests Read` for read operations. * `Settings Tests Update` for write operations. * `View sensitive data in web transaction scripts` to view the encrypted value property of credentials. * `Settings Tests Create Transaction (Tx) Tests` to create credentials. For more information about credentials, see [Working With Secure Credentials](https://docs.thousandeyes.com/product-documentation/browser-synthetics/transaction-tests/getting-started/working-with-secure-credentials). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class Credentials(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class Credentials(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/models/error.py b/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/models/error.py index 0396a01c..2c0d409b 100644 --- a/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/models/error.py +++ b/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/models/error.py @@ -5,7 +5,7 @@ Manage credentials for transaction tests using the Credentials API. The following permissions are required to access Credentials API endpoints: * `Settings Tests Read` for read operations. * `Settings Tests Update` for write operations. * `View sensitive data in web transaction scripts` to view the encrypted value property of credentials. * `Settings Tests Create Transaction (Tx) Tests` to create credentials. For more information about credentials, see [Working With Secure Credentials](https://docs.thousandeyes.com/product-documentation/browser-synthetics/transaction-tests/getting-started/working-with-secure-credentials). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -37,6 +37,7 @@ class Error(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -47,7 +48,7 @@ class Error(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/models/link.py b/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/models/link.py index 0e5f97b2..2dee1023 100644 --- a/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/models/link.py +++ b/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/models/link.py @@ -5,7 +5,7 @@ Manage credentials for transaction tests using the Credentials API. The following permissions are required to access Credentials API endpoints: * `Settings Tests Read` for read operations. * `Settings Tests Update` for write operations. * `View sensitive data in web transaction scripts` to view the encrypted value property of credentials. * `Settings Tests Create Transaction (Tx) Tests` to create credentials. For more information about credentials, see [Working With Secure Credentials](https://docs.thousandeyes.com/product-documentation/browser-synthetics/transaction-tests/getting-started/working-with-secure-credentials). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -40,6 +40,7 @@ class Link(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -50,7 +51,7 @@ class Link(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/models/self_links.py b/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/models/self_links.py index f43a4597..d501a41e 100644 --- a/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/models/self_links.py +++ b/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/models/self_links.py @@ -5,7 +5,7 @@ Manage credentials for transaction tests using the Credentials API. The following permissions are required to access Credentials API endpoints: * `Settings Tests Read` for read operations. * `Settings Tests Update` for write operations. * `View sensitive data in web transaction scripts` to view the encrypted value property of credentials. * `Settings Tests Create Transaction (Tx) Tests` to create credentials. For more information about credentials, see [Working With Secure Credentials](https://docs.thousandeyes.com/product-documentation/browser-synthetics/transaction-tests/getting-started/working-with-secure-credentials). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class SelfLinks(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class SelfLinks(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/models/unauthorized_error.py b/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/models/unauthorized_error.py index 14ced7e4..b706ad99 100644 --- a/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/models/unauthorized_error.py +++ b/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/models/unauthorized_error.py @@ -5,7 +5,7 @@ Manage credentials for transaction tests using the Credentials API. The following permissions are required to access Credentials API endpoints: * `Settings Tests Read` for read operations. * `Settings Tests Update` for write operations. * `View sensitive data in web transaction scripts` to view the encrypted value property of credentials. * `Settings Tests Create Transaction (Tx) Tests` to create credentials. For more information about credentials, see [Working With Secure Credentials](https://docs.thousandeyes.com/product-documentation/browser-synthetics/transaction-tests/getting-started/working-with-secure-credentials). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class UnauthorizedError(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class UnauthorizedError(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/models/validation_error.py b/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/models/validation_error.py index 27ede1ed..d0fdd99f 100644 --- a/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/models/validation_error.py +++ b/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/models/validation_error.py @@ -5,7 +5,7 @@ Manage credentials for transaction tests using the Credentials API. The following permissions are required to access Credentials API endpoints: * `Settings Tests Read` for read operations. * `Settings Tests Update` for write operations. * `View sensitive data in web transaction scripts` to view the encrypted value property of credentials. * `Settings Tests Create Transaction (Tx) Tests` to create credentials. For more information about credentials, see [Working With Secure Credentials](https://docs.thousandeyes.com/product-documentation/browser-synthetics/transaction-tests/getting-started/working-with-secure-credentials). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -39,6 +39,7 @@ class ValidationError(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -49,7 +50,7 @@ class ValidationError(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/models/validation_error_item.py b/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/models/validation_error_item.py index 32ba0cb6..4a43798c 100644 --- a/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/models/validation_error_item.py +++ b/thousandeyes-sdk-credentials/src/thousandeyes_sdk/credentials/models/validation_error_item.py @@ -5,7 +5,7 @@ Manage credentials for transaction tests using the Credentials API. The following permissions are required to access Credentials API endpoints: * `Settings Tests Read` for read operations. * `Settings Tests Update` for write operations. * `View sensitive data in web transaction scripts` to view the encrypted value property of credentials. * `Settings Tests Create Transaction (Tx) Tests` to create credentials. For more information about credentials, see [Working With Secure Credentials](https://docs.thousandeyes.com/product-documentation/browser-synthetics/transaction-tests/getting-started/working-with-secure-credentials). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,7 +17,7 @@ import pprint import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +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 @@ -27,7 +27,7 @@ class ValidationErrorItem(BaseModel): ValidationErrorItem """ # noqa: E501 code: Optional[StrictStr] = Field(default=None, description="(Optional) A unique error type/code that can be referenced in the documentation for further details.") - var_field: Optional[StrictInt] = Field(default=None, description="Identifies the field that triggered this particular error.", alias="field") + var_field: Optional[StrictStr] = Field(default=None, description="Identifies the field that triggered this particular error.", alias="field") message: Optional[StrictStr] = Field(default=None, description="A short, human-readable summary of the error.") __properties: ClassVar[List[str]] = ["code", "field", "message"] @@ -35,6 +35,7 @@ class ValidationErrorItem(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class ValidationErrorItem(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-credentials/test/test_credentials_api.py b/thousandeyes-sdk-credentials/test/test_credentials_api.py new file mode 100644 index 00000000..5e55160e --- /dev/null +++ b/thousandeyes-sdk-credentials/test/test_credentials_api.py @@ -0,0 +1,188 @@ +# coding: utf-8 + +""" + Credentials API + + Manage credentials for transaction tests using the Credentials API. The following permissions are required to access Credentials API endpoints: * `Settings Tests Read` for read operations. * `Settings Tests Update` for write operations. * `View sensitive data in web transaction scripts` to view the encrypted value property of credentials. * `Settings Tests Create Transaction (Tx) Tests` to create credentials. For more information about credentials, see [Working With Secure Credentials](https://docs.thousandeyes.com/product-documentation/browser-synthetics/transaction-tests/getting-started/working-with-secure-credentials). + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.credentials.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.credentials.api.credentials_api import CredentialsApi + + +class TestCredentialsApi(unittest.TestCase): + """CredentialsApi unit test stubs""" + + def setUp(self) -> None: + self.api = CredentialsApi() + + def tearDown(self) -> None: + pass + + def test_create_credential_models_validation(self) -> None: + """Test case for create_credential request and response models""" + request_body_json = """ + { + "name" : "Example Credential 1", + "value" : "Example Credential 1 Password" + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.credentials.models.CredentialRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "name" : "Example Credential", + "id" : "3247" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.credentials.models.CredentialWithoutValue.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_delete_credential_models_validation(self) -> None: + """Test case for delete_credential request and response models""" + + + def test_get_credential_models_validation(self) -> None: + """Test case for get_credential request and response models""" + + response_body_json = """ + { + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "name" : "Example Credential", + "id" : "3247", + "value" : "rwhR12uDm1Im47p5IVXgzz4ORgC7m48ajzzeWVUt" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.credentials.models.Credential.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_credentials_models_validation(self) -> None: + """Test case for get_credentials request and response models""" + + response_body_json = """ + { + "credentials" : [ { + "_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" + } + }, + "name" : "Example Credential", + "id" : "3247", + "value" : "rwhR12uDm1Im47p5IVXgzz4ORgC7m48ajzzeWVUt" + }, { + "_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" + } + }, + "name" : "Example Credential", + "id" : "3247", + "value" : "rwhR12uDm1Im47p5IVXgzz4ORgC7m48ajzzeWVUt" + } ], + "_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" + } + } + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.credentials.models.Credentials.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_update_credential_models_validation(self) -> None: + """Test case for update_credential request and response models""" + request_body_json = """ + { + "name" : "Example Credential 1", + "value" : "Example Credential 1 Password" + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.credentials.models.CredentialRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "name" : "Example Credential", + "id" : "3247" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.credentials.models.CredentialWithoutValue.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-credentials/test/test_utils.py b/thousandeyes-sdk-credentials/test/test_utils.py new file mode 100644 index 00000000..930528d9 --- /dev/null +++ b/thousandeyes-sdk-credentials/test/test_utils.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +import json +import unittest + +from pydantic import BaseModel + + +def assert_constructed_model_matches_example_json(model: BaseModel, loaded_json: dict): + test_case = unittest.TestCase() + test_case.maxDiff = None + test_case.assertIsNotNone(model) + constructed_json = json.loads(model.to_json()) + sorted_loaded_json = json.dumps(loaded_json, sort_keys=True) + sorted_constructed_json = json.dumps(constructed_json, sort_keys=True) + test_case.assertEqual(sorted_loaded_json, sorted_constructed_json) diff --git a/thousandeyes-sdk-dashboards/.openapi-generator/FILES b/thousandeyes-sdk-dashboards/.openapi-generator/FILES index f6083230..6932e3fa 100644 --- a/thousandeyes-sdk-dashboards/.openapi-generator/FILES +++ b/thousandeyes-sdk-dashboards/.openapi-generator/FILES @@ -237,115 +237,7 @@ src/thousandeyes_sdk/dashboards/models/widget_measure_type.py src/thousandeyes_sdk/dashboards/models/widget_type.py src/thousandeyes_sdk/dashboards/py.typed test/__init__.py -test/test_active_within.py -test/test_agent_status_datasource.py -test/test_alert_list_alert_type.py -test/test_alert_list_datasource.py -test/test_api_agent_location.py -test/test_api_agent_status_agent.py -test/test_api_agent_status_ip_info.py -test/test_api_agent_status_summary.py -test/test_api_agent_status_widget.py -test/test_api_agent_widget_show.py -test/test_api_agent_widget_type.py -test/test_api_aggregate_property.py -test/test_api_alert_list_alert.py -test/test_api_alert_list_widget.py -test/test_api_box_and_whiskers_widget.py -test/test_api_color_grid_widget.py -test/test_api_context_filter_request.py -test/test_api_context_filter_response.py -test/test_api_context_filters_response.py -test/test_api_dashboard.py -test/test_api_dashboard_asw.py -test/test_api_dashboard_filter_user_details.py -test/test_api_dashboard_snapshot.py -test/test_api_data_point_group.py -test/test_api_data_source_filter.py -test/test_api_data_source_filters.py -test/test_api_default_timespan.py -test/test_api_duration.py -test/test_api_duration_unit.py -test/test_api_geo_map_widget.py -test/test_api_graphlet_point.py -test/test_api_grouped_barchart_widget.py -test/test_api_multi_metric_column.py -test/test_api_multi_metric_column_data.py -test/test_api_multi_metric_table_widget.py -test/test_api_multi_search_filter_api_test_table_filter_key.py -test/test_api_numbers_card.py -test/test_api_numbers_card_data.py -test/test_api_numbers_card_widget.py -test/test_api_pie_chart_widget.py -test/test_api_report_data_component_label_map.py -test/test_api_report_data_component_label_map_entry.py -test/test_api_report_snapshot_time_span.py -test/test_api_stacked_area_chart_widget.py -test/test_api_stacked_barchart_widget.py -test/test_api_table_widget.py -test/test_api_test_table_data.py -test/test_api_test_table_graphlets_data.py -test/test_api_test_table_widget.py -test/test_api_timeseries_widget.py -test/test_api_widget.py -test/test_api_widget_data.py -test/test_api_widget_data_point.py -test/test_api_widget_data_response.py -test/test_api_widget_data_snapshot_response.py -test/test_api_widget_filter_api_test_table_filter_key.py -test/test_api_widget_fixed_y_scale_prefix.py -test/test_api_widget_measure.py -test/test_api_widget_sort_direction.py -test/test_api_widget_sort_property.py -test/test_api_widgets_data_v2.py -test/test_app_and_self_links.py -test/test_asw_repeat.py -test/test_asw_repeat_unit.py -test/test_box_and_whiskers_datasource.py -test/test_color_grid_datasource.py -test/test_dashboard.py -test/test_dashboard_global_filter_id.py -test/test_dashboard_links.py -test/test_dashboard_metric.py -test/test_dashboard_metric_direction.py -test/test_dashboard_order.py -test/test_dashboard_snapshot_response.py -test/test_dashboard_snapshots_page.py -test/test_default_timespan.py -test/test_enterprise_agent_state.py -test/test_error.py -test/test_generate_dashboard_snapshot_request.py -test/test_geo_map_datasource.py -test/test_grouped_bar_chart_datasource.py -test/test_legacy_agent_widget_show.py -test/test_legacy_agent_widget_type.py -test/test_legacy_alert_list_alert_type.py -test/test_legacy_api_dashboard.py -test/test_legacy_dashboard_snapshot.py -test/test_legacy_default_timespan.py -test/test_legacy_duration_unit.py -test/test_legacy_widget_sort_direction.py -test/test_legacy_widget_sort_property.py -test/test_link.py -test/test_metric_group.py -test/test_multi_metrics_table_datasource.py -test/test_numbers_card_datasource.py -test/test_pagination_links.py -test/test_pie_chart_datasource.py -test/test_scalable_widget.py -test/test_self_links.py -test/test_stacked_area_chart_datasource.py -test/test_stacked_bar_chart_datasource.py -test/test_table_datasource.py -test/test_test_table_datasource.py -test/test_test_table_filter_key.py -test/test_test_table_filter_type.py -test/test_timeseries_datasource.py -test/test_unauthorized_error.py -test/test_update_snapshot_expiration_date_api_request.py -test/test_validation_error.py -test/test_validation_error_item.py -test/test_visual_mode.py -test/test_widget.py -test/test_widget_measure_type.py -test/test_widget_type.py +test/test_dashboard_snapshots_api.py +test/test_dashboards_api.py +test/test_dashboards_filters_api.py +test/test_utils.py diff --git a/thousandeyes-sdk-dashboards/README.md b/thousandeyes-sdk-dashboards/README.md index df0d95dd..5dd9c17e 100644 --- a/thousandeyes-sdk-dashboards/README.md +++ b/thousandeyes-sdk-dashboards/README.md @@ -3,8 +3,7 @@ Manage ThousandEyes Dashboards. This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.4 -- Package version: 1.0.0 +- API version: 7.0.6 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator @@ -18,9 +17,9 @@ Python 3.7+ If the python package is hosted on a repository, you can install directly using: ```sh -pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +pip install -e git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git#egg=thousandeyes-sdk-dashboards\&subdirectory=thousandeyes-sdk-dashboards ``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) +(you may need to run `pip` with root permission: `sudo pip install -e git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git#egg=thousandeyes-sdk-dashboards\&subdirectory=thousandeyes-sdk-dashboards`) Then import the package: ```python @@ -97,22 +96,22 @@ All URIs are relative to *https://api.thousandeyes.com* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *DashboardSnapshotsApi* | [**create_dashboard_snapshot**](docs/DashboardSnapshotsApi.md#create_dashboard_snapshot) | **POST** /v7/dashboard-snapshots | Create dashboard snapshot -*DashboardSnapshotsApi* | [**dashboard_snapshot_by_id**](docs/DashboardSnapshotsApi.md#dashboard_snapshot_by_id) | **GET** /v7/dashboard-snapshots/{snapshotId} | Retrieve dashboard snapshot -*DashboardSnapshotsApi* | [**dashboard_snapshots**](docs/DashboardSnapshotsApi.md#dashboard_snapshots) | **GET** /v7/dashboard-snapshots | List dashboard snapshots *DashboardSnapshotsApi* | [**delete_dashboard_snapshot**](docs/DashboardSnapshotsApi.md#delete_dashboard_snapshot) | **DELETE** /v7/dashboard-snapshots/{snapshotId} | Delete dashboard snapshot -*DashboardSnapshotsApi* | [**snapshot_data_by_widget**](docs/DashboardSnapshotsApi.md#snapshot_data_by_widget) | **GET** /v7/dashboard-snapshots/{snapshotId}/widgets/{widgetId} | Retrieve dashboard snapshot data -*DashboardSnapshotsApi* | [**update_snapshot_expiration_date**](docs/DashboardSnapshotsApi.md#update_snapshot_expiration_date) | **PATCH** /v7/dashboard-snapshots/{snapshotId} | Update snapshot expiration +*DashboardSnapshotsApi* | [**get_dashboard_snapshot**](docs/DashboardSnapshotsApi.md#get_dashboard_snapshot) | **GET** /v7/dashboard-snapshots/{snapshotId} | Retrieve dashboard snapshot +*DashboardSnapshotsApi* | [**get_dashboard_snapshot_widget_data**](docs/DashboardSnapshotsApi.md#get_dashboard_snapshot_widget_data) | **GET** /v7/dashboard-snapshots/{snapshotId}/widgets/{widgetId} | Retrieve dashboard snapshot data +*DashboardSnapshotsApi* | [**get_dashboard_snapshots**](docs/DashboardSnapshotsApi.md#get_dashboard_snapshots) | **GET** /v7/dashboard-snapshots | List dashboard snapshots +*DashboardSnapshotsApi* | [**update_dashboard_snapshot_expiration_date**](docs/DashboardSnapshotsApi.md#update_dashboard_snapshot_expiration_date) | **PATCH** /v7/dashboard-snapshots/{snapshotId} | Update snapshot expiration *DashboardsApi* | [**create_dashboard**](docs/DashboardsApi.md#create_dashboard) | **POST** /v7/dashboards | Create dashboard *DashboardsApi* | [**delete_dashboard**](docs/DashboardsApi.md#delete_dashboard) | **DELETE** /v7/dashboards/{dashboardId} | Delete dashboard -*DashboardsApi* | [**get_dashboard_by_id**](docs/DashboardsApi.md#get_dashboard_by_id) | **GET** /v7/dashboards/{dashboardId} | Retrieve dashboard -*DashboardsApi* | [**get_dashboard_data**](docs/DashboardsApi.md#get_dashboard_data) | **GET** /v7/dashboards/{dashboardId}/widgets/{widgetId} | Retrieve dashboard widget data -*DashboardsApi* | [**get_dashboards_for_user**](docs/DashboardsApi.md#get_dashboards_for_user) | **GET** /v7/dashboards | List dashboards +*DashboardsApi* | [**get_dashboard**](docs/DashboardsApi.md#get_dashboard) | **GET** /v7/dashboards/{dashboardId} | Retrieve dashboard +*DashboardsApi* | [**get_dashboard_widget_data**](docs/DashboardsApi.md#get_dashboard_widget_data) | **GET** /v7/dashboards/{dashboardId}/widgets/{widgetId} | Retrieve dashboard widget data +*DashboardsApi* | [**get_dashboards**](docs/DashboardsApi.md#get_dashboards) | **GET** /v7/dashboards | List dashboards *DashboardsApi* | [**update_dashboard**](docs/DashboardsApi.md#update_dashboard) | **PUT** /v7/dashboards/{dashboardId} | Update dashboard *DashboardsFiltersApi* | [**create_dashboard_filter**](docs/DashboardsFiltersApi.md#create_dashboard_filter) | **POST** /v7/dashboards/filters | Create dashboard filter -*DashboardsFiltersApi* | [**delete_dashboard_filter_by_id**](docs/DashboardsFiltersApi.md#delete_dashboard_filter_by_id) | **DELETE** /v7/dashboards/filters/{id} | Delete dashboard filter -*DashboardsFiltersApi* | [**get_all_dashboard_filters**](docs/DashboardsFiltersApi.md#get_all_dashboard_filters) | **GET** /v7/dashboards/filters | List dashboard filters -*DashboardsFiltersApi* | [**get_dashboard_filter_by_id**](docs/DashboardsFiltersApi.md#get_dashboard_filter_by_id) | **GET** /v7/dashboards/filters/{id} | Get dashboard filter -*DashboardsFiltersApi* | [**update_dashboard_filter_by_id**](docs/DashboardsFiltersApi.md#update_dashboard_filter_by_id) | **PUT** /v7/dashboards/filters/{id} | Update dashboard filter +*DashboardsFiltersApi* | [**delete_dashboard_filter**](docs/DashboardsFiltersApi.md#delete_dashboard_filter) | **DELETE** /v7/dashboards/filters/{id} | Delete dashboard filter +*DashboardsFiltersApi* | [**get_dashboard_filter**](docs/DashboardsFiltersApi.md#get_dashboard_filter) | **GET** /v7/dashboards/filters/{id} | Get dashboard filter +*DashboardsFiltersApi* | [**get_dashboards_filters**](docs/DashboardsFiltersApi.md#get_dashboards_filters) | **GET** /v7/dashboards/filters | List dashboard filters +*DashboardsFiltersApi* | [**update_dashboard_filter**](docs/DashboardsFiltersApi.md#update_dashboard_filter) | **PUT** /v7/dashboards/filters/{id} | Update dashboard filter ## Documentation For Models diff --git a/thousandeyes-sdk-dashboards/docs/DashboardSnapshotsApi.md b/thousandeyes-sdk-dashboards/docs/DashboardSnapshotsApi.md index 72326fee..83210085 100644 --- a/thousandeyes-sdk-dashboards/docs/DashboardSnapshotsApi.md +++ b/thousandeyes-sdk-dashboards/docs/DashboardSnapshotsApi.md @@ -5,11 +5,11 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- [**create_dashboard_snapshot**](DashboardSnapshotsApi.md#create_dashboard_snapshot) | **POST** /v7/dashboard-snapshots | Create dashboard snapshot -[**dashboard_snapshot_by_id**](DashboardSnapshotsApi.md#dashboard_snapshot_by_id) | **GET** /v7/dashboard-snapshots/{snapshotId} | Retrieve dashboard snapshot -[**dashboard_snapshots**](DashboardSnapshotsApi.md#dashboard_snapshots) | **GET** /v7/dashboard-snapshots | List dashboard snapshots [**delete_dashboard_snapshot**](DashboardSnapshotsApi.md#delete_dashboard_snapshot) | **DELETE** /v7/dashboard-snapshots/{snapshotId} | Delete dashboard snapshot -[**snapshot_data_by_widget**](DashboardSnapshotsApi.md#snapshot_data_by_widget) | **GET** /v7/dashboard-snapshots/{snapshotId}/widgets/{widgetId} | Retrieve dashboard snapshot data -[**update_snapshot_expiration_date**](DashboardSnapshotsApi.md#update_snapshot_expiration_date) | **PATCH** /v7/dashboard-snapshots/{snapshotId} | Update snapshot expiration +[**get_dashboard_snapshot**](DashboardSnapshotsApi.md#get_dashboard_snapshot) | **GET** /v7/dashboard-snapshots/{snapshotId} | Retrieve dashboard snapshot +[**get_dashboard_snapshot_widget_data**](DashboardSnapshotsApi.md#get_dashboard_snapshot_widget_data) | **GET** /v7/dashboard-snapshots/{snapshotId}/widgets/{widgetId} | Retrieve dashboard snapshot data +[**get_dashboard_snapshots**](DashboardSnapshotsApi.md#get_dashboard_snapshots) | **GET** /v7/dashboard-snapshots | List dashboard snapshots +[**update_dashboard_snapshot_expiration_date**](DashboardSnapshotsApi.md#update_dashboard_snapshot_expiration_date) | **PATCH** /v7/dashboard-snapshots/{snapshotId} | Update snapshot expiration # **create_dashboard_snapshot** @@ -83,7 +83,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -99,180 +99,6 @@ 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) -# **dashboard_snapshot_by_id** -> ApiDashboardSnapshot dashboard_snapshot_by_id(snapshot_id, aid=aid) - -Retrieve dashboard snapshot - -This endpoint returns a list of widgets configured in dashboard snapshot configured in ThousandEyes. Seed this endpoint with a snapshotId found from the /dashboard-snapshots endpoint. This endpoint requires the `View Snapshots` permission be assigned to the role of the user accessing this endpoint. Returns a list of widgets configured within a dashboard snapshot. Use the `snapshotId` obtained from the `/dashboard-snapshots` endpoint. The `View Snapshots` permission is required to use this endpoint.\" - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import thousandeyes_sdk.dashboards -from thousandeyes_sdk.dashboards.models.api_dashboard_snapshot import ApiDashboardSnapshot -from thousandeyes_sdk.dashboards.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.thousandeyes.com -# See configuration.py for a list of all supported configuration parameters. -configuration = thousandeyes_sdk.client.Configuration( - host = "https://api.thousandeyes.com" -) - -# 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.client.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with thousandeyes_sdk.dashboards.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = thousandeyes_sdk.dashboards.DashboardSnapshotsApi(api_client) - snapshot_id = 'd28bb71f-5a47-4783-8f12-d4b115e61b0c' # str | A Identifier for a dashboard snapshot which can be obtained from the `/dashboards-snapshots` 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: - # Retrieve dashboard snapshot - api_response = api_instance.dashboard_snapshot_by_id(snapshot_id, aid=aid) - print("The response of DashboardSnapshotsApi->dashboard_snapshot_by_id:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DashboardSnapshotsApi->dashboard_snapshot_by_id: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **snapshot_id** | **str**| A Identifier for a dashboard snapshot which can be obtained from the `/dashboards-snapshots` 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 - -[**ApiDashboardSnapshot**](ApiDashboardSnapshot.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/hal+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 | - | -**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) - -# **dashboard_snapshots** -> DashboardSnapshotsPage dashboard_snapshots(aid=aid, dashboard_id=dashboard_id, cursor=cursor) - -List dashboard snapshots - -Returns a list of dashboard snapshots within your account group. Use this data to identify a specific dashboard snapshot, which can be used in other endpoints to access aggregated data. The `View Snapshots` permission is required to use this endpoint.\" - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import thousandeyes_sdk.dashboards -from thousandeyes_sdk.dashboards.models.dashboard_snapshots_page import DashboardSnapshotsPage -from thousandeyes_sdk.dashboards.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.thousandeyes.com -# See configuration.py for a list of all supported configuration parameters. -configuration = thousandeyes_sdk.client.Configuration( - host = "https://api.thousandeyes.com" -) - -# 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.client.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with thousandeyes_sdk.dashboards.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = thousandeyes_sdk.dashboards.DashboardSnapshotsApi(api_client) - 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) - dashboard_id = '646f4d2ce3c99b0536c3821e' # str | (optional) - cursor = 'cursor_example' # str | (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. (optional) - - try: - # List dashboard snapshots - api_response = api_instance.dashboard_snapshots(aid=aid, dashboard_id=dashboard_id, cursor=cursor) - print("The response of DashboardSnapshotsApi->dashboard_snapshots:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DashboardSnapshotsApi->dashboard_snapshots: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **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] - **dashboard_id** | **str**| | [optional] - **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. | [optional] - -### Return type - -[**DashboardSnapshotsPage**](DashboardSnapshotsPage.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/hal+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 | - | -**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) - # **delete_dashboard_snapshot** > delete_dashboard_snapshot(snapshot_id, aid=aid) @@ -340,7 +166,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/problem+json + - **Accept**: application/json, application/problem+json ### HTTP response details @@ -356,8 +182,94 @@ 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) -# **snapshot_data_by_widget** -> ApiWidgetDataSnapshotResponse snapshot_data_by_widget(snapshot_id, widget_id, aid=aid) +# **get_dashboard_snapshot** +> ApiDashboardSnapshot get_dashboard_snapshot(snapshot_id, aid=aid) + +Retrieve dashboard snapshot + +This endpoint returns a list of widgets configured in dashboard snapshot configured in ThousandEyes. Seed this endpoint with a snapshotId found from the /dashboard-snapshots endpoint. This endpoint requires the `View Snapshots` permission be assigned to the role of the user accessing this endpoint. Returns a list of widgets configured within a dashboard snapshot. Use the `snapshotId` obtained from the `/dashboard-snapshots` endpoint. The `View Snapshots` permission is required to use this endpoint.\" + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.dashboards +from thousandeyes_sdk.dashboards.models.api_dashboard_snapshot import ApiDashboardSnapshot +from thousandeyes_sdk.dashboards.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.dashboards.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.dashboards.DashboardSnapshotsApi(api_client) + snapshot_id = 'd28bb71f-5a47-4783-8f12-d4b115e61b0c' # str | A Identifier for a dashboard snapshot which can be obtained from the `/dashboards-snapshots` 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: + # Retrieve dashboard snapshot + api_response = api_instance.get_dashboard_snapshot(snapshot_id, aid=aid) + print("The response of DashboardSnapshotsApi->get_dashboard_snapshot:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DashboardSnapshotsApi->get_dashboard_snapshot: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **snapshot_id** | **str**| A Identifier for a dashboard snapshot which can be obtained from the `/dashboards-snapshots` 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 + +[**ApiDashboardSnapshot**](ApiDashboardSnapshot.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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 | - | +**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_snapshot_widget_data** +> ApiWidgetDataSnapshotResponse get_dashboard_snapshot_widget_data(snapshot_id, widget_id, aid=aid) Retrieve dashboard snapshot data @@ -399,11 +311,11 @@ with thousandeyes_sdk.dashboards.ApiClient(configuration) as api_client: try: # Retrieve dashboard snapshot data - api_response = api_instance.snapshot_data_by_widget(snapshot_id, widget_id, aid=aid) - print("The response of DashboardSnapshotsApi->snapshot_data_by_widget:\n") + api_response = api_instance.get_dashboard_snapshot_widget_data(snapshot_id, widget_id, aid=aid) + print("The response of DashboardSnapshotsApi->get_dashboard_snapshot_widget_data:\n") pprint(api_response) except Exception as e: - print("Exception when calling DashboardSnapshotsApi->snapshot_data_by_widget: %s\n" % e) + print("Exception when calling DashboardSnapshotsApi->get_dashboard_snapshot_widget_data: %s\n" % e) ``` @@ -428,7 +340,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -444,8 +356,96 @@ 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_snapshot_expiration_date** -> update_snapshot_expiration_date(snapshot_id, update_snapshot_expiration_date_api_request, aid=aid) +# **get_dashboard_snapshots** +> DashboardSnapshotsPage get_dashboard_snapshots(aid=aid, dashboard_id=dashboard_id, cursor=cursor) + +List dashboard snapshots + +Returns a list of dashboard snapshots within your account group. Use this data to identify a specific dashboard snapshot, which can be used in other endpoints to access aggregated data. The `View Snapshots` permission is required to use this endpoint.\" + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.dashboards +from thousandeyes_sdk.dashboards.models.dashboard_snapshots_page import DashboardSnapshotsPage +from thousandeyes_sdk.dashboards.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.dashboards.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.dashboards.DashboardSnapshotsApi(api_client) + 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) + dashboard_id = '646f4d2ce3c99b0536c3821e' # str | (optional) + cursor = 'cursor_example' # str | (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. (optional) + + try: + # List dashboard snapshots + api_response = api_instance.get_dashboard_snapshots(aid=aid, dashboard_id=dashboard_id, cursor=cursor) + print("The response of DashboardSnapshotsApi->get_dashboard_snapshots:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DashboardSnapshotsApi->get_dashboard_snapshots: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **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] + **dashboard_id** | **str**| | [optional] + **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. | [optional] + +### Return type + +[**DashboardSnapshotsPage**](DashboardSnapshotsPage.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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 | - | +**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) + +# **update_dashboard_snapshot_expiration_date** +> update_dashboard_snapshot_expiration_date(snapshot_id, update_snapshot_expiration_date_api_request, aid=aid) Update snapshot expiration @@ -487,9 +487,9 @@ with thousandeyes_sdk.dashboards.ApiClient(configuration) as api_client: try: # Update snapshot expiration - api_instance.update_snapshot_expiration_date(snapshot_id, update_snapshot_expiration_date_api_request, aid=aid) + api_instance.update_dashboard_snapshot_expiration_date(snapshot_id, update_snapshot_expiration_date_api_request, aid=aid) except Exception as e: - print("Exception when calling DashboardSnapshotsApi->update_snapshot_expiration_date: %s\n" % e) + print("Exception when calling DashboardSnapshotsApi->update_dashboard_snapshot_expiration_date: %s\n" % e) ``` @@ -514,7 +514,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/problem+json + - **Accept**: application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-dashboards/docs/DashboardsApi.md b/thousandeyes-sdk-dashboards/docs/DashboardsApi.md index ae5d3450..97aa4c8b 100644 --- a/thousandeyes-sdk-dashboards/docs/DashboardsApi.md +++ b/thousandeyes-sdk-dashboards/docs/DashboardsApi.md @@ -6,9 +6,9 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**create_dashboard**](DashboardsApi.md#create_dashboard) | **POST** /v7/dashboards | Create dashboard [**delete_dashboard**](DashboardsApi.md#delete_dashboard) | **DELETE** /v7/dashboards/{dashboardId} | Delete dashboard -[**get_dashboard_by_id**](DashboardsApi.md#get_dashboard_by_id) | **GET** /v7/dashboards/{dashboardId} | Retrieve dashboard -[**get_dashboard_data**](DashboardsApi.md#get_dashboard_data) | **GET** /v7/dashboards/{dashboardId}/widgets/{widgetId} | Retrieve dashboard widget data -[**get_dashboards_for_user**](DashboardsApi.md#get_dashboards_for_user) | **GET** /v7/dashboards | List dashboards +[**get_dashboard**](DashboardsApi.md#get_dashboard) | **GET** /v7/dashboards/{dashboardId} | Retrieve dashboard +[**get_dashboard_widget_data**](DashboardsApi.md#get_dashboard_widget_data) | **GET** /v7/dashboards/{dashboardId}/widgets/{widgetId} | Retrieve dashboard widget data +[**get_dashboards**](DashboardsApi.md#get_dashboards) | **GET** /v7/dashboards | List dashboards [**update_dashboard**](DashboardsApi.md#update_dashboard) | **PUT** /v7/dashboards/{dashboardId} | Update dashboard @@ -82,7 +82,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -165,7 +165,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/problem+json + - **Accept**: application/json, application/problem+json ### HTTP response details @@ -181,8 +181,8 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_dashboard_by_id** -> ApiDashboard get_dashboard_by_id(dashboard_id, aid=aid) +# **get_dashboard** +> ApiDashboard get_dashboard(dashboard_id, aid=aid) Retrieve dashboard @@ -223,11 +223,11 @@ with thousandeyes_sdk.dashboards.ApiClient(configuration) as api_client: try: # Retrieve dashboard - api_response = api_instance.get_dashboard_by_id(dashboard_id, aid=aid) - print("The response of DashboardsApi->get_dashboard_by_id:\n") + api_response = api_instance.get_dashboard(dashboard_id, aid=aid) + print("The response of DashboardsApi->get_dashboard:\n") pprint(api_response) except Exception as e: - print("Exception when calling DashboardsApi->get_dashboard_by_id: %s\n" % e) + print("Exception when calling DashboardsApi->get_dashboard: %s\n" % e) ``` @@ -251,7 +251,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -267,8 +267,8 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_dashboard_data** -> ApiWidgetDataResponse get_dashboard_data(dashboard_id, widget_id, aid=aid, window=window, start_date=start_date, end_date=end_date, max=max, cursor=cursor, sort=sort, order=order) +# **get_dashboard_widget_data** +> ApiWidgetDataResponse get_dashboard_widget_data(dashboard_id, widget_id, aid=aid, window=window, start_date=start_date, end_date=end_date, max=max, cursor=cursor, sort=sort, order=order) Retrieve dashboard widget data @@ -318,11 +318,11 @@ with thousandeyes_sdk.dashboards.ApiClient(configuration) as api_client: try: # Retrieve dashboard widget data - api_response = api_instance.get_dashboard_data(dashboard_id, widget_id, aid=aid, window=window, start_date=start_date, end_date=end_date, max=max, cursor=cursor, sort=sort, order=order) - print("The response of DashboardsApi->get_dashboard_data:\n") + api_response = api_instance.get_dashboard_widget_data(dashboard_id, widget_id, aid=aid, window=window, start_date=start_date, end_date=end_date, max=max, cursor=cursor, sort=sort, order=order) + print("The response of DashboardsApi->get_dashboard_widget_data:\n") pprint(api_response) except Exception as e: - print("Exception when calling DashboardsApi->get_dashboard_data: %s\n" % e) + print("Exception when calling DashboardsApi->get_dashboard_widget_data: %s\n" % e) ``` @@ -354,7 +354,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -370,8 +370,8 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_dashboards_for_user** -> List[ApiDashboard] get_dashboards_for_user(aid=aid) +# **get_dashboards** +> List[ApiDashboard] get_dashboards(aid=aid) List dashboards @@ -411,11 +411,11 @@ with thousandeyes_sdk.dashboards.ApiClient(configuration) as api_client: try: # List dashboards - api_response = api_instance.get_dashboards_for_user(aid=aid) - print("The response of DashboardsApi->get_dashboards_for_user:\n") + api_response = api_instance.get_dashboards(aid=aid) + print("The response of DashboardsApi->get_dashboards:\n") pprint(api_response) except Exception as e: - print("Exception when calling DashboardsApi->get_dashboards_for_user: %s\n" % e) + print("Exception when calling DashboardsApi->get_dashboards: %s\n" % e) ``` @@ -438,7 +438,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -526,7 +526,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-dashboards/docs/DashboardsFiltersApi.md b/thousandeyes-sdk-dashboards/docs/DashboardsFiltersApi.md index cac2dffd..ea6abf2e 100644 --- a/thousandeyes-sdk-dashboards/docs/DashboardsFiltersApi.md +++ b/thousandeyes-sdk-dashboards/docs/DashboardsFiltersApi.md @@ -5,10 +5,10 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- [**create_dashboard_filter**](DashboardsFiltersApi.md#create_dashboard_filter) | **POST** /v7/dashboards/filters | Create dashboard filter -[**delete_dashboard_filter_by_id**](DashboardsFiltersApi.md#delete_dashboard_filter_by_id) | **DELETE** /v7/dashboards/filters/{id} | Delete dashboard filter -[**get_all_dashboard_filters**](DashboardsFiltersApi.md#get_all_dashboard_filters) | **GET** /v7/dashboards/filters | List dashboard filters -[**get_dashboard_filter_by_id**](DashboardsFiltersApi.md#get_dashboard_filter_by_id) | **GET** /v7/dashboards/filters/{id} | Get dashboard filter -[**update_dashboard_filter_by_id**](DashboardsFiltersApi.md#update_dashboard_filter_by_id) | **PUT** /v7/dashboards/filters/{id} | Update dashboard filter +[**delete_dashboard_filter**](DashboardsFiltersApi.md#delete_dashboard_filter) | **DELETE** /v7/dashboards/filters/{id} | Delete dashboard filter +[**get_dashboard_filter**](DashboardsFiltersApi.md#get_dashboard_filter) | **GET** /v7/dashboards/filters/{id} | Get dashboard filter +[**get_dashboards_filters**](DashboardsFiltersApi.md#get_dashboards_filters) | **GET** /v7/dashboards/filters | List dashboard filters +[**update_dashboard_filter**](DashboardsFiltersApi.md#update_dashboard_filter) | **PUT** /v7/dashboards/filters/{id} | Update dashboard filter # **create_dashboard_filter** @@ -82,7 +82,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -98,8 +98,8 @@ 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) -# **delete_dashboard_filter_by_id** -> delete_dashboard_filter_by_id(id, aid=aid) +# **delete_dashboard_filter** +> delete_dashboard_filter(id, aid=aid) Delete dashboard filter @@ -139,9 +139,9 @@ with thousandeyes_sdk.dashboards.ApiClient(configuration) as api_client: try: # Delete dashboard filter - api_instance.delete_dashboard_filter_by_id(id, aid=aid) + api_instance.delete_dashboard_filter(id, aid=aid) except Exception as e: - print("Exception when calling DashboardsFiltersApi->delete_dashboard_filter_by_id: %s\n" % e) + print("Exception when calling DashboardsFiltersApi->delete_dashboard_filter: %s\n" % e) ``` @@ -165,7 +165,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/problem+json + - **Accept**: application/json, application/problem+json ### HTTP response details @@ -181,94 +181,8 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_all_dashboard_filters** -> ApiContextFiltersResponse get_all_dashboard_filters(search_pattern=search_pattern, aid=aid) - -List dashboard filters - -Returns a list of dashboard filters and its context within your account group. - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import thousandeyes_sdk.dashboards -from thousandeyes_sdk.dashboards.models.api_context_filters_response import ApiContextFiltersResponse -from thousandeyes_sdk.dashboards.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.thousandeyes.com -# See configuration.py for a list of all supported configuration parameters. -configuration = thousandeyes_sdk.client.Configuration( - host = "https://api.thousandeyes.com" -) - -# 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.client.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with thousandeyes_sdk.dashboards.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = thousandeyes_sdk.dashboards.DashboardsFiltersApi(api_client) - search_pattern = 'cea-filter' # str | Optional search pattern parameter to filter list of dashboard filters by either name or description values. (optional) - 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: - # List dashboard filters - api_response = api_instance.get_all_dashboard_filters(search_pattern=search_pattern, aid=aid) - print("The response of DashboardsFiltersApi->get_all_dashboard_filters:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DashboardsFiltersApi->get_all_dashboard_filters: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **search_pattern** | **str**| Optional search pattern parameter to filter list of dashboard filters by either name or description values. | [optional] - **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 - -[**ApiContextFiltersResponse**](ApiContextFiltersResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/hal+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 | - | -**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_filter_by_id** -> ApiContextFilterResponse get_dashboard_filter_by_id(id, aid=aid) +# **get_dashboard_filter** +> ApiContextFilterResponse get_dashboard_filter(id, aid=aid) Get dashboard filter @@ -309,11 +223,11 @@ with thousandeyes_sdk.dashboards.ApiClient(configuration) as api_client: try: # Get dashboard filter - api_response = api_instance.get_dashboard_filter_by_id(id, aid=aid) - print("The response of DashboardsFiltersApi->get_dashboard_filter_by_id:\n") + api_response = api_instance.get_dashboard_filter(id, aid=aid) + print("The response of DashboardsFiltersApi->get_dashboard_filter:\n") pprint(api_response) except Exception as e: - print("Exception when calling DashboardsFiltersApi->get_dashboard_filter_by_id: %s\n" % e) + print("Exception when calling DashboardsFiltersApi->get_dashboard_filter: %s\n" % e) ``` @@ -337,7 +251,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -353,8 +267,94 @@ 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_filter_by_id** -> ApiContextFilterResponse update_dashboard_filter_by_id(id, api_context_filter_request, aid=aid) +# **get_dashboards_filters** +> ApiContextFiltersResponse get_dashboards_filters(search_pattern=search_pattern, aid=aid) + +List dashboard filters + +Returns a list of dashboard filters and its context within your account group. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.dashboards +from thousandeyes_sdk.dashboards.models.api_context_filters_response import ApiContextFiltersResponse +from thousandeyes_sdk.dashboards.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.dashboards.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.dashboards.DashboardsFiltersApi(api_client) + search_pattern = 'cea-filter' # str | Optional search pattern parameter to filter list of dashboard filters by either name or description values. (optional) + 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: + # List dashboard filters + api_response = api_instance.get_dashboards_filters(search_pattern=search_pattern, aid=aid) + print("The response of DashboardsFiltersApi->get_dashboards_filters:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DashboardsFiltersApi->get_dashboards_filters: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **search_pattern** | **str**| Optional search pattern parameter to filter list of dashboard filters by either name or description values. | [optional] + **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 + +[**ApiContextFiltersResponse**](ApiContextFiltersResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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 | - | +**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) + +# **update_dashboard_filter** +> ApiContextFilterResponse update_dashboard_filter(id, api_context_filter_request, aid=aid) Update dashboard filter @@ -397,11 +397,11 @@ with thousandeyes_sdk.dashboards.ApiClient(configuration) as api_client: try: # Update dashboard filter - api_response = api_instance.update_dashboard_filter_by_id(id, api_context_filter_request, aid=aid) - print("The response of DashboardsFiltersApi->update_dashboard_filter_by_id:\n") + api_response = api_instance.update_dashboard_filter(id, api_context_filter_request, aid=aid) + print("The response of DashboardsFiltersApi->update_dashboard_filter:\n") pprint(api_response) except Exception as e: - print("Exception when calling DashboardsFiltersApi->update_dashboard_filter_by_id: %s\n" % e) + print("Exception when calling DashboardsFiltersApi->update_dashboard_filter: %s\n" % e) ``` @@ -426,7 +426,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-dashboards/docs/ValidationErrorItem.md b/thousandeyes-sdk-dashboards/docs/ValidationErrorItem.md index 1d420965..53e2b199 100644 --- a/thousandeyes-sdk-dashboards/docs/ValidationErrorItem.md +++ b/thousandeyes-sdk-dashboards/docs/ValidationErrorItem.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **code** | **str** | (Optional) A unique error type/code that can be referenced in the documentation for further details. | [optional] -**var_field** | **int** | Identifies the field that triggered this particular error. | [optional] +**var_field** | **str** | Identifies the field that triggered this particular error. | [optional] **message** | **str** | A short, human-readable summary of the error. | [optional] ## Example diff --git a/thousandeyes-sdk-dashboards/pyproject.toml b/thousandeyes-sdk-dashboards/pyproject.toml index ab49d635..9c564f34 100644 --- a/thousandeyes-sdk-dashboards/pyproject.toml +++ b/thousandeyes-sdk-dashboards/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "thousandeyes-sdk-dashboards" -version = "1.0.0" +dynamic = ["version"] authors = [ { name = "ThousandEyes API Team", email = "api-team@thousandeyes.com" } ] @@ -11,9 +11,12 @@ dependencies = [ "python-dateutil >=2.8.2", "pydantic >=2", "typing-extensions >=4.7.1", - "thousandeyes-sdk-client==1.0.0", + "thousandeyes-sdk-core", ] +[tool.setuptools.dynamic] +version = {attr = "thousandeyes_sdk.client.__version__"} + [project.optional-dependencies] test = [ "pytest~=7.1.3", diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/__init__.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/__init__.py index e835ec30..671e5f4c 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/__init__.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/__init__.py @@ -7,15 +7,13 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 -__version__ = "1.0.0" - # import apis into sdk package from thousandeyes_sdk.dashboards.api.dashboard_snapshots_api import DashboardSnapshotsApi from thousandeyes_sdk.dashboards.api.dashboards_api import DashboardsApi diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/api/dashboard_snapshots_api.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/api/dashboard_snapshots_api.py index ca35768e..63bebc2b 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/api/dashboard_snapshots_api.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/api/dashboard_snapshots_api.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -31,6 +31,7 @@ from thousandeyes_sdk.dashboards.models.update_snapshot_expiration_date_api_requ from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class DashboardSnapshotsApi: @@ -43,6 +44,7 @@ class DashboardSnapshotsApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @@ -314,6 +316,7 @@ class DashboardSnapshotsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -355,617 +358,6 @@ class DashboardSnapshotsApi: - @validate_call - def dashboard_snapshot_by_id( - self, - snapshot_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard snapshot which can be obtained from the `/dashboards-snapshots` 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, - 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, - ) -> ApiDashboardSnapshot: - """Retrieve dashboard snapshot - - This endpoint returns a list of widgets configured in dashboard snapshot configured in ThousandEyes. Seed this endpoint with a snapshotId found from the /dashboard-snapshots endpoint. This endpoint requires the `View Snapshots` permission be assigned to the role of the user accessing this endpoint. Returns a list of widgets configured within a dashboard snapshot. Use the `snapshotId` obtained from the `/dashboard-snapshots` endpoint. The `View Snapshots` permission is required to use this endpoint.\" - - :param snapshot_id: A Identifier for a dashboard snapshot which can be obtained from the `/dashboards-snapshots` endpoint. (required) - :type snapshot_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 - 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._dashboard_snapshot_by_id_serialize( - snapshot_id=snapshot_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiDashboardSnapshot", - '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 dashboard_snapshot_by_id_with_http_info( - self, - snapshot_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard snapshot which can be obtained from the `/dashboards-snapshots` 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, - 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[ApiDashboardSnapshot]: - """Retrieve dashboard snapshot - - This endpoint returns a list of widgets configured in dashboard snapshot configured in ThousandEyes. Seed this endpoint with a snapshotId found from the /dashboard-snapshots endpoint. This endpoint requires the `View Snapshots` permission be assigned to the role of the user accessing this endpoint. Returns a list of widgets configured within a dashboard snapshot. Use the `snapshotId` obtained from the `/dashboard-snapshots` endpoint. The `View Snapshots` permission is required to use this endpoint.\" - - :param snapshot_id: A Identifier for a dashboard snapshot which can be obtained from the `/dashboards-snapshots` endpoint. (required) - :type snapshot_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 - 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._dashboard_snapshot_by_id_serialize( - snapshot_id=snapshot_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiDashboardSnapshot", - '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 dashboard_snapshot_by_id_without_preload_content( - self, - snapshot_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard snapshot which can be obtained from the `/dashboards-snapshots` 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, - 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 snapshot - - This endpoint returns a list of widgets configured in dashboard snapshot configured in ThousandEyes. Seed this endpoint with a snapshotId found from the /dashboard-snapshots endpoint. This endpoint requires the `View Snapshots` permission be assigned to the role of the user accessing this endpoint. Returns a list of widgets configured within a dashboard snapshot. Use the `snapshotId` obtained from the `/dashboard-snapshots` endpoint. The `View Snapshots` permission is required to use this endpoint.\" - - :param snapshot_id: A Identifier for a dashboard snapshot which can be obtained from the `/dashboards-snapshots` endpoint. (required) - :type snapshot_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 - 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._dashboard_snapshot_by_id_serialize( - snapshot_id=snapshot_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiDashboardSnapshot", - '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 _dashboard_snapshot_by_id_serialize( - self, - snapshot_id, - 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 - if snapshot_id is not None: - _path_params['snapshotId'] = snapshot_id - # 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/problem+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v7/dashboard-snapshots/{snapshotId}', - 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 dashboard_snapshots( - 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, - dashboard_id: Optional[StrictStr] = None, - cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, - _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, - ) -> DashboardSnapshotsPage: - """List dashboard snapshots - - Returns a list of dashboard snapshots within your account group. Use this data to identify a specific dashboard snapshot, which can be used in other endpoints to access aggregated data. The `View Snapshots` permission is required to use this endpoint.\" - - :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 dashboard_id: - :type dashboard_id: str - :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. - :type cursor: 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._dashboard_snapshots_serialize( - aid=aid, - dashboard_id=dashboard_id, - cursor=cursor, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DashboardSnapshotsPage", - '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 dashboard_snapshots_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, - dashboard_id: Optional[StrictStr] = None, - cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, - _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[DashboardSnapshotsPage]: - """List dashboard snapshots - - Returns a list of dashboard snapshots within your account group. Use this data to identify a specific dashboard snapshot, which can be used in other endpoints to access aggregated data. The `View Snapshots` permission is required to use this endpoint.\" - - :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 dashboard_id: - :type dashboard_id: str - :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. - :type cursor: 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._dashboard_snapshots_serialize( - aid=aid, - dashboard_id=dashboard_id, - cursor=cursor, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DashboardSnapshotsPage", - '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 dashboard_snapshots_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, - dashboard_id: Optional[StrictStr] = None, - cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, - _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 dashboard snapshots - - Returns a list of dashboard snapshots within your account group. Use this data to identify a specific dashboard snapshot, which can be used in other endpoints to access aggregated data. The `View Snapshots` permission is required to use this endpoint.\" - - :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 dashboard_id: - :type dashboard_id: str - :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. - :type cursor: 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._dashboard_snapshots_serialize( - aid=aid, - dashboard_id=dashboard_id, - cursor=cursor, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DashboardSnapshotsPage", - '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 _dashboard_snapshots_serialize( - self, - aid, - dashboard_id, - cursor, - _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)) - - if dashboard_id is not None: - - _query_params.append(('dashboardId', dashboard_id)) - - if cursor is not None: - - _query_params.append(('cursor', cursor)) - - # 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/problem+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v7/dashboard-snapshots', - 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 delete_dashboard_snapshot( self, @@ -1233,6 +625,7 @@ class DashboardSnapshotsApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ + 'application/json', 'application/problem+json' ] ) @@ -1262,7 +655,304 @@ class DashboardSnapshotsApi: @validate_call - def snapshot_data_by_widget( + def get_dashboard_snapshot( + self, + snapshot_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard snapshot which can be obtained from the `/dashboards-snapshots` 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, + 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, + ) -> ApiDashboardSnapshot: + """Retrieve dashboard snapshot + + This endpoint returns a list of widgets configured in dashboard snapshot configured in ThousandEyes. Seed this endpoint with a snapshotId found from the /dashboard-snapshots endpoint. This endpoint requires the `View Snapshots` permission be assigned to the role of the user accessing this endpoint. Returns a list of widgets configured within a dashboard snapshot. Use the `snapshotId` obtained from the `/dashboard-snapshots` endpoint. The `View Snapshots` permission is required to use this endpoint.\" + + :param snapshot_id: A Identifier for a dashboard snapshot which can be obtained from the `/dashboards-snapshots` endpoint. (required) + :type snapshot_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 + 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_snapshot_serialize( + snapshot_id=snapshot_id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiDashboardSnapshot", + '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_snapshot_with_http_info( + self, + snapshot_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard snapshot which can be obtained from the `/dashboards-snapshots` 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, + 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[ApiDashboardSnapshot]: + """Retrieve dashboard snapshot + + This endpoint returns a list of widgets configured in dashboard snapshot configured in ThousandEyes. Seed this endpoint with a snapshotId found from the /dashboard-snapshots endpoint. This endpoint requires the `View Snapshots` permission be assigned to the role of the user accessing this endpoint. Returns a list of widgets configured within a dashboard snapshot. Use the `snapshotId` obtained from the `/dashboard-snapshots` endpoint. The `View Snapshots` permission is required to use this endpoint.\" + + :param snapshot_id: A Identifier for a dashboard snapshot which can be obtained from the `/dashboards-snapshots` endpoint. (required) + :type snapshot_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 + 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_snapshot_serialize( + snapshot_id=snapshot_id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiDashboardSnapshot", + '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_snapshot_without_preload_content( + self, + snapshot_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard snapshot which can be obtained from the `/dashboards-snapshots` 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, + 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 snapshot + + This endpoint returns a list of widgets configured in dashboard snapshot configured in ThousandEyes. Seed this endpoint with a snapshotId found from the /dashboard-snapshots endpoint. This endpoint requires the `View Snapshots` permission be assigned to the role of the user accessing this endpoint. Returns a list of widgets configured within a dashboard snapshot. Use the `snapshotId` obtained from the `/dashboard-snapshots` endpoint. The `View Snapshots` permission is required to use this endpoint.\" + + :param snapshot_id: A Identifier for a dashboard snapshot which can be obtained from the `/dashboards-snapshots` endpoint. (required) + :type snapshot_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 + 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_snapshot_serialize( + snapshot_id=snapshot_id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiDashboardSnapshot", + '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_snapshot_serialize( + self, + snapshot_id, + 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 + if snapshot_id is not None: + _path_params['snapshotId'] = snapshot_id + # 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='/v7/dashboard-snapshots/{snapshotId}', + 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_dashboard_snapshot_widget_data( self, snapshot_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard snapshot which can be obtained from the `/dashboards-snapshots` endpoint.")], widget_id: Annotated[StrictStr, Field(description="A Identifier for a widget.")], @@ -1312,7 +1002,7 @@ class DashboardSnapshotsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._snapshot_data_by_widget_serialize( + _param = self._get_dashboard_snapshot_widget_data_serialize( snapshot_id=snapshot_id, widget_id=widget_id, aid=aid, @@ -1344,7 +1034,7 @@ class DashboardSnapshotsApi: @validate_call - def snapshot_data_by_widget_with_http_info( + def get_dashboard_snapshot_widget_data_with_http_info( self, snapshot_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard snapshot which can be obtained from the `/dashboards-snapshots` endpoint.")], widget_id: Annotated[StrictStr, Field(description="A Identifier for a widget.")], @@ -1394,7 +1084,7 @@ class DashboardSnapshotsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._snapshot_data_by_widget_serialize( + _param = self._get_dashboard_snapshot_widget_data_serialize( snapshot_id=snapshot_id, widget_id=widget_id, aid=aid, @@ -1426,7 +1116,7 @@ class DashboardSnapshotsApi: @validate_call - def snapshot_data_by_widget_without_preload_content( + def get_dashboard_snapshot_widget_data_without_preload_content( self, snapshot_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard snapshot which can be obtained from the `/dashboards-snapshots` endpoint.")], widget_id: Annotated[StrictStr, Field(description="A Identifier for a widget.")], @@ -1476,7 +1166,7 @@ class DashboardSnapshotsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._snapshot_data_by_widget_serialize( + _param = self._get_dashboard_snapshot_widget_data_serialize( snapshot_id=snapshot_id, widget_id=widget_id, aid=aid, @@ -1502,7 +1192,7 @@ class DashboardSnapshotsApi: return response_data.response - def _snapshot_data_by_widget_serialize( + def _get_dashboard_snapshot_widget_data_serialize( self, snapshot_id, widget_id, @@ -1544,6 +1234,7 @@ class DashboardSnapshotsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1573,7 +1264,323 @@ class DashboardSnapshotsApi: @validate_call - def update_snapshot_expiration_date( + def get_dashboard_snapshots( + 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, + dashboard_id: Optional[StrictStr] = None, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, + _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, + ) -> DashboardSnapshotsPage: + """List dashboard snapshots + + Returns a list of dashboard snapshots within your account group. Use this data to identify a specific dashboard snapshot, which can be used in other endpoints to access aggregated data. The `View Snapshots` permission is required to use this endpoint.\" + + :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 dashboard_id: + :type dashboard_id: str + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: 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_dashboard_snapshots_serialize( + aid=aid, + dashboard_id=dashboard_id, + cursor=cursor, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DashboardSnapshotsPage", + '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_snapshots_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, + dashboard_id: Optional[StrictStr] = None, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, + _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[DashboardSnapshotsPage]: + """List dashboard snapshots + + Returns a list of dashboard snapshots within your account group. Use this data to identify a specific dashboard snapshot, which can be used in other endpoints to access aggregated data. The `View Snapshots` permission is required to use this endpoint.\" + + :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 dashboard_id: + :type dashboard_id: str + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: 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_dashboard_snapshots_serialize( + aid=aid, + dashboard_id=dashboard_id, + cursor=cursor, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DashboardSnapshotsPage", + '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_snapshots_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, + dashboard_id: Optional[StrictStr] = None, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, + _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 dashboard snapshots + + Returns a list of dashboard snapshots within your account group. Use this data to identify a specific dashboard snapshot, which can be used in other endpoints to access aggregated data. The `View Snapshots` permission is required to use this endpoint.\" + + :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 dashboard_id: + :type dashboard_id: str + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: 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_dashboard_snapshots_serialize( + aid=aid, + dashboard_id=dashboard_id, + cursor=cursor, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DashboardSnapshotsPage", + '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_snapshots_serialize( + self, + aid, + dashboard_id, + cursor, + _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)) + + if dashboard_id is not None: + + _query_params.append(('dashboardId', dashboard_id)) + + if cursor is not None: + + _query_params.append(('cursor', cursor)) + + # 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='/v7/dashboard-snapshots', + 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 update_dashboard_snapshot_expiration_date( self, snapshot_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard snapshot which can be obtained from the `/dashboards-snapshots` endpoint.")], update_snapshot_expiration_date_api_request: Annotated[UpdateSnapshotExpirationDateApiRequest, Field(description="Request body schema to update a snapshot expiration.")], @@ -1623,7 +1630,7 @@ class DashboardSnapshotsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._update_snapshot_expiration_date_serialize( + _param = self._update_dashboard_snapshot_expiration_date_serialize( snapshot_id=snapshot_id, update_snapshot_expiration_date_api_request=update_snapshot_expiration_date_api_request, aid=aid, @@ -1655,7 +1662,7 @@ class DashboardSnapshotsApi: @validate_call - def update_snapshot_expiration_date_with_http_info( + def update_dashboard_snapshot_expiration_date_with_http_info( self, snapshot_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard snapshot which can be obtained from the `/dashboards-snapshots` endpoint.")], update_snapshot_expiration_date_api_request: Annotated[UpdateSnapshotExpirationDateApiRequest, Field(description="Request body schema to update a snapshot expiration.")], @@ -1705,7 +1712,7 @@ class DashboardSnapshotsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._update_snapshot_expiration_date_serialize( + _param = self._update_dashboard_snapshot_expiration_date_serialize( snapshot_id=snapshot_id, update_snapshot_expiration_date_api_request=update_snapshot_expiration_date_api_request, aid=aid, @@ -1737,7 +1744,7 @@ class DashboardSnapshotsApi: @validate_call - def update_snapshot_expiration_date_without_preload_content( + def update_dashboard_snapshot_expiration_date_without_preload_content( self, snapshot_id: Annotated[StrictStr, Field(description="A Identifier for a dashboard snapshot which can be obtained from the `/dashboards-snapshots` endpoint.")], update_snapshot_expiration_date_api_request: Annotated[UpdateSnapshotExpirationDateApiRequest, Field(description="Request body schema to update a snapshot expiration.")], @@ -1787,7 +1794,7 @@ class DashboardSnapshotsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._update_snapshot_expiration_date_serialize( + _param = self._update_dashboard_snapshot_expiration_date_serialize( snapshot_id=snapshot_id, update_snapshot_expiration_date_api_request=update_snapshot_expiration_date_api_request, aid=aid, @@ -1813,7 +1820,7 @@ class DashboardSnapshotsApi: return response_data.response - def _update_snapshot_expiration_date_serialize( + def _update_dashboard_snapshot_expiration_date_serialize( self, snapshot_id, update_snapshot_expiration_date_api_request, @@ -1854,6 +1861,7 @@ class DashboardSnapshotsApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ + 'application/json', 'application/problem+json' ] ) 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 2ba6a53d..e027d8e6 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 @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -30,6 +30,7 @@ from thousandeyes_sdk.dashboards.models.dashboard_order import DashboardOrder from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class DashboardsApi: @@ -42,6 +43,7 @@ class DashboardsApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @@ -313,6 +315,7 @@ class DashboardsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -621,6 +624,7 @@ class DashboardsApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ + 'application/json', 'application/problem+json' ] ) @@ -650,7 +654,7 @@ class DashboardsApi: @validate_call - def get_dashboard_by_id( + 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, @@ -697,7 +701,7 @@ class DashboardsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_dashboard_by_id_serialize( + _param = self._get_dashboard_serialize( dashboard_id=dashboard_id, aid=aid, _request_auth=_request_auth, @@ -728,7 +732,7 @@ class DashboardsApi: @validate_call - def get_dashboard_by_id_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, @@ -775,7 +779,7 @@ class DashboardsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_dashboard_by_id_serialize( + _param = self._get_dashboard_serialize( dashboard_id=dashboard_id, aid=aid, _request_auth=_request_auth, @@ -806,7 +810,7 @@ class DashboardsApi: @validate_call - def get_dashboard_by_id_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, @@ -853,7 +857,7 @@ class DashboardsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_dashboard_by_id_serialize( + _param = self._get_dashboard_serialize( dashboard_id=dashboard_id, aid=aid, _request_auth=_request_auth, @@ -878,7 +882,7 @@ class DashboardsApi: return response_data.response - def _get_dashboard_by_id_serialize( + def _get_dashboard_serialize( self, dashboard_id, aid, @@ -917,6 +921,7 @@ class DashboardsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -946,7 +951,7 @@ class DashboardsApi: @validate_call - def get_dashboard_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.")], @@ -1017,7 +1022,7 @@ class DashboardsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_dashboard_data_serialize( + _param = self._get_dashboard_widget_data_serialize( dashboard_id=dashboard_id, widget_id=widget_id, aid=aid, @@ -1056,7 +1061,7 @@ class DashboardsApi: @validate_call - def get_dashboard_data_with_http_info( + 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.")], @@ -1127,7 +1132,7 @@ class DashboardsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_dashboard_data_serialize( + _param = self._get_dashboard_widget_data_serialize( dashboard_id=dashboard_id, widget_id=widget_id, aid=aid, @@ -1166,7 +1171,7 @@ class DashboardsApi: @validate_call - def get_dashboard_data_without_preload_content( + 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.")], @@ -1237,7 +1242,7 @@ class DashboardsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_dashboard_data_serialize( + _param = self._get_dashboard_widget_data_serialize( dashboard_id=dashboard_id, widget_id=widget_id, aid=aid, @@ -1270,7 +1275,7 @@ class DashboardsApi: return response_data.response - def _get_dashboard_data_serialize( + def _get_dashboard_widget_data_serialize( self, dashboard_id, widget_id, @@ -1365,6 +1370,7 @@ class DashboardsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1394,7 +1400,7 @@ class DashboardsApi: @validate_call - def get_dashboards_for_user( + 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[ @@ -1438,7 +1444,7 @@ class DashboardsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_dashboards_for_user_serialize( + _param = self._get_dashboards_serialize( aid=aid, _request_auth=_request_auth, _content_type=_content_type, @@ -1468,7 +1474,7 @@ class DashboardsApi: @validate_call - def get_dashboards_for_user_with_http_info( + 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[ @@ -1512,7 +1518,7 @@ class DashboardsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_dashboards_for_user_serialize( + _param = self._get_dashboards_serialize( aid=aid, _request_auth=_request_auth, _content_type=_content_type, @@ -1542,7 +1548,7 @@ class DashboardsApi: @validate_call - def get_dashboards_for_user_without_preload_content( + 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[ @@ -1586,7 +1592,7 @@ class DashboardsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_dashboards_for_user_serialize( + _param = self._get_dashboards_serialize( aid=aid, _request_auth=_request_auth, _content_type=_content_type, @@ -1610,7 +1616,7 @@ class DashboardsApi: return response_data.response - def _get_dashboards_for_user_serialize( + def _get_dashboards_serialize( self, aid, _request_auth, @@ -1646,6 +1652,7 @@ class DashboardsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1957,6 +1964,7 @@ class DashboardsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/api/dashboards_filters_api.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/api/dashboards_filters_api.py index cb7f204a..c4fe7fcf 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/api/dashboards_filters_api.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/api/dashboards_filters_api.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -28,6 +28,7 @@ from thousandeyes_sdk.dashboards.models.api_context_filters_response import ApiC from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class DashboardsFiltersApi: @@ -40,6 +41,7 @@ class DashboardsFiltersApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @@ -311,6 +313,7 @@ class DashboardsFiltersApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -353,7 +356,7 @@ class DashboardsFiltersApi: @validate_call - def delete_dashboard_filter_by_id( + def delete_dashboard_filter( self, id: Annotated[StrictStr, Field(description="Unique dashboard filter ID.")], 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, @@ -400,7 +403,7 @@ class DashboardsFiltersApi: :return: Returns the result object. """ # noqa: E501 - _param = self._delete_dashboard_filter_by_id_serialize( + _param = self._delete_dashboard_filter_serialize( id=id, aid=aid, _request_auth=_request_auth, @@ -431,7 +434,7 @@ class DashboardsFiltersApi: @validate_call - def delete_dashboard_filter_by_id_with_http_info( + def delete_dashboard_filter_with_http_info( self, id: Annotated[StrictStr, Field(description="Unique dashboard filter ID.")], 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, @@ -478,7 +481,7 @@ class DashboardsFiltersApi: :return: Returns the result object. """ # noqa: E501 - _param = self._delete_dashboard_filter_by_id_serialize( + _param = self._delete_dashboard_filter_serialize( id=id, aid=aid, _request_auth=_request_auth, @@ -509,7 +512,7 @@ class DashboardsFiltersApi: @validate_call - def delete_dashboard_filter_by_id_without_preload_content( + def delete_dashboard_filter_without_preload_content( self, id: Annotated[StrictStr, Field(description="Unique dashboard filter ID.")], 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, @@ -556,7 +559,7 @@ class DashboardsFiltersApi: :return: Returns the result object. """ # noqa: E501 - _param = self._delete_dashboard_filter_by_id_serialize( + _param = self._delete_dashboard_filter_serialize( id=id, aid=aid, _request_auth=_request_auth, @@ -581,7 +584,7 @@ class DashboardsFiltersApi: return response_data.response - def _delete_dashboard_filter_by_id_serialize( + def _delete_dashboard_filter_serialize( self, id, aid, @@ -619,6 +622,7 @@ class DashboardsFiltersApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ + 'application/json', 'application/problem+json' ] ) @@ -648,7 +652,304 @@ class DashboardsFiltersApi: @validate_call - def get_all_dashboard_filters( + def get_dashboard_filter( + self, + id: Annotated[StrictStr, Field(description="Unique dashboard filter ID.")], + 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, + ) -> ApiContextFilterResponse: + """Get dashboard filter + + Returns a list of data source filters and their metadata within the dashboard filter. + + :param id: Unique dashboard filter ID. (required) + :type 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 + 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_filter_serialize( + id=id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiContextFilterResponse", + '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_filter_with_http_info( + self, + id: Annotated[StrictStr, Field(description="Unique dashboard filter ID.")], + 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[ApiContextFilterResponse]: + """Get dashboard filter + + Returns a list of data source filters and their metadata within the dashboard filter. + + :param id: Unique dashboard filter ID. (required) + :type 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 + 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_filter_serialize( + id=id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiContextFilterResponse", + '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_filter_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="Unique dashboard filter ID.")], + 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: + """Get dashboard filter + + Returns a list of data source filters and their metadata within the dashboard filter. + + :param id: Unique dashboard filter ID. (required) + :type 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 + 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_filter_serialize( + id=id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiContextFilterResponse", + '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_filter_serialize( + self, + id, + 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 + if id is not None: + _path_params['id'] = id + # 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='/v7/dashboards/filters/{id}', + 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_filters( self, search_pattern: Annotated[Optional[StrictStr], Field(description="Optional search pattern parameter to filter list of dashboard filters by either name or description values.")] = None, 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, @@ -695,7 +996,7 @@ class DashboardsFiltersApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_all_dashboard_filters_serialize( + _param = self._get_dashboards_filters_serialize( search_pattern=search_pattern, aid=aid, _request_auth=_request_auth, @@ -726,7 +1027,7 @@ class DashboardsFiltersApi: @validate_call - def get_all_dashboard_filters_with_http_info( + def get_dashboards_filters_with_http_info( self, search_pattern: Annotated[Optional[StrictStr], Field(description="Optional search pattern parameter to filter list of dashboard filters by either name or description values.")] = None, 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, @@ -773,7 +1074,7 @@ class DashboardsFiltersApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_all_dashboard_filters_serialize( + _param = self._get_dashboards_filters_serialize( search_pattern=search_pattern, aid=aid, _request_auth=_request_auth, @@ -804,7 +1105,7 @@ class DashboardsFiltersApi: @validate_call - def get_all_dashboard_filters_without_preload_content( + def get_dashboards_filters_without_preload_content( self, search_pattern: Annotated[Optional[StrictStr], Field(description="Optional search pattern parameter to filter list of dashboard filters by either name or description values.")] = None, 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, @@ -851,7 +1152,7 @@ class DashboardsFiltersApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_all_dashboard_filters_serialize( + _param = self._get_dashboards_filters_serialize( search_pattern=search_pattern, aid=aid, _request_auth=_request_auth, @@ -876,7 +1177,7 @@ class DashboardsFiltersApi: return response_data.response - def _get_all_dashboard_filters_serialize( + def _get_dashboards_filters_serialize( self, search_pattern, aid, @@ -917,6 +1218,7 @@ class DashboardsFiltersApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -946,303 +1248,7 @@ class DashboardsFiltersApi: @validate_call - def get_dashboard_filter_by_id( - self, - id: Annotated[StrictStr, Field(description="Unique dashboard filter ID.")], - 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, - ) -> ApiContextFilterResponse: - """Get dashboard filter - - Returns a list of data source filters and their metadata within the dashboard filter. - - :param id: Unique dashboard filter ID. (required) - :type 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 - 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_filter_by_id_serialize( - id=id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiContextFilterResponse", - '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_filter_by_id_with_http_info( - self, - id: Annotated[StrictStr, Field(description="Unique dashboard filter ID.")], - 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[ApiContextFilterResponse]: - """Get dashboard filter - - Returns a list of data source filters and their metadata within the dashboard filter. - - :param id: Unique dashboard filter ID. (required) - :type 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 - 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_filter_by_id_serialize( - id=id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiContextFilterResponse", - '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_filter_by_id_without_preload_content( - self, - id: Annotated[StrictStr, Field(description="Unique dashboard filter ID.")], - 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: - """Get dashboard filter - - Returns a list of data source filters and their metadata within the dashboard filter. - - :param id: Unique dashboard filter ID. (required) - :type 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 - 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_filter_by_id_serialize( - id=id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiContextFilterResponse", - '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_filter_by_id_serialize( - self, - id, - 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 - if id is not None: - _path_params['id'] = id - # 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/problem+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v7/dashboards/filters/{id}', - 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 update_dashboard_filter_by_id( + def update_dashboard_filter( self, id: Annotated[StrictStr, Field(description="Unique dashboard filter ID.")], api_context_filter_request: Annotated[ApiContextFilterRequest, Field(description="Updated dashboard filter context object")], @@ -1292,7 +1298,7 @@ class DashboardsFiltersApi: :return: Returns the result object. """ # noqa: E501 - _param = self._update_dashboard_filter_by_id_serialize( + _param = self._update_dashboard_filter_serialize( id=id, api_context_filter_request=api_context_filter_request, aid=aid, @@ -1324,7 +1330,7 @@ class DashboardsFiltersApi: @validate_call - def update_dashboard_filter_by_id_with_http_info( + def update_dashboard_filter_with_http_info( self, id: Annotated[StrictStr, Field(description="Unique dashboard filter ID.")], api_context_filter_request: Annotated[ApiContextFilterRequest, Field(description="Updated dashboard filter context object")], @@ -1374,7 +1380,7 @@ class DashboardsFiltersApi: :return: Returns the result object. """ # noqa: E501 - _param = self._update_dashboard_filter_by_id_serialize( + _param = self._update_dashboard_filter_serialize( id=id, api_context_filter_request=api_context_filter_request, aid=aid, @@ -1406,7 +1412,7 @@ class DashboardsFiltersApi: @validate_call - def update_dashboard_filter_by_id_without_preload_content( + def update_dashboard_filter_without_preload_content( self, id: Annotated[StrictStr, Field(description="Unique dashboard filter ID.")], api_context_filter_request: Annotated[ApiContextFilterRequest, Field(description="Updated dashboard filter context object")], @@ -1456,7 +1462,7 @@ class DashboardsFiltersApi: :return: Returns the result object. """ # noqa: E501 - _param = self._update_dashboard_filter_by_id_serialize( + _param = self._update_dashboard_filter_serialize( id=id, api_context_filter_request=api_context_filter_request, aid=aid, @@ -1482,7 +1488,7 @@ class DashboardsFiltersApi: return response_data.response - def _update_dashboard_filter_by_id_serialize( + def _update_dashboard_filter_serialize( self, id, api_context_filter_request, @@ -1524,6 +1530,7 @@ class DashboardsFiltersApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) 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 3fd04b47..b7fb4f52 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/__init__.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/__init__.py @@ -6,7 +6,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/active_within.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/active_within.py index 826b710c..e32bafc9 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/active_within.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/active_within.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class ActiveWithin(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class ActiveWithin(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/agent_status_datasource.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/agent_status_datasource.py index 6bb48434..bf5fb0b7 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/agent_status_datasource.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/agent_status_datasource.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/alert_list_alert_type.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/alert_list_alert_type.py index 0f895905..0f8b9b25 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/alert_list_alert_type.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/alert_list_alert_type.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/alert_list_datasource.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/alert_list_datasource.py index c4151557..53144aca 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/alert_list_datasource.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/alert_list_datasource.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_agent_location.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_agent_location.py index 9c9386e4..5580a857 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_agent_location.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_agent_location.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class ApiAgentLocation(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class ApiAgentLocation(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_agent_status_agent.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_agent_status_agent.py index 463ee29d..a56c6910 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_agent_status_agent.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_agent_status_agent.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -40,6 +40,7 @@ class ApiAgentStatusAgent(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -50,7 +51,7 @@ class ApiAgentStatusAgent(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_agent_status_ip_info.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_agent_status_ip_info.py index 00a97b62..99a55679 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_agent_status_ip_info.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_agent_status_ip_info.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class ApiAgentStatusIpInfo(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class ApiAgentStatusIpInfo(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_agent_status_summary.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_agent_status_summary.py index c29db8d2..b43583cd 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_agent_status_summary.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_agent_status_summary.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class ApiAgentStatusSummary(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class ApiAgentStatusSummary(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_agent_status_widget.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_agent_status_widget.py index 5247e827..9d312935 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_agent_status_widget.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_agent_status_widget.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -68,6 +68,7 @@ class ApiAgentStatusWidget(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -78,7 +79,7 @@ class ApiAgentStatusWidget(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_agent_widget_show.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_agent_widget_show.py index ef9baba1..0e488a10 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_agent_widget_show.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_agent_widget_show.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_agent_widget_type.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_agent_widget_type.py index f7308903..a5e0bca3 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_agent_widget_type.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_agent_widget_type.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_aggregate_property.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_aggregate_property.py index 0530e249..30000d29 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_aggregate_property.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_aggregate_property.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_alert_list_alert.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_alert_list_alert.py index b0c0369f..a663b216 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_alert_list_alert.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_alert_list_alert.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -43,6 +43,7 @@ class ApiAlertListAlert(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -53,7 +54,7 @@ class ApiAlertListAlert(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_alert_list_widget.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_alert_list_widget.py index ae69788b..8957062b 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_alert_list_widget.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_alert_list_widget.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -69,6 +69,7 @@ class ApiAlertListWidget(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -79,7 +80,7 @@ class ApiAlertListWidget(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_box_and_whiskers_widget.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_box_and_whiskers_widget.py index 77ba038c..e381bd0e 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_box_and_whiskers_widget.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_box_and_whiskers_widget.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -70,6 +70,7 @@ class ApiBoxAndWhiskersWidget(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -80,7 +81,7 @@ class ApiBoxAndWhiskersWidget(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_color_grid_widget.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_color_grid_widget.py index 3e76a10c..13419b58 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_color_grid_widget.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_color_grid_widget.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -77,6 +77,7 @@ class ApiColorGridWidget(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -87,7 +88,7 @@ class ApiColorGridWidget(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_context_filter_request.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_context_filter_request.py index fe1492f5..c7555bfb 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_context_filter_request.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_context_filter_request.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class ApiContextFilterRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class ApiContextFilterRequest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_context_filter_response.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_context_filter_response.py index 5b223441..b1a456d3 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_context_filter_response.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_context_filter_response.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -46,6 +46,7 @@ class ApiContextFilterResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -56,7 +57,7 @@ class ApiContextFilterResponse(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_context_filters_response.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_context_filters_response.py index f1e4c6ec..5b1c1416 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_context_filters_response.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_context_filters_response.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class ApiContextFiltersResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class ApiContextFiltersResponse(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: 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 5ed40ff3..8019cd53 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 @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -60,6 +60,7 @@ class ApiDashboard(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -70,7 +71,7 @@ class ApiDashboard(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_dashboard_asw.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_dashboard_asw.py index 55f04289..c946eee5 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_dashboard_asw.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_dashboard_asw.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -43,6 +43,7 @@ class ApiDashboardAsw(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -53,7 +54,7 @@ class ApiDashboardAsw(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_dashboard_filter_user_details.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_dashboard_filter_user_details.py index f3618d14..b2ddccba 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_dashboard_filter_user_details.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_dashboard_filter_user_details.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class ApiDashboardFilterUserDetails(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class ApiDashboardFilterUserDetails(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_dashboard_snapshot.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_dashboard_snapshot.py index 69473948..63701911 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_dashboard_snapshot.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_dashboard_snapshot.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -53,6 +53,7 @@ class ApiDashboardSnapshot(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -63,7 +64,7 @@ class ApiDashboardSnapshot(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_data_point_group.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_data_point_group.py index ac8cc10f..cb19d45e 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_data_point_group.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_data_point_group.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class ApiDataPointGroup(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class ApiDataPointGroup(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_data_source_filter.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_data_source_filter.py index 33ac8a76..e93df336 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_data_source_filter.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_data_source_filter.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class ApiDataSourceFilter(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class ApiDataSourceFilter(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_data_source_filters.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_data_source_filters.py index fbf7faa5..12deea7f 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_data_source_filters.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_data_source_filters.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class ApiDataSourceFilters(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class ApiDataSourceFilters(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_default_timespan.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_default_timespan.py index 5b88dbc2..d45bbfdc 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_default_timespan.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_default_timespan.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class ApiDefaultTimespan(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class ApiDefaultTimespan(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_duration.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_duration.py index df8b1560..9cd0c111 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_duration.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_duration.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class ApiDuration(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class ApiDuration(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_duration_unit.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_duration_unit.py index c691fb12..c58cfe94 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_duration_unit.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_duration_unit.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_geo_map_widget.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_geo_map_widget.py index aa83b35c..eaa29358 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_geo_map_widget.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_geo_map_widget.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -75,6 +75,7 @@ class ApiGeoMapWidget(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -85,7 +86,7 @@ class ApiGeoMapWidget(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_graphlet_point.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_graphlet_point.py index 2e3cef7b..209271aa 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_graphlet_point.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_graphlet_point.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class ApiGraphletPoint(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class ApiGraphletPoint(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_grouped_barchart_widget.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_grouped_barchart_widget.py index d531e663..5bacf145 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_grouped_barchart_widget.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_grouped_barchart_widget.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -74,6 +74,7 @@ class ApiGroupedBarchartWidget(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -84,7 +85,7 @@ class ApiGroupedBarchartWidget(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_multi_metric_column.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_multi_metric_column.py index 549dbec7..7a7b986c 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_multi_metric_column.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_multi_metric_column.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -44,6 +44,7 @@ class ApiMultiMetricColumn(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -54,7 +55,7 @@ class ApiMultiMetricColumn(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_multi_metric_column_data.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_multi_metric_column_data.py index d6606739..e79931fd 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_multi_metric_column_data.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_multi_metric_column_data.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -39,6 +39,7 @@ class ApiMultiMetricColumnData(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -49,7 +50,7 @@ class ApiMultiMetricColumnData(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_multi_metric_table_widget.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_multi_metric_table_widget.py index c6aa414b..d210efe7 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_multi_metric_table_widget.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_multi_metric_table_widget.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -74,6 +74,7 @@ class ApiMultiMetricTableWidget(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -84,7 +85,7 @@ class ApiMultiMetricTableWidget(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_multi_search_filter_api_test_table_filter_key.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_multi_search_filter_api_test_table_filter_key.py index 890d36ea..a823069c 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_multi_search_filter_api_test_table_filter_key.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_multi_search_filter_api_test_table_filter_key.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class ApiMultiSearchFilterApiTestTableFilterKey(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class ApiMultiSearchFilterApiTestTableFilterKey(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_numbers_card.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_numbers_card.py index a92720b0..a721cea2 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_numbers_card.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_numbers_card.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -53,6 +53,7 @@ class ApiNumbersCard(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -63,7 +64,7 @@ class ApiNumbersCard(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_numbers_card_data.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_numbers_card_data.py index 8dfdba1e..54b00fbd 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_numbers_card_data.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_numbers_card_data.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -44,6 +44,7 @@ class ApiNumbersCardData(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -54,7 +55,7 @@ class ApiNumbersCardData(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_numbers_card_widget.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_numbers_card_widget.py index 4abbed51..d438570c 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_numbers_card_widget.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_numbers_card_widget.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -66,6 +66,7 @@ class ApiNumbersCardWidget(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -76,7 +77,7 @@ class ApiNumbersCardWidget(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_pie_chart_widget.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_pie_chart_widget.py index 852635cd..1790b352 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_pie_chart_widget.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_pie_chart_widget.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -66,6 +66,7 @@ class ApiPieChartWidget(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -76,7 +77,7 @@ class ApiPieChartWidget(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_report_data_component_label_map.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_report_data_component_label_map.py index ea40390f..606c1f75 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_report_data_component_label_map.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_report_data_component_label_map.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class ApiReportDataComponentLabelMap(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class ApiReportDataComponentLabelMap(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_report_data_component_label_map_entry.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_report_data_component_label_map_entry.py index 86862a29..ee2aa990 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_report_data_component_label_map_entry.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_report_data_component_label_map_entry.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class ApiReportDataComponentLabelMapEntry(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class ApiReportDataComponentLabelMapEntry(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_report_snapshot_time_span.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_report_snapshot_time_span.py index 4b7e2422..6c12be4f 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_report_snapshot_time_span.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_report_snapshot_time_span.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class ApiReportSnapshotTimeSpan(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class ApiReportSnapshotTimeSpan(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_stacked_area_chart_widget.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_stacked_area_chart_widget.py index 312d6d08..492bffeb 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_stacked_area_chart_widget.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_stacked_area_chart_widget.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -70,6 +70,7 @@ class ApiStackedAreaChartWidget(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -80,7 +81,7 @@ class ApiStackedAreaChartWidget(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_stacked_barchart_widget.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_stacked_barchart_widget.py index 1324891d..4e73c778 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_stacked_barchart_widget.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_stacked_barchart_widget.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -73,6 +73,7 @@ class ApiStackedBarchartWidget(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -83,7 +84,7 @@ class ApiStackedBarchartWidget(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_table_widget.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_table_widget.py index 4c4b8675..ec036337 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_table_widget.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_table_widget.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -73,6 +73,7 @@ class ApiTableWidget(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -83,7 +84,7 @@ class ApiTableWidget(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_test_table_data.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_test_table_data.py index a80d968d..330b50b4 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_test_table_data.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_test_table_data.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -40,6 +40,7 @@ class ApiTestTableData(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -50,7 +51,7 @@ class ApiTestTableData(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_test_table_graphlets_data.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_test_table_graphlets_data.py index 44bbfc0e..b0d4b560 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_test_table_graphlets_data.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_test_table_graphlets_data.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class ApiTestTableGraphletsData(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class ApiTestTableGraphletsData(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_test_table_widget.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_test_table_widget.py index 2d5c043e..37d47e8f 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_test_table_widget.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_test_table_widget.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -67,6 +67,7 @@ class ApiTestTableWidget(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -77,7 +78,7 @@ class ApiTestTableWidget(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_timeseries_widget.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_timeseries_widget.py index f7f1a21b..fd09b55f 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_timeseries_widget.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_timeseries_widget.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -72,6 +72,7 @@ class ApiTimeseriesWidget(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -82,7 +83,7 @@ class ApiTimeseriesWidget(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_widget.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_widget.py index 247de7db..8ea72968 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_widget.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_widget.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -31,7 +31,7 @@ from thousandeyes_sdk.dashboards.models.api_stacked_barchart_widget import ApiSt from thousandeyes_sdk.dashboards.models.api_table_widget import ApiTableWidget from thousandeyes_sdk.dashboards.models.api_test_table_widget import ApiTestTableWidget from thousandeyes_sdk.dashboards.models.api_timeseries_widget import ApiTimeseriesWidget -from pydantic import StrictStr, Field +from pydantic import StrictStr, Field, model_serializer from typing import Union, List, Set, Optional, Dict from typing_extensions import Literal, Self @@ -280,6 +280,10 @@ class ApiWidget(BaseModel): 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: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_widget_data.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_widget_data.py index 57d4234c..dcf447fa 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_widget_data.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_widget_data.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -40,6 +40,7 @@ class ApiWidgetData(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -50,7 +51,7 @@ class ApiWidgetData(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_widget_data_point.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_widget_data_point.py index 1003142b..6b13c414 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_widget_data_point.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_widget_data_point.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -37,6 +37,7 @@ class ApiWidgetDataPoint(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -47,7 +48,7 @@ class ApiWidgetDataPoint(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_widget_data_response.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_widget_data_response.py index c7e70807..7693e4ca 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_widget_data_response.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_widget_data_response.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -42,6 +42,7 @@ class ApiWidgetDataResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -52,7 +53,7 @@ class ApiWidgetDataResponse(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_widget_data_snapshot_response.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_widget_data_snapshot_response.py index 5c19dda3..91c3fb5f 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_widget_data_snapshot_response.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_widget_data_snapshot_response.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -42,6 +42,7 @@ class ApiWidgetDataSnapshotResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -52,7 +53,7 @@ class ApiWidgetDataSnapshotResponse(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_widget_filter_api_test_table_filter_key.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_widget_filter_api_test_table_filter_key.py index 177ef687..c3b72dce 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_widget_filter_api_test_table_filter_key.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_widget_filter_api_test_table_filter_key.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class ApiWidgetFilterApiTestTableFilterKey(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class ApiWidgetFilterApiTestTableFilterKey(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_widget_fixed_y_scale_prefix.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_widget_fixed_y_scale_prefix.py index 6b8f6481..dccc2a52 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_widget_fixed_y_scale_prefix.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_widget_fixed_y_scale_prefix.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_widget_measure.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_widget_measure.py index 7cc3f483..ef89a93c 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_widget_measure.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_widget_measure.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class ApiWidgetMeasure(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class ApiWidgetMeasure(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_widget_sort_direction.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_widget_sort_direction.py index 6673ddac..0de62868 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_widget_sort_direction.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_widget_sort_direction.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_widget_sort_property.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_widget_sort_property.py index 41dd21b1..95fad3f8 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_widget_sort_property.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_widget_sort_property.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_widgets_data_v2.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_widgets_data_v2.py index 606a3f45..7fd50fa8 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_widgets_data_v2.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/api_widgets_data_v2.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -52,6 +52,7 @@ class ApiWidgetsDataV2(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -62,7 +63,7 @@ class ApiWidgetsDataV2(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/app_and_self_links.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/app_and_self_links.py index 5b258465..08d45971 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/app_and_self_links.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/app_and_self_links.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class AppAndSelfLinks(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class AppAndSelfLinks(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/asw_repeat.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/asw_repeat.py index 4feed6f1..f8b2ed5b 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/asw_repeat.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/asw_repeat.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/asw_repeat_unit.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/asw_repeat_unit.py index a5c9e9cb..1b0e621b 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/asw_repeat_unit.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/asw_repeat_unit.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/box_and_whiskers_datasource.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/box_and_whiskers_datasource.py index 2f8587be..e48444d5 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/box_and_whiskers_datasource.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/box_and_whiskers_datasource.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/color_grid_datasource.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/color_grid_datasource.py index 225cdb74..8304828a 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/color_grid_datasource.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/color_grid_datasource.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. 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 ad3b5e4e..31aa6cad 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -53,6 +53,7 @@ class Dashboard(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -63,7 +64,7 @@ class Dashboard(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_global_filter_id.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_global_filter_id.py index de274388..eecb076e 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_global_filter_id.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_global_filter_id.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -33,6 +33,7 @@ class DashboardGlobalFilterId(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -43,7 +44,7 @@ class DashboardGlobalFilterId(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_links.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_links.py index 0c1dcad8..855662e4 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_links.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_links.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class DashboardLinks(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class DashboardLinks(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_metric.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_metric.py index d9465f81..8265bae2 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_metric.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_metric.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_metric_direction.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_metric_direction.py index 8283c142..1c6c1fc5 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_metric_direction.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_metric_direction.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_order.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_order.py index c15c9f47..387108d1 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_order.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_order.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_snapshot_response.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_snapshot_response.py index 86255e80..30070262 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_snapshot_response.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_snapshot_response.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class DashboardSnapshotResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class DashboardSnapshotResponse(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_snapshots_page.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_snapshots_page.py index 9e3483e7..2363e912 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_snapshots_page.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/dashboard_snapshots_page.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -37,6 +37,7 @@ class DashboardSnapshotsPage(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -47,7 +48,7 @@ class DashboardSnapshotsPage(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/default_timespan.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/default_timespan.py index 269c3785..ebdc2786 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/default_timespan.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/default_timespan.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -39,6 +39,7 @@ class DefaultTimespan(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -49,7 +50,7 @@ class DefaultTimespan(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/enterprise_agent_state.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/enterprise_agent_state.py index 9a45f63d..442e1b55 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/enterprise_agent_state.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/enterprise_agent_state.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/error.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/error.py index d9f55f26..2ea8f74c 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/error.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/error.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -37,6 +37,7 @@ class Error(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -47,7 +48,7 @@ class Error(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/generate_dashboard_snapshot_request.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/generate_dashboard_snapshot_request.py index 737448c8..40da299c 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/generate_dashboard_snapshot_request.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/generate_dashboard_snapshot_request.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -40,6 +40,7 @@ class GenerateDashboardSnapshotRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -50,7 +51,7 @@ class GenerateDashboardSnapshotRequest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/geo_map_datasource.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/geo_map_datasource.py index 76546f1b..6de8d248 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/geo_map_datasource.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/geo_map_datasource.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/grouped_bar_chart_datasource.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/grouped_bar_chart_datasource.py index 61fa42ad..7081614e 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/grouped_bar_chart_datasource.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/grouped_bar_chart_datasource.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/legacy_agent_widget_show.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/legacy_agent_widget_show.py index 63654d29..ebb747c0 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/legacy_agent_widget_show.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/legacy_agent_widget_show.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/legacy_agent_widget_type.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/legacy_agent_widget_type.py index 9c5f5979..16267160 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/legacy_agent_widget_type.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/legacy_agent_widget_type.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/legacy_alert_list_alert_type.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/legacy_alert_list_alert_type.py index 8e2a6e87..f6b46bfa 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/legacy_alert_list_alert_type.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/legacy_alert_list_alert_type.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/legacy_api_dashboard.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/legacy_api_dashboard.py index 03c755d1..77a8530d 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/legacy_api_dashboard.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/legacy_api_dashboard.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -39,6 +39,7 @@ class LegacyApiDashboard(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -49,7 +50,7 @@ class LegacyApiDashboard(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/legacy_dashboard_snapshot.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/legacy_dashboard_snapshot.py index 413001c1..6f223a9f 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/legacy_dashboard_snapshot.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/legacy_dashboard_snapshot.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -37,6 +37,7 @@ class LegacyDashboardSnapshot(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -47,7 +48,7 @@ class LegacyDashboardSnapshot(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/legacy_default_timespan.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/legacy_default_timespan.py index 461face1..8b1ba9ad 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/legacy_default_timespan.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/legacy_default_timespan.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class LegacyDefaultTimespan(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class LegacyDefaultTimespan(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/legacy_duration_unit.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/legacy_duration_unit.py index 5ca09fb9..6174549d 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/legacy_duration_unit.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/legacy_duration_unit.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/legacy_widget_sort_direction.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/legacy_widget_sort_direction.py index d86cf797..4b39fa29 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/legacy_widget_sort_direction.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/legacy_widget_sort_direction.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/legacy_widget_sort_property.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/legacy_widget_sort_property.py index f16023ca..5beedd49 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/legacy_widget_sort_property.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/legacy_widget_sort_property.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/link.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/link.py index 6b84cf3a..35c9fe79 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/link.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/link.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -40,6 +40,7 @@ class Link(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -50,7 +51,7 @@ class Link(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/metric_group.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/metric_group.py index 80f31823..d102ceed 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/metric_group.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/metric_group.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/multi_metrics_table_datasource.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/multi_metrics_table_datasource.py index 538df7ea..7660c5e6 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/multi_metrics_table_datasource.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/multi_metrics_table_datasource.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/numbers_card_datasource.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/numbers_card_datasource.py index 53e5d883..98c7192c 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/numbers_card_datasource.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/numbers_card_datasource.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/pagination_links.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/pagination_links.py index 859ac9de..8214f283 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/pagination_links.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/pagination_links.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class PaginationLinks(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class PaginationLinks(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/pie_chart_datasource.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/pie_chart_datasource.py index fc9eb963..503e9b9b 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/pie_chart_datasource.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/pie_chart_datasource.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/scalable_widget.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/scalable_widget.py index cb25cd59..00b30247 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/scalable_widget.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/scalable_widget.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class ScalableWidget(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class ScalableWidget(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/self_links.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/self_links.py index f9d054d9..810f8e04 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/self_links.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/self_links.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class SelfLinks(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class SelfLinks(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/stacked_area_chart_datasource.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/stacked_area_chart_datasource.py index 3fc5cf2e..5f80f8c2 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/stacked_area_chart_datasource.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/stacked_area_chart_datasource.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/stacked_bar_chart_datasource.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/stacked_bar_chart_datasource.py index 36e41328..90201e87 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/stacked_bar_chart_datasource.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/stacked_bar_chart_datasource.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/table_datasource.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/table_datasource.py index db4335bf..d2b01b93 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/table_datasource.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/table_datasource.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/test_table_datasource.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/test_table_datasource.py index 4d81971e..d170d51e 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/test_table_datasource.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/test_table_datasource.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/test_table_filter_key.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/test_table_filter_key.py index 4dc7b7b4..be5c5de3 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/test_table_filter_key.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/test_table_filter_key.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/test_table_filter_type.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/test_table_filter_type.py index 3393233c..f77224a7 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/test_table_filter_type.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/test_table_filter_type.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/timeseries_datasource.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/timeseries_datasource.py index d0261b5a..6a1ebadf 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/timeseries_datasource.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/timeseries_datasource.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/unauthorized_error.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/unauthorized_error.py index f09ec2e7..489ea277 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/unauthorized_error.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/unauthorized_error.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class UnauthorizedError(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class UnauthorizedError(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/update_snapshot_expiration_date_api_request.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/update_snapshot_expiration_date_api_request.py index 29973188..f72d9248 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/update_snapshot_expiration_date_api_request.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/update_snapshot_expiration_date_api_request.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class UpdateSnapshotExpirationDateApiRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class UpdateSnapshotExpirationDateApiRequest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/validation_error.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/validation_error.py index 4c058297..a012a837 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/validation_error.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/validation_error.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -39,6 +39,7 @@ class ValidationError(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -49,7 +50,7 @@ class ValidationError(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/validation_error_item.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/validation_error_item.py index 6392b709..fb9d280f 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/validation_error_item.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/validation_error_item.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,7 +17,7 @@ import pprint import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +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 @@ -27,7 +27,7 @@ class ValidationErrorItem(BaseModel): ValidationErrorItem """ # noqa: E501 code: Optional[StrictStr] = Field(default=None, description="(Optional) A unique error type/code that can be referenced in the documentation for further details.") - var_field: Optional[StrictInt] = Field(default=None, description="Identifies the field that triggered this particular error.", alias="field") + var_field: Optional[StrictStr] = Field(default=None, description="Identifies the field that triggered this particular error.", alias="field") message: Optional[StrictStr] = Field(default=None, description="A short, human-readable summary of the error.") __properties: ClassVar[List[str]] = ["code", "field", "message"] @@ -35,6 +35,7 @@ class ValidationErrorItem(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class ValidationErrorItem(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/visual_mode.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/visual_mode.py index ae8f18db..084a052e 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/visual_mode.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/visual_mode.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/widget.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/widget.py index e5ad4c34..36741c11 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/widget.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/widget.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -53,6 +53,7 @@ class Widget(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -63,7 +64,7 @@ class Widget(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/widget_measure_type.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/widget_measure_type.py index d6a4baf9..15a9aa89 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/widget_measure_type.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/widget_measure_type.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/widget_type.py b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/widget_type.py index 671260a7..1d50e4bd 100644 --- a/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/widget_type.py +++ b/thousandeyes-sdk-dashboards/src/thousandeyes_sdk/dashboards/models/widget_type.py @@ -5,7 +5,7 @@ Manage ThousandEyes Dashboards. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-dashboards/test/test_dashboard_snapshots_api.py b/thousandeyes-sdk-dashboards/test/test_dashboard_snapshots_api.py new file mode 100644 index 00000000..2c385aa1 --- /dev/null +++ b/thousandeyes-sdk-dashboards/test/test_dashboard_snapshots_api.py @@ -0,0 +1,1258 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.dashboards.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.dashboards.api.dashboard_snapshots_api import DashboardSnapshotsApi + + +class TestDashboardSnapshotsApi(unittest.TestCase): + """DashboardSnapshotsApi unit test stubs""" + + def setUp(self) -> None: + self.api = DashboardSnapshotsApi() + + def tearDown(self) -> None: + pass + + def test_create_dashboard_snapshot_models_validation(self) -> None: + """Test case for create_dashboard_snapshot request and response models""" + request_body_json = """ + { + "endDate" : "2023-05-16T10:14:28Z", + "dashboardId" : "646f4d2ce3c99b0536c3821e", + "displayName" : "snapshot from API", + "anonymizeData" : true, + "timezone" : "PST", + "startDate" : "2023-05-16T10:14:28Z", + "expirationDate" : "2023-05-16T10:14:28Z" + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.dashboards.models.GenerateDashboardSnapshotRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "snapshotId" : "d28bb71f-5a47-4783-8f12-d4b115e61b0c", + "_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" + } + } + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.dashboards.models.DashboardSnapshotResponse.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_delete_dashboard_snapshot_models_validation(self) -> None: + """Test case for delete_dashboard_snapshot request and response models""" + + + def test_get_dashboard_snapshot_models_validation(self) -> None: + """Test case for get_dashboard_snapshot request and response models""" + + response_body_json = """ + { + "snapshotId" : "d28bb71f-5a47-4783-8f12-d4b115e61b0c", + "_links" : { + "appLink" : { + "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" + } + }, + "apiLinks" : [ { + "key" : "" + }, { + "key" : "" + } ], + "snapshotExpirationDate" : "2023-05-16T10:14:28Z", + "isScheduled" : 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.0, + "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.0, + "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" + } ], + "accountId" : 1234, + "createdDate" : "2023-05-16 10:14:28", + "snapshotName" : "HTTP Server Dashboard Snapshot", + "timeSpan" : { + "duration" : 60, + "start" : "2023-05-16T10:14:28Z", + "startDate" : "2023-05-16 10:14:28" + }, + "permalink" : "https://app.thousandeyes.com/dashboard/?snapshotId=d28bb71f-5a47-4783-8f12-d4b115e61b0c", + "aid" : "1234", + "snapshotCreatedDate" : "2023-05-16T10:14:28Z", + "isShared" : true, + "dashboard" : { + "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" + } + }, + "dashboardModifiedBy" : "1", + "migratedReport" : 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.0, + "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.0, + "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" + }, + "globalFilterId" : "65babd9bb90bf55b17c96c8d", + "accountId" : 1234, + "apiLink" : [ { + "key" : "" + }, { + "key" : "" + } ], + "dashboardId" : "5e1f7a99143ae6004fdc3bb4", + "createdBy" : 1, + "globalOverride" : true, + "modifiedDate" : "2023-05-16 10:14:28", + "modifiedBy" : 1, + "isGlobalOverride" : true, + "aid" : "1234", + "dashboardModifiedDate" : "2023-05-16T10:14:28Z" + }, + "expirationDate" : "2023-05-16 10:14:28" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.dashboards.models.ApiDashboardSnapshot.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_dashboard_snapshot_widget_data_models_validation(self) -> None: + """Test case for get_dashboard_snapshot_widget_data request and response models""" + + response_body_json = """ + { + "groupLabels" : [ { + "groupProperty" : "AGENT", + "groupLabels" : [ { + "groupId" : "2565", + "groupLabel" : "San Francisco, CA" + }, { + "groupId" : "2565", + "groupLabel" : "San Francisco, CA" + } ] + }, { + "groupProperty" : "AGENT", + "groupLabels" : [ { + "groupId" : "2565", + "groupLabel" : "San Francisco, CA" + }, { + "groupId" : "2565", + "groupLabel" : "San Francisco, CA" + } ] + } ], + "data" : { + "alerts" : [ { + "alertType" : "network-end-to-end-server", + "durationInSeconds" : 25, + "alertSource" : "Http Test", + "active" : true, + "testId" : "56512", + "startTime" : "2023-06-02T08:54:00Z", + "alertId" : "2004945", + "ruleId" : "281724", + "alertRule" : "Http Test Rule" + }, { + "alertType" : "network-end-to-end-server", + "durationInSeconds" : 25, + "alertSource" : "Http Test", + "active" : true, + "testId" : "56512", + "startTime" : "2023-06-02T08:54:00Z", + "alertId" : "2004945", + "ruleId" : "281724", + "alertRule" : "Http Test Rule" + } ], + "summary" : { + "offline" : 2, + "online" : 10, + "disabled" : 3 + }, + "totalAlerts" : 500, + "cards" : [ { + "numberOfDataPoints" : 24192, + "endDate" : "2023-05-16T10:14:28Z", + "cardId" : "lrxxr", + "alertSuppressionWindows" : [ { + "testIds" : [ "281474976710661" ], + "repeatUnit" : "week", + "durationInSeconds" : 7200, + "repeat" : "custom", + "name" : "Test dashboards", + "repeatEvery" : 5, + "id" : "281474976710662", + "startTimes" : [ "2023-05-16T10:14:28Z" ] + }, { + "testIds" : [ "281474976710661" ], + "repeatUnit" : "week", + "durationInSeconds" : 7200, + "repeat" : "custom", + "name" : "Test dashboards", + "repeatEvery" : 5, + "id" : "281474976710662", + "startTimes" : [ "2023-05-16T10:14:28Z" ] + } ], + "binSize" : 3600, + "previousValue" : 500.0, + "value" : 100.0, + "startDate" : "2023-05-16T10:14:28Z", + "timestamp" : 1567620000, + "status" : "No data" + }, { + "numberOfDataPoints" : 24192, + "endDate" : "2023-05-16T10:14:28Z", + "cardId" : "lrxxr", + "alertSuppressionWindows" : [ { + "testIds" : [ "281474976710661" ], + "repeatUnit" : "week", + "durationInSeconds" : 7200, + "repeat" : "custom", + "name" : "Test dashboards", + "repeatEvery" : 5, + "id" : "281474976710662", + "startTimes" : [ "2023-05-16T10:14:28Z" ] + }, { + "testIds" : [ "281474976710661" ], + "repeatUnit" : "week", + "durationInSeconds" : 7200, + "repeat" : "custom", + "name" : "Test dashboards", + "repeatEvery" : 5, + "id" : "281474976710662", + "startTimes" : [ "2023-05-16T10:14:28Z" ] + } ], + "binSize" : 3600, + "previousValue" : 500.0, + "value" : 100.0, + "startDate" : "2023-05-16T10:14:28Z", + "timestamp" : 1567620000, + "status" : "No data" + } ], + "tests" : [ { + "graphlets" : [ { + "metric" : "Availability", + "testId" : "68257", + "points" : [ { + "x" : 1580403900, + "y" : 128.249 + }, { + "x" : 1580403900, + "y" : 128.249 + } ] + }, { + "metric" : "Availability", + "testId" : "68257", + "points" : [ { + "x" : 1580403900, + "y" : 128.249 + }, { + "x" : 1580403900, + "y" : 128.249 + } ] + } ], + "alertCount" : 398, + "testType" : "Web - HTTP Server", + "testId" : "68256", + "isShared" : true, + "testName" : "Http Test Name", + "target" : "www.google.com" + }, { + "graphlets" : [ { + "metric" : "Availability", + "testId" : "68257", + "points" : [ { + "x" : 1580403900, + "y" : 128.249 + }, { + "x" : 1580403900, + "y" : 128.249 + } ] + }, { + "metric" : "Availability", + "testId" : "68257", + "points" : [ { + "x" : 1580403900, + "y" : 128.249 + }, { + "x" : 1580403900, + "y" : 128.249 + } ] + } ], + "alertCount" : 398, + "testType" : "Web - HTTP Server", + "testId" : "68256", + "isShared" : true, + "testName" : "Http Test Name", + "target" : "www.google.com" + } ], + "columns" : [ { + "columnId" : "938to", + "alertSuppressionWindows" : [ { + "testIds" : [ "281474976710661" ], + "repeatUnit" : "week", + "durationInSeconds" : 7200, + "repeat" : "custom", + "name" : "Test dashboards", + "repeatEvery" : 5, + "id" : "281474976710662", + "startTimes" : [ "2023-05-16T10:14:28Z" ] + }, { + "testIds" : [ "281474976710661" ], + "repeatUnit" : "week", + "durationInSeconds" : 7200, + "repeat" : "custom", + "name" : "Test dashboards", + "repeatEvery" : 5, + "id" : "281474976710662", + "startTimes" : [ "2023-05-16T10:14:28Z" ] + } ], + "binSize" : 3600, + "points" : [ { + "numberOfDataPoints" : 23304, + "groups" : [ { + "groupProperty" : "COUNTRY", + "groupValue" : "US" + }, { + "groupProperty" : "COUNTRY", + "groupValue" : "US" + } ], + "value" : 100.0, + "timestamp" : 1567620000 + }, { + "numberOfDataPoints" : 23304, + "groups" : [ { + "groupProperty" : "COUNTRY", + "groupValue" : "US" + }, { + "groupProperty" : "COUNTRY", + "groupValue" : "US" + } ], + "value" : 100.0, + "timestamp" : 1567620000 + } ], + "status" : "No data" + }, { + "columnId" : "938to", + "alertSuppressionWindows" : [ { + "testIds" : [ "281474976710661" ], + "repeatUnit" : "week", + "durationInSeconds" : 7200, + "repeat" : "custom", + "name" : "Test dashboards", + "repeatEvery" : 5, + "id" : "281474976710662", + "startTimes" : [ "2023-05-16T10:14:28Z" ] + }, { + "testIds" : [ "281474976710661" ], + "repeatUnit" : "week", + "durationInSeconds" : 7200, + "repeat" : "custom", + "name" : "Test dashboards", + "repeatEvery" : 5, + "id" : "281474976710662", + "startTimes" : [ "2023-05-16T10:14:28Z" ] + } ], + "binSize" : 3600, + "points" : [ { + "numberOfDataPoints" : 23304, + "groups" : [ { + "groupProperty" : "COUNTRY", + "groupValue" : "US" + }, { + "groupProperty" : "COUNTRY", + "groupValue" : "US" + } ], + "value" : 100.0, + "timestamp" : 1567620000 + }, { + "numberOfDataPoints" : 23304, + "groups" : [ { + "groupProperty" : "COUNTRY", + "groupValue" : "US" + }, { + "groupProperty" : "COUNTRY", + "groupValue" : "US" + } ], + "value" : 100.0, + "timestamp" : 1567620000 + } ], + "status" : "No data" + } ], + "alertSuppressionWindows" : [ { + "testIds" : [ "281474976710661" ], + "repeatUnit" : "week", + "durationInSeconds" : 7200, + "repeat" : "custom", + "name" : "Test dashboards", + "repeatEvery" : 5, + "id" : "281474976710662", + "startTimes" : [ "2023-05-16T10:14:28Z" ] + }, { + "testIds" : [ "281474976710661" ], + "repeatUnit" : "week", + "durationInSeconds" : 7200, + "repeat" : "custom", + "name" : "Test dashboards", + "repeatEvery" : 5, + "id" : "281474976710662", + "startTimes" : [ "2023-05-16T10:14:28Z" ] + } ], + "activeAlerts" : 483, + "startRound" : 1384309800, + "points" : [ { + "numberOfDataPoints" : 23304, + "groups" : [ { + "groupProperty" : "COUNTRY", + "groupValue" : "US" + }, { + "groupProperty" : "COUNTRY", + "groupValue" : "US" + } ], + "value" : 100.0, + "timestamp" : 1567620000 + }, { + "numberOfDataPoints" : 23304, + "groups" : [ { + "groupProperty" : "COUNTRY", + "groupValue" : "US" + }, { + "groupProperty" : "COUNTRY", + "groupValue" : "US" + } ], + "value" : 100.0, + "timestamp" : 1567620000 + } ], + "agents" : [ { + "agentId" : "6522", + "agentName" : "0c3898000117", + "location" : { + "locationName" : "San Francisco, California, US", + "latitude" : 37.77493, + "longitude" : -122.41942 + }, + "ipInfo" : { + "ipv6" : "ipv6", + "privateIp" : "172.58.92.31", + "operativeSystemVersion" : "operativeSystemVersion", + "publicIp" : "172.58.92.31" + }, + "status" : "online" + }, { + "agentId" : "6522", + "agentName" : "0c3898000117", + "location" : { + "locationName" : "San Francisco, California, US", + "latitude" : 37.77493, + "longitude" : -122.41942 + }, + "ipInfo" : { + "ipv6" : "ipv6", + "privateIp" : "172.58.92.31", + "operativeSystemVersion" : "operativeSystemVersion", + "publicIp" : "172.58.92.31" + }, + "status" : "online" + } ], + "status" : "No data" + }, + "endDate" : "2022-07-18T22:00:54Z", + "_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" + } + }, + "binSize" : 3600, + "startDate" : "2022-07-17T22:00:54Z" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.dashboards.models.ApiWidgetDataSnapshotResponse.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_dashboard_snapshots_models_validation(self) -> None: + """Test case for get_dashboard_snapshots request and response models""" + + response_body_json = """ + { + "pages" : { + "key" : "" + }, + "_links" : { + "next" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + }, + "previous" : { + "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" + } + }, + "dashboardSnapshots" : [ { + "snapshotId" : "d28bb71f-5a47-4783-8f12-d4b115e61b0c", + "_links" : { + "appLink" : { + "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" + } + }, + "apiLinks" : [ { + "key" : "" + }, { + "key" : "" + } ], + "snapshotExpirationDate" : "2023-05-16T10:14:28Z", + "isScheduled" : 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.0, + "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.0, + "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" + } ], + "accountId" : 1234, + "createdDate" : "2023-05-16 10:14:28", + "snapshotName" : "HTTP Server Dashboard Snapshot", + "timeSpan" : { + "duration" : 60, + "start" : "2023-05-16T10:14:28Z", + "startDate" : "2023-05-16 10:14:28" + }, + "permalink" : "https://app.thousandeyes.com/dashboard/?snapshotId=d28bb71f-5a47-4783-8f12-d4b115e61b0c", + "aid" : "1234", + "snapshotCreatedDate" : "2023-05-16T10:14:28Z", + "isShared" : true, + "dashboard" : { + "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" + } + }, + "dashboardModifiedBy" : "1", + "migratedReport" : 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.0, + "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.0, + "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" + }, + "globalFilterId" : "65babd9bb90bf55b17c96c8d", + "accountId" : 1234, + "apiLink" : [ { + "key" : "" + }, { + "key" : "" + } ], + "dashboardId" : "5e1f7a99143ae6004fdc3bb4", + "createdBy" : 1, + "globalOverride" : true, + "modifiedDate" : "2023-05-16 10:14:28", + "modifiedBy" : 1, + "isGlobalOverride" : true, + "aid" : "1234", + "dashboardModifiedDate" : "2023-05-16T10:14:28Z" + }, + "expirationDate" : "2023-05-16 10:14:28" + }, { + "snapshotId" : "d28bb71f-5a47-4783-8f12-d4b115e61b0c", + "_links" : { + "appLink" : { + "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" + } + }, + "apiLinks" : [ { + "key" : "" + }, { + "key" : "" + } ], + "snapshotExpirationDate" : "2023-05-16T10:14:28Z", + "isScheduled" : 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.0, + "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.0, + "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" + } ], + "accountId" : 1234, + "createdDate" : "2023-05-16 10:14:28", + "snapshotName" : "HTTP Server Dashboard Snapshot", + "timeSpan" : { + "duration" : 60, + "start" : "2023-05-16T10:14:28Z", + "startDate" : "2023-05-16 10:14:28" + }, + "permalink" : "https://app.thousandeyes.com/dashboard/?snapshotId=d28bb71f-5a47-4783-8f12-d4b115e61b0c", + "aid" : "1234", + "snapshotCreatedDate" : "2023-05-16T10:14:28Z", + "isShared" : true, + "dashboard" : { + "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" + } + }, + "dashboardModifiedBy" : "1", + "migratedReport" : 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.0, + "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.0, + "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" + }, + "globalFilterId" : "65babd9bb90bf55b17c96c8d", + "accountId" : 1234, + "apiLink" : [ { + "key" : "" + }, { + "key" : "" + } ], + "dashboardId" : "5e1f7a99143ae6004fdc3bb4", + "createdBy" : 1, + "globalOverride" : true, + "modifiedDate" : "2023-05-16 10:14:28", + "modifiedBy" : 1, + "isGlobalOverride" : true, + "aid" : "1234", + "dashboardModifiedDate" : "2023-05-16T10:14:28Z" + }, + "expirationDate" : "2023-05-16 10:14:28" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.dashboards.models.DashboardSnapshotsPage.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_update_dashboard_snapshot_expiration_date_models_validation(self) -> None: + """Test case for update_dashboard_snapshot_expiration_date request and response models""" + request_body_json = """ + { + "snapshotExpirationDate" : "2023-05-16T10:14:28Z", + "expirationDate" : "2023-05-16 10:14:28" + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.dashboards.models.UpdateSnapshotExpirationDateApiRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + + +if __name__ == '__main__': + unittest.main() diff --git a/thousandeyes-sdk-dashboards/test/test_dashboards_api.py b/thousandeyes-sdk-dashboards/test/test_dashboards_api.py new file mode 100644 index 00000000..44f8b313 --- /dev/null +++ b/thousandeyes-sdk-dashboards/test/test_dashboards_api.py @@ -0,0 +1,1345 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.dashboards.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.dashboards.api.dashboards_api import DashboardsApi + + +class TestDashboardsApi(unittest.TestCase): + """DashboardsApi unit test stubs""" + + def setUp(self) -> None: + self.api = DashboardsApi() + + def tearDown(self) -> None: + pass + + def test_create_dashboard_models_validation(self) -> None: + """Test case for create_dashboard request and response models""" + 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.0, + "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.0, + "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" + }, + "globalFilterId" : "65babd9bb90bf55b17c96c8d", + "dashboardId" : "5e1f7a99143ae6004fdc3bb4", + "createdBy" : "1", + "modifiedDate" : "2023-05-16T10:14:28Z", + "modifiedBy" : "1", + "isGlobalOverride" : true, + "aid" : "1234" + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.dashboards.models.Dashboard.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.0, + "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.0, + "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" + }, + "globalFilterId" : "65babd9bb90bf55b17c96c8d", + "dashboardId" : "5e1f7a99143ae6004fdc3bb4", + "createdBy" : "1", + "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_delete_dashboard_models_validation(self) -> None: + """Test case for delete_dashboard request and response models""" + + + def test_get_dashboard_models_validation(self) -> None: + """Test case for get_dashboard request and response models""" + + 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" + } + }, + "dashboardModifiedBy" : "1", + "migratedReport" : 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.0, + "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.0, + "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" + }, + "globalFilterId" : "65babd9bb90bf55b17c96c8d", + "accountId" : 1234, + "apiLink" : [ { + "key" : "" + }, { + "key" : "" + } ], + "dashboardId" : "5e1f7a99143ae6004fdc3bb4", + "createdBy" : 1, + "globalOverride" : true, + "modifiedDate" : "2023-05-16 10:14:28", + "modifiedBy" : 1, + "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) + + def test_get_dashboard_widget_data_models_validation(self) -> None: + """Test case for get_dashboard_widget_data request and response models""" + + response_body_json = """ + { + "groupLabels" : [ { + "groupProperty" : "AGENT", + "groupLabels" : [ { + "groupId" : "2565", + "groupLabel" : "San Francisco, CA" + }, { + "groupId" : "2565", + "groupLabel" : "San Francisco, CA" + } ] + }, { + "groupProperty" : "AGENT", + "groupLabels" : [ { + "groupId" : "2565", + "groupLabel" : "San Francisco, CA" + }, { + "groupId" : "2565", + "groupLabel" : "San Francisco, CA" + } ] + } ], + "data" : { + "alerts" : [ { + "alertType" : "network-end-to-end-server", + "durationInSeconds" : 25, + "alertSource" : "Http Test", + "active" : true, + "testId" : "56512", + "startTime" : "2023-06-02T08:54:00Z", + "alertId" : "2004945", + "ruleId" : "281724", + "alertRule" : "Http Test Rule" + }, { + "alertType" : "network-end-to-end-server", + "durationInSeconds" : 25, + "alertSource" : "Http Test", + "active" : true, + "testId" : "56512", + "startTime" : "2023-06-02T08:54:00Z", + "alertId" : "2004945", + "ruleId" : "281724", + "alertRule" : "Http Test Rule" + } ], + "summary" : { + "offline" : 2, + "online" : 10, + "disabled" : 3 + }, + "totalAlerts" : 500, + "cards" : [ { + "numberOfDataPoints" : 24192, + "endDate" : "2023-05-16T10:14:28Z", + "cardId" : "lrxxr", + "alertSuppressionWindows" : [ { + "testIds" : [ "281474976710661" ], + "repeatUnit" : "week", + "durationInSeconds" : 7200, + "repeat" : "custom", + "name" : "Test dashboards", + "repeatEvery" : 5, + "id" : "281474976710662", + "startTimes" : [ "2023-05-16T10:14:28Z" ] + }, { + "testIds" : [ "281474976710661" ], + "repeatUnit" : "week", + "durationInSeconds" : 7200, + "repeat" : "custom", + "name" : "Test dashboards", + "repeatEvery" : 5, + "id" : "281474976710662", + "startTimes" : [ "2023-05-16T10:14:28Z" ] + } ], + "binSize" : 3600, + "previousValue" : 500.0, + "value" : 100.0, + "startDate" : "2023-05-16T10:14:28Z", + "timestamp" : 1567620000, + "status" : "No data" + }, { + "numberOfDataPoints" : 24192, + "endDate" : "2023-05-16T10:14:28Z", + "cardId" : "lrxxr", + "alertSuppressionWindows" : [ { + "testIds" : [ "281474976710661" ], + "repeatUnit" : "week", + "durationInSeconds" : 7200, + "repeat" : "custom", + "name" : "Test dashboards", + "repeatEvery" : 5, + "id" : "281474976710662", + "startTimes" : [ "2023-05-16T10:14:28Z" ] + }, { + "testIds" : [ "281474976710661" ], + "repeatUnit" : "week", + "durationInSeconds" : 7200, + "repeat" : "custom", + "name" : "Test dashboards", + "repeatEvery" : 5, + "id" : "281474976710662", + "startTimes" : [ "2023-05-16T10:14:28Z" ] + } ], + "binSize" : 3600, + "previousValue" : 500.0, + "value" : 100.0, + "startDate" : "2023-05-16T10:14:28Z", + "timestamp" : 1567620000, + "status" : "No data" + } ], + "tests" : [ { + "graphlets" : [ { + "metric" : "Availability", + "testId" : "68257", + "points" : [ { + "x" : 1580403900, + "y" : 128.249 + }, { + "x" : 1580403900, + "y" : 128.249 + } ] + }, { + "metric" : "Availability", + "testId" : "68257", + "points" : [ { + "x" : 1580403900, + "y" : 128.249 + }, { + "x" : 1580403900, + "y" : 128.249 + } ] + } ], + "alertCount" : 398, + "testType" : "Web - HTTP Server", + "testId" : "68256", + "isShared" : true, + "testName" : "Http Test Name", + "target" : "www.google.com" + }, { + "graphlets" : [ { + "metric" : "Availability", + "testId" : "68257", + "points" : [ { + "x" : 1580403900, + "y" : 128.249 + }, { + "x" : 1580403900, + "y" : 128.249 + } ] + }, { + "metric" : "Availability", + "testId" : "68257", + "points" : [ { + "x" : 1580403900, + "y" : 128.249 + }, { + "x" : 1580403900, + "y" : 128.249 + } ] + } ], + "alertCount" : 398, + "testType" : "Web - HTTP Server", + "testId" : "68256", + "isShared" : true, + "testName" : "Http Test Name", + "target" : "www.google.com" + } ], + "columns" : [ { + "columnId" : "938to", + "alertSuppressionWindows" : [ { + "testIds" : [ "281474976710661" ], + "repeatUnit" : "week", + "durationInSeconds" : 7200, + "repeat" : "custom", + "name" : "Test dashboards", + "repeatEvery" : 5, + "id" : "281474976710662", + "startTimes" : [ "2023-05-16T10:14:28Z" ] + }, { + "testIds" : [ "281474976710661" ], + "repeatUnit" : "week", + "durationInSeconds" : 7200, + "repeat" : "custom", + "name" : "Test dashboards", + "repeatEvery" : 5, + "id" : "281474976710662", + "startTimes" : [ "2023-05-16T10:14:28Z" ] + } ], + "binSize" : 3600, + "points" : [ { + "numberOfDataPoints" : 23304, + "groups" : [ { + "groupProperty" : "COUNTRY", + "groupValue" : "US" + }, { + "groupProperty" : "COUNTRY", + "groupValue" : "US" + } ], + "value" : 100.0, + "timestamp" : 1567620000 + }, { + "numberOfDataPoints" : 23304, + "groups" : [ { + "groupProperty" : "COUNTRY", + "groupValue" : "US" + }, { + "groupProperty" : "COUNTRY", + "groupValue" : "US" + } ], + "value" : 100.0, + "timestamp" : 1567620000 + } ], + "status" : "No data" + }, { + "columnId" : "938to", + "alertSuppressionWindows" : [ { + "testIds" : [ "281474976710661" ], + "repeatUnit" : "week", + "durationInSeconds" : 7200, + "repeat" : "custom", + "name" : "Test dashboards", + "repeatEvery" : 5, + "id" : "281474976710662", + "startTimes" : [ "2023-05-16T10:14:28Z" ] + }, { + "testIds" : [ "281474976710661" ], + "repeatUnit" : "week", + "durationInSeconds" : 7200, + "repeat" : "custom", + "name" : "Test dashboards", + "repeatEvery" : 5, + "id" : "281474976710662", + "startTimes" : [ "2023-05-16T10:14:28Z" ] + } ], + "binSize" : 3600, + "points" : [ { + "numberOfDataPoints" : 23304, + "groups" : [ { + "groupProperty" : "COUNTRY", + "groupValue" : "US" + }, { + "groupProperty" : "COUNTRY", + "groupValue" : "US" + } ], + "value" : 100.0, + "timestamp" : 1567620000 + }, { + "numberOfDataPoints" : 23304, + "groups" : [ { + "groupProperty" : "COUNTRY", + "groupValue" : "US" + }, { + "groupProperty" : "COUNTRY", + "groupValue" : "US" + } ], + "value" : 100.0, + "timestamp" : 1567620000 + } ], + "status" : "No data" + } ], + "alertSuppressionWindows" : [ { + "testIds" : [ "281474976710661" ], + "repeatUnit" : "week", + "durationInSeconds" : 7200, + "repeat" : "custom", + "name" : "Test dashboards", + "repeatEvery" : 5, + "id" : "281474976710662", + "startTimes" : [ "2023-05-16T10:14:28Z" ] + }, { + "testIds" : [ "281474976710661" ], + "repeatUnit" : "week", + "durationInSeconds" : 7200, + "repeat" : "custom", + "name" : "Test dashboards", + "repeatEvery" : 5, + "id" : "281474976710662", + "startTimes" : [ "2023-05-16T10:14:28Z" ] + } ], + "activeAlerts" : 483, + "startRound" : 1384309800, + "points" : [ { + "numberOfDataPoints" : 23304, + "groups" : [ { + "groupProperty" : "COUNTRY", + "groupValue" : "US" + }, { + "groupProperty" : "COUNTRY", + "groupValue" : "US" + } ], + "value" : 100.0, + "timestamp" : 1567620000 + }, { + "numberOfDataPoints" : 23304, + "groups" : [ { + "groupProperty" : "COUNTRY", + "groupValue" : "US" + }, { + "groupProperty" : "COUNTRY", + "groupValue" : "US" + } ], + "value" : 100.0, + "timestamp" : 1567620000 + } ], + "agents" : [ { + "agentId" : "6522", + "agentName" : "0c3898000117", + "location" : { + "locationName" : "San Francisco, California, US", + "latitude" : 37.77493, + "longitude" : -122.41942 + }, + "ipInfo" : { + "ipv6" : "ipv6", + "privateIp" : "172.58.92.31", + "operativeSystemVersion" : "operativeSystemVersion", + "publicIp" : "172.58.92.31" + }, + "status" : "online" + }, { + "agentId" : "6522", + "agentName" : "0c3898000117", + "location" : { + "locationName" : "San Francisco, California, US", + "latitude" : 37.77493, + "longitude" : -122.41942 + }, + "ipInfo" : { + "ipv6" : "ipv6", + "privateIp" : "172.58.92.31", + "operativeSystemVersion" : "operativeSystemVersion", + "publicIp" : "172.58.92.31" + }, + "status" : "online" + } ], + "status" : "No data" + }, + "endDate" : "2022-07-18T22:00:54Z", + "_links" : { + "next" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + }, + "previous" : { + "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" + } + }, + "binSize" : 3600, + "startDate" : "2022-07-17T22:00:54Z" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.dashboards.models.ApiWidgetDataResponse.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_dashboards_models_validation(self) -> None: + """Test case for get_dashboards request and response models""" + + 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" + } + }, + "dashboardModifiedBy" : "1", + "migratedReport" : 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.0, + "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.0, + "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" + }, + "globalFilterId" : "65babd9bb90bf55b17c96c8d", + "accountId" : 1234, + "apiLink" : [ { + "key" : "" + }, { + "key" : "" + } ], + "dashboardId" : "5e1f7a99143ae6004fdc3bb4", + "createdBy" : 1, + "globalOverride" : true, + "modifiedDate" : "2023-05-16 10:14:28", + "modifiedBy" : 1, + "isGlobalOverride" : true, + "aid" : "1234", + "dashboardModifiedDate" : "2023-05-16T10:14:28Z" + }, { + "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" + } + }, + "dashboardModifiedBy" : "1", + "migratedReport" : 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.0, + "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.0, + "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" + }, + "globalFilterId" : "65babd9bb90bf55b17c96c8d", + "accountId" : 1234, + "apiLink" : [ { + "key" : "" + }, { + "key" : "" + } ], + "dashboardId" : "5e1f7a99143ae6004fdc3bb4", + "createdBy" : 1, + "globalOverride" : true, + "modifiedDate" : "2023-05-16 10:14:28", + "modifiedBy" : 1, + "isGlobalOverride" : true, + "aid" : "1234", + "dashboardModifiedDate" : "2023-05-16T10:14:28Z" + } ]""" + + response_loaded_json = json.loads(response_body_json) + response_from_dict = [thousandeyes_sdk.dashboards.models.ApiDashboard.from_dict(value) for value in response_loaded_json] + self.assertGreater(response_from_dict.__len__(), 0) + for index, element in enumerate(response_from_dict): + self.assertIsNotNone(element) + assert_constructed_model_matches_example_json(element, response_loaded_json[index]) + + def test_update_dashboard_models_validation(self) -> None: + """Test case for update_dashboard request and response models""" + 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.0, + "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.0, + "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" + }, + "globalFilterId" : "65babd9bb90bf55b17c96c8d", + "dashboardId" : "5e1f7a99143ae6004fdc3bb4", + "createdBy" : "1", + "modifiedDate" : "2023-05-16T10:14:28Z", + "modifiedBy" : "1", + "isGlobalOverride" : true, + "aid" : "1234" + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.dashboards.models.Dashboard.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.0, + "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.0, + "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" + }, + "globalFilterId" : "65babd9bb90bf55b17c96c8d", + "dashboardId" : "5e1f7a99143ae6004fdc3bb4", + "createdBy" : "1", + "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) + + +if __name__ == '__main__': + unittest.main() diff --git a/thousandeyes-sdk-dashboards/test/test_dashboards_filters_api.py b/thousandeyes-sdk-dashboards/test/test_dashboards_filters_api.py new file mode 100644 index 00000000..9104588d --- /dev/null +++ b/thousandeyes-sdk-dashboards/test/test_dashboards_filters_api.py @@ -0,0 +1,394 @@ +# coding: utf-8 + +""" + Dashboards API + + Manage ThousandEyes Dashboards. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.dashboards.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.dashboards.api.dashboards_filters_api import DashboardsFiltersApi + + +class TestDashboardsFiltersApi(unittest.TestCase): + """DashboardsFiltersApi unit test stubs""" + + def setUp(self) -> None: + self.api = DashboardsFiltersApi() + + def tearDown(self) -> None: + pass + + def test_create_dashboard_filter_models_validation(self) -> None: + """Test case for create_dashboard_filter request and response models""" + request_body_json = """ + { + "context" : [ { + "dataSourceId" : "VIRTUAL_AGENT", + "filters" : [ { + "filterId" : "TEST_LABEL", + "metricIds" : [ "WEB_PAGE_LOAD_COMPLETION_RATE", "WEB_TTFB", "WEB_AVAILABILITY" ], + "values" : [ "45862", "59749" ] + }, { + "filterId" : "TEST_LABEL", + "metricIds" : [ "WEB_PAGE_LOAD_COMPLETION_RATE", "WEB_TTFB", "WEB_AVAILABILITY" ], + "values" : [ "45862", "59749" ] + } ] + }, { + "dataSourceId" : "VIRTUAL_AGENT", + "filters" : [ { + "filterId" : "TEST_LABEL", + "metricIds" : [ "WEB_PAGE_LOAD_COMPLETION_RATE", "WEB_TTFB", "WEB_AVAILABILITY" ], + "values" : [ "45862", "59749" ] + }, { + "filterId" : "TEST_LABEL", + "metricIds" : [ "WEB_PAGE_LOAD_COMPLETION_RATE", "WEB_TTFB", "WEB_AVAILABILITY" ], + "values" : [ "45862", "59749" ] + } ] + } ], + "name" : "cea-filter", + "description" : "Global filter for CEA widgets" + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.dashboards.models.ApiContextFilterRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "createdDate" : "2024-02-01T22:19:19Z", + "createdBy" : { + "uid" : "1", + "name" : "Test User" + }, + "_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" + } + }, + "context" : [ { + "dataSourceId" : "VIRTUAL_AGENT", + "filters" : [ { + "filterId" : "TEST_LABEL", + "metricIds" : [ "WEB_PAGE_LOAD_COMPLETION_RATE", "WEB_TTFB", "WEB_AVAILABILITY" ], + "values" : [ "45862", "59749" ] + }, { + "filterId" : "TEST_LABEL", + "metricIds" : [ "WEB_PAGE_LOAD_COMPLETION_RATE", "WEB_TTFB", "WEB_AVAILABILITY" ], + "values" : [ "45862", "59749" ] + } ] + }, { + "dataSourceId" : "VIRTUAL_AGENT", + "filters" : [ { + "filterId" : "TEST_LABEL", + "metricIds" : [ "WEB_PAGE_LOAD_COMPLETION_RATE", "WEB_TTFB", "WEB_AVAILABILITY" ], + "values" : [ "45862", "59749" ] + }, { + "filterId" : "TEST_LABEL", + "metricIds" : [ "WEB_PAGE_LOAD_COMPLETION_RATE", "WEB_TTFB", "WEB_AVAILABILITY" ], + "values" : [ "45862", "59749" ] + } ] + } ], + "name" : "cea-filter", + "modifiedDate" : "2024-02-01T22:19:19Z", + "description" : "Global filter for CEA widgets", + "modifiedBy" : { + "uid" : "1", + "name" : "Test User" + }, + "id" : "65bc18e8f2073a4a469cd958", + "aid" : "11" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.dashboards.models.ApiContextFilterResponse.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_delete_dashboard_filter_models_validation(self) -> None: + """Test case for delete_dashboard_filter request and response models""" + + + def test_get_dashboard_filter_models_validation(self) -> None: + """Test case for get_dashboard_filter request and response models""" + + response_body_json = """ + { + "createdDate" : "2024-02-01T22:19:19Z", + "createdBy" : { + "uid" : "1", + "name" : "Test User" + }, + "_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" + } + }, + "context" : [ { + "dataSourceId" : "VIRTUAL_AGENT", + "filters" : [ { + "filterId" : "TEST_LABEL", + "metricIds" : [ "WEB_PAGE_LOAD_COMPLETION_RATE", "WEB_TTFB", "WEB_AVAILABILITY" ], + "values" : [ "45862", "59749" ] + }, { + "filterId" : "TEST_LABEL", + "metricIds" : [ "WEB_PAGE_LOAD_COMPLETION_RATE", "WEB_TTFB", "WEB_AVAILABILITY" ], + "values" : [ "45862", "59749" ] + } ] + }, { + "dataSourceId" : "VIRTUAL_AGENT", + "filters" : [ { + "filterId" : "TEST_LABEL", + "metricIds" : [ "WEB_PAGE_LOAD_COMPLETION_RATE", "WEB_TTFB", "WEB_AVAILABILITY" ], + "values" : [ "45862", "59749" ] + }, { + "filterId" : "TEST_LABEL", + "metricIds" : [ "WEB_PAGE_LOAD_COMPLETION_RATE", "WEB_TTFB", "WEB_AVAILABILITY" ], + "values" : [ "45862", "59749" ] + } ] + } ], + "name" : "cea-filter", + "modifiedDate" : "2024-02-01T22:19:19Z", + "description" : "Global filter for CEA widgets", + "modifiedBy" : { + "uid" : "1", + "name" : "Test User" + }, + "id" : "65bc18e8f2073a4a469cd958", + "aid" : "11" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.dashboards.models.ApiContextFilterResponse.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_dashboards_filters_models_validation(self) -> None: + """Test case for get_dashboards_filters request and response models""" + + response_body_json = """ + { + "dashboardFilters" : [ { + "createdDate" : "2024-02-01T22:19:19Z", + "createdBy" : { + "uid" : "1", + "name" : "Test User" + }, + "_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" + } + }, + "context" : [ { + "dataSourceId" : "VIRTUAL_AGENT", + "filters" : [ { + "filterId" : "TEST_LABEL", + "metricIds" : [ "WEB_PAGE_LOAD_COMPLETION_RATE", "WEB_TTFB", "WEB_AVAILABILITY" ], + "values" : [ "45862", "59749" ] + }, { + "filterId" : "TEST_LABEL", + "metricIds" : [ "WEB_PAGE_LOAD_COMPLETION_RATE", "WEB_TTFB", "WEB_AVAILABILITY" ], + "values" : [ "45862", "59749" ] + } ] + }, { + "dataSourceId" : "VIRTUAL_AGENT", + "filters" : [ { + "filterId" : "TEST_LABEL", + "metricIds" : [ "WEB_PAGE_LOAD_COMPLETION_RATE", "WEB_TTFB", "WEB_AVAILABILITY" ], + "values" : [ "45862", "59749" ] + }, { + "filterId" : "TEST_LABEL", + "metricIds" : [ "WEB_PAGE_LOAD_COMPLETION_RATE", "WEB_TTFB", "WEB_AVAILABILITY" ], + "values" : [ "45862", "59749" ] + } ] + } ], + "name" : "cea-filter", + "modifiedDate" : "2024-02-01T22:19:19Z", + "description" : "Global filter for CEA widgets", + "modifiedBy" : { + "uid" : "1", + "name" : "Test User" + }, + "id" : "65bc18e8f2073a4a469cd958", + "aid" : "11" + }, { + "createdDate" : "2024-02-01T22:19:19Z", + "createdBy" : { + "uid" : "1", + "name" : "Test User" + }, + "_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" + } + }, + "context" : [ { + "dataSourceId" : "VIRTUAL_AGENT", + "filters" : [ { + "filterId" : "TEST_LABEL", + "metricIds" : [ "WEB_PAGE_LOAD_COMPLETION_RATE", "WEB_TTFB", "WEB_AVAILABILITY" ], + "values" : [ "45862", "59749" ] + }, { + "filterId" : "TEST_LABEL", + "metricIds" : [ "WEB_PAGE_LOAD_COMPLETION_RATE", "WEB_TTFB", "WEB_AVAILABILITY" ], + "values" : [ "45862", "59749" ] + } ] + }, { + "dataSourceId" : "VIRTUAL_AGENT", + "filters" : [ { + "filterId" : "TEST_LABEL", + "metricIds" : [ "WEB_PAGE_LOAD_COMPLETION_RATE", "WEB_TTFB", "WEB_AVAILABILITY" ], + "values" : [ "45862", "59749" ] + }, { + "filterId" : "TEST_LABEL", + "metricIds" : [ "WEB_PAGE_LOAD_COMPLETION_RATE", "WEB_TTFB", "WEB_AVAILABILITY" ], + "values" : [ "45862", "59749" ] + } ] + } ], + "name" : "cea-filter", + "modifiedDate" : "2024-02-01T22:19:19Z", + "description" : "Global filter for CEA widgets", + "modifiedBy" : { + "uid" : "1", + "name" : "Test User" + }, + "id" : "65bc18e8f2073a4a469cd958", + "aid" : "11" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.dashboards.models.ApiContextFiltersResponse.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_update_dashboard_filter_models_validation(self) -> None: + """Test case for update_dashboard_filter request and response models""" + request_body_json = """ + { + "context" : [ { + "dataSourceId" : "VIRTUAL_AGENT", + "filters" : [ { + "filterId" : "TEST_LABEL", + "metricIds" : [ "WEB_PAGE_LOAD_COMPLETION_RATE", "WEB_TTFB", "WEB_AVAILABILITY" ], + "values" : [ "45862", "59749" ] + }, { + "filterId" : "TEST_LABEL", + "metricIds" : [ "WEB_PAGE_LOAD_COMPLETION_RATE", "WEB_TTFB", "WEB_AVAILABILITY" ], + "values" : [ "45862", "59749" ] + } ] + }, { + "dataSourceId" : "VIRTUAL_AGENT", + "filters" : [ { + "filterId" : "TEST_LABEL", + "metricIds" : [ "WEB_PAGE_LOAD_COMPLETION_RATE", "WEB_TTFB", "WEB_AVAILABILITY" ], + "values" : [ "45862", "59749" ] + }, { + "filterId" : "TEST_LABEL", + "metricIds" : [ "WEB_PAGE_LOAD_COMPLETION_RATE", "WEB_TTFB", "WEB_AVAILABILITY" ], + "values" : [ "45862", "59749" ] + } ] + } ], + "name" : "cea-filter", + "description" : "Global filter for CEA widgets" + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.dashboards.models.ApiContextFilterRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "createdDate" : "2024-02-01T22:19:19Z", + "createdBy" : { + "uid" : "1", + "name" : "Test User" + }, + "_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" + } + }, + "context" : [ { + "dataSourceId" : "VIRTUAL_AGENT", + "filters" : [ { + "filterId" : "TEST_LABEL", + "metricIds" : [ "WEB_PAGE_LOAD_COMPLETION_RATE", "WEB_TTFB", "WEB_AVAILABILITY" ], + "values" : [ "45862", "59749" ] + }, { + "filterId" : "TEST_LABEL", + "metricIds" : [ "WEB_PAGE_LOAD_COMPLETION_RATE", "WEB_TTFB", "WEB_AVAILABILITY" ], + "values" : [ "45862", "59749" ] + } ] + }, { + "dataSourceId" : "VIRTUAL_AGENT", + "filters" : [ { + "filterId" : "TEST_LABEL", + "metricIds" : [ "WEB_PAGE_LOAD_COMPLETION_RATE", "WEB_TTFB", "WEB_AVAILABILITY" ], + "values" : [ "45862", "59749" ] + }, { + "filterId" : "TEST_LABEL", + "metricIds" : [ "WEB_PAGE_LOAD_COMPLETION_RATE", "WEB_TTFB", "WEB_AVAILABILITY" ], + "values" : [ "45862", "59749" ] + } ] + } ], + "name" : "cea-filter", + "modifiedDate" : "2024-02-01T22:19:19Z", + "description" : "Global filter for CEA widgets", + "modifiedBy" : { + "uid" : "1", + "name" : "Test User" + }, + "id" : "65bc18e8f2073a4a469cd958", + "aid" : "11" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.dashboards.models.ApiContextFilterResponse.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_utils.py b/thousandeyes-sdk-dashboards/test/test_utils.py new file mode 100644 index 00000000..930528d9 --- /dev/null +++ b/thousandeyes-sdk-dashboards/test/test_utils.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +import json +import unittest + +from pydantic import BaseModel + + +def assert_constructed_model_matches_example_json(model: BaseModel, loaded_json: dict): + test_case = unittest.TestCase() + test_case.maxDiff = None + test_case.assertIsNotNone(model) + constructed_json = json.loads(model.to_json()) + sorted_loaded_json = json.dumps(loaded_json, sort_keys=True) + sorted_constructed_json = json.dumps(constructed_json, sort_keys=True) + test_case.assertEqual(sorted_loaded_json, sorted_constructed_json) diff --git a/thousandeyes-sdk-endpoint-agents/.openapi-generator/FILES b/thousandeyes-sdk-endpoint-agents/.openapi-generator/FILES index a1912d84..20c239bb 100644 --- a/thousandeyes-sdk-endpoint-agents/.openapi-generator/FILES +++ b/thousandeyes-sdk-endpoint-agents/.openapi-generator/FILES @@ -105,49 +105,7 @@ src/thousandeyes_sdk/endpoint_agents/models/vpn_type.py src/thousandeyes_sdk/endpoint_agents/models/wireless_profile.py src/thousandeyes_sdk/endpoint_agents/py.typed test/__init__.py -test/test_address_profile.py -test/test_address_type.py -test/test_agent_license_type.py -test/test_agent_search_filters.py -test/test_agent_search_request.py -test/test_agent_search_sort.py -test/test_agent_search_sort_key.py -test/test_agent_threshold_filter.py -test/test_agent_threshold_filters.py -test/test_agent_transfer.py -test/test_agent_transfer_request.py -test/test_agent_transfer_status.py -test/test_browser_type.py -test/test_bulk_agent_transfer_request.py -test/test_bulk_agent_transfer_response.py -test/test_conditional_operator.py -test/test_connection_string.py -test/test_endpoint_agent.py -test/test_endpoint_agent_location.py -test/test_endpoint_agent_update.py -test/test_endpoint_agents.py -test/test_endpoint_asn_details.py -test/test_endpoint_browser_extension.py -test/test_endpoint_client.py -test/test_endpoint_user_profile.py -test/test_endpoint_vpn_profile.py -test/test_error.py -test/test_ethernet_profile.py -test/test_expand.py -test/test_filter_endpoint_agents_response.py -test/test_interface_hardware_type.py -test/test_interface_profile.py -test/test_link.py -test/test_list_endpoint_agents_response.py -test/test_pagination_next_and_self_link.py -test/test_pagination_next_link.py -test/test_platform.py -test/test_self_links.py -test/test_sort_order.py -test/test_status.py -test/test_threshold_filter_operator.py -test/test_unauthorized_error.py -test/test_validation_error.py -test/test_validation_error_item.py -test/test_vpn_type.py -test/test_wireless_profile.py +test/test_administrative_endpoints_api.py +test/test_manage_agents_api.py +test/test_transfer_api.py +test/test_utils.py diff --git a/thousandeyes-sdk-endpoint-agents/README.md b/thousandeyes-sdk-endpoint-agents/README.md index 0daec142..325bf819 100644 --- a/thousandeyes-sdk-endpoint-agents/README.md +++ b/thousandeyes-sdk-endpoint-agents/README.md @@ -5,8 +5,7 @@ For more information about Endpoint Agents, see [Endpoint Agents](https://docs.t This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.4 -- Package version: 1.0.0 +- API version: 7.0.6 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator @@ -20,9 +19,9 @@ Python 3.7+ If the python package is hosted on a repository, you can install directly using: ```sh -pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +pip install -e git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git#egg=thousandeyes-sdk-endpoint-agents\&subdirectory=thousandeyes-sdk-endpoint-agents ``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) +(you may need to run `pip` with root permission: `sudo pip install -e git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git#egg=thousandeyes-sdk-endpoint-agents\&subdirectory=thousandeyes-sdk-endpoint-agents`) Then import the package: ```python @@ -83,11 +82,11 @@ with thousandeyes_sdk.client.ApiClient(configuration) as api_client: try: # Get agent connection string - api_response = api_instance.endpoint_agents_connection_string(aid=aid) - print("The response of AdministrativeEndpointsApi->endpoint_agents_connection_string:\n") + api_response = api_instance.get_endpoint_agents_connection_string(aid=aid) + print("The response of AdministrativeEndpointsApi->get_endpoint_agents_connection_string:\n") pprint(api_response) except ApiException as e: - print("Exception when calling AdministrativeEndpointsApi->endpoint_agents_connection_string: %s\n" % e) + print("Exception when calling AdministrativeEndpointsApi->get_endpoint_agents_connection_string: %s\n" % e) ``` @@ -97,16 +96,16 @@ All URIs are relative to *https://api.thousandeyes.com* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*AdministrativeEndpointsApi* | [**endpoint_agents_connection_string**](docs/AdministrativeEndpointsApi.md#endpoint_agents_connection_string) | **GET** /v7/endpoint/agents/connection-string | Get agent connection string -*ManageAgentsApi* | [**endpoint_agent_delete**](docs/ManageAgentsApi.md#endpoint_agent_delete) | **DELETE** /v7/endpoint/agents/{agentId} | Delete endpoint agent -*ManageAgentsApi* | [**endpoint_agent_disable**](docs/ManageAgentsApi.md#endpoint_agent_disable) | **POST** /v7/endpoint/agents/{agentId}/disable | Disable endpoint agent -*ManageAgentsApi* | [**endpoint_agent_enable**](docs/ManageAgentsApi.md#endpoint_agent_enable) | **POST** /v7/endpoint/agents/{agentId}/enable | Enable endpoint agent -*ManageAgentsApi* | [**endpoint_agent_get**](docs/ManageAgentsApi.md#endpoint_agent_get) | **GET** /v7/endpoint/agents/{agentId} | Retrieve endpoint agent -*ManageAgentsApi* | [**endpoint_agent_update**](docs/ManageAgentsApi.md#endpoint_agent_update) | **PATCH** /v7/endpoint/agents/{agentId} | Update endpoint agent -*ManageAgentsApi* | [**endpoint_agents_list**](docs/ManageAgentsApi.md#endpoint_agents_list) | **GET** /v7/endpoint/agents | List endpoint agents -*ManageAgentsApi* | [**endpoint_agents_search**](docs/ManageAgentsApi.md#endpoint_agents_search) | **POST** /v7/endpoint/agents/filter | Filter endpoint agents -*TransferApi* | [**endpoint_agent_bulk_transfer**](docs/TransferApi.md#endpoint_agent_bulk_transfer) | **POST** /v7/endpoint/agents/transfer/bulk | Bulk transfer agents -*TransferApi* | [**endpoint_agent_single_transfer**](docs/TransferApi.md#endpoint_agent_single_transfer) | **POST** /v7/endpoint/agents/{agentId}/transfer | Transfer endpoint agent +*AdministrativeEndpointsApi* | [**get_endpoint_agents_connection_string**](docs/AdministrativeEndpointsApi.md#get_endpoint_agents_connection_string) | **GET** /v7/endpoint/agents/connection-string | Get agent connection string +*ManageAgentsApi* | [**delete_endpoint_agent**](docs/ManageAgentsApi.md#delete_endpoint_agent) | **DELETE** /v7/endpoint/agents/{agentId} | Delete endpoint agent +*ManageAgentsApi* | [**disable_endpoint_agent**](docs/ManageAgentsApi.md#disable_endpoint_agent) | **POST** /v7/endpoint/agents/{agentId}/disable | Disable endpoint agent +*ManageAgentsApi* | [**enable_endpoint_agent**](docs/ManageAgentsApi.md#enable_endpoint_agent) | **POST** /v7/endpoint/agents/{agentId}/enable | Enable endpoint agent +*ManageAgentsApi* | [**filter_endpoint_agents**](docs/ManageAgentsApi.md#filter_endpoint_agents) | **POST** /v7/endpoint/agents/filter | Filter endpoint agents +*ManageAgentsApi* | [**get_endpoint_agent**](docs/ManageAgentsApi.md#get_endpoint_agent) | **GET** /v7/endpoint/agents/{agentId} | Retrieve endpoint agent +*ManageAgentsApi* | [**get_endpoint_agents**](docs/ManageAgentsApi.md#get_endpoint_agents) | **GET** /v7/endpoint/agents | List endpoint agents +*ManageAgentsApi* | [**update_endpoint_agent**](docs/ManageAgentsApi.md#update_endpoint_agent) | **PATCH** /v7/endpoint/agents/{agentId} | Update endpoint agent +*TransferApi* | [**transfer_endpoint_agent**](docs/TransferApi.md#transfer_endpoint_agent) | **POST** /v7/endpoint/agents/{agentId}/transfer | Transfer endpoint agent +*TransferApi* | [**transfer_endpoint_agents**](docs/TransferApi.md#transfer_endpoint_agents) | **POST** /v7/endpoint/agents/transfer/bulk | Bulk transfer agents ## Documentation For Models diff --git a/thousandeyes-sdk-endpoint-agents/docs/AdministrativeEndpointsApi.md b/thousandeyes-sdk-endpoint-agents/docs/AdministrativeEndpointsApi.md index 4de8914c..aa8eb184 100644 --- a/thousandeyes-sdk-endpoint-agents/docs/AdministrativeEndpointsApi.md +++ b/thousandeyes-sdk-endpoint-agents/docs/AdministrativeEndpointsApi.md @@ -4,11 +4,11 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**endpoint_agents_connection_string**](AdministrativeEndpointsApi.md#endpoint_agents_connection_string) | **GET** /v7/endpoint/agents/connection-string | Get agent connection string +[**get_endpoint_agents_connection_string**](AdministrativeEndpointsApi.md#get_endpoint_agents_connection_string) | **GET** /v7/endpoint/agents/connection-string | Get agent connection string -# **endpoint_agents_connection_string** -> ConnectionString endpoint_agents_connection_string(aid=aid) +# **get_endpoint_agents_connection_string** +> ConnectionString get_endpoint_agents_connection_string(aid=aid) Get agent connection string @@ -46,11 +46,11 @@ with thousandeyes_sdk.endpoint_agents.ApiClient(configuration) as api_client: try: # Get agent connection string - api_response = api_instance.endpoint_agents_connection_string(aid=aid) - print("The response of AdministrativeEndpointsApi->endpoint_agents_connection_string:\n") + api_response = api_instance.get_endpoint_agents_connection_string(aid=aid) + print("The response of AdministrativeEndpointsApi->get_endpoint_agents_connection_string:\n") pprint(api_response) except Exception as e: - print("Exception when calling AdministrativeEndpointsApi->endpoint_agents_connection_string: %s\n" % e) + print("Exception when calling AdministrativeEndpointsApi->get_endpoint_agents_connection_string: %s\n" % e) ``` @@ -73,7 +73,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-endpoint-agents/docs/ManageAgentsApi.md b/thousandeyes-sdk-endpoint-agents/docs/ManageAgentsApi.md index 09c6b5fa..23d7084c 100644 --- a/thousandeyes-sdk-endpoint-agents/docs/ManageAgentsApi.md +++ b/thousandeyes-sdk-endpoint-agents/docs/ManageAgentsApi.md @@ -4,17 +4,17 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**endpoint_agent_delete**](ManageAgentsApi.md#endpoint_agent_delete) | **DELETE** /v7/endpoint/agents/{agentId} | Delete endpoint agent -[**endpoint_agent_disable**](ManageAgentsApi.md#endpoint_agent_disable) | **POST** /v7/endpoint/agents/{agentId}/disable | Disable endpoint agent -[**endpoint_agent_enable**](ManageAgentsApi.md#endpoint_agent_enable) | **POST** /v7/endpoint/agents/{agentId}/enable | Enable endpoint agent -[**endpoint_agent_get**](ManageAgentsApi.md#endpoint_agent_get) | **GET** /v7/endpoint/agents/{agentId} | Retrieve endpoint agent -[**endpoint_agent_update**](ManageAgentsApi.md#endpoint_agent_update) | **PATCH** /v7/endpoint/agents/{agentId} | Update endpoint agent -[**endpoint_agents_list**](ManageAgentsApi.md#endpoint_agents_list) | **GET** /v7/endpoint/agents | List endpoint agents -[**endpoint_agents_search**](ManageAgentsApi.md#endpoint_agents_search) | **POST** /v7/endpoint/agents/filter | Filter endpoint agents +[**delete_endpoint_agent**](ManageAgentsApi.md#delete_endpoint_agent) | **DELETE** /v7/endpoint/agents/{agentId} | Delete endpoint agent +[**disable_endpoint_agent**](ManageAgentsApi.md#disable_endpoint_agent) | **POST** /v7/endpoint/agents/{agentId}/disable | Disable endpoint agent +[**enable_endpoint_agent**](ManageAgentsApi.md#enable_endpoint_agent) | **POST** /v7/endpoint/agents/{agentId}/enable | Enable endpoint agent +[**filter_endpoint_agents**](ManageAgentsApi.md#filter_endpoint_agents) | **POST** /v7/endpoint/agents/filter | Filter endpoint agents +[**get_endpoint_agent**](ManageAgentsApi.md#get_endpoint_agent) | **GET** /v7/endpoint/agents/{agentId} | Retrieve endpoint agent +[**get_endpoint_agents**](ManageAgentsApi.md#get_endpoint_agents) | **GET** /v7/endpoint/agents | List endpoint agents +[**update_endpoint_agent**](ManageAgentsApi.md#update_endpoint_agent) | **PATCH** /v7/endpoint/agents/{agentId} | Update endpoint agent -# **endpoint_agent_delete** -> endpoint_agent_delete(agent_id, aid=aid, expand=expand) +# **delete_endpoint_agent** +> delete_endpoint_agent(agent_id, aid=aid, expand=expand) Delete endpoint agent @@ -56,9 +56,9 @@ with thousandeyes_sdk.endpoint_agents.ApiClient(configuration) as api_client: try: # Delete endpoint agent - api_instance.endpoint_agent_delete(agent_id, aid=aid, expand=expand) + api_instance.delete_endpoint_agent(agent_id, aid=aid, expand=expand) except Exception as e: - print("Exception when calling ManageAgentsApi->endpoint_agent_delete: %s\n" % e) + print("Exception when calling ManageAgentsApi->delete_endpoint_agent: %s\n" % e) ``` @@ -83,7 +83,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/problem+json + - **Accept**: application/json, application/problem+json ### HTTP response details @@ -97,8 +97,8 @@ 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) -# **endpoint_agent_disable** -> EndpointAgent endpoint_agent_disable(agent_id, aid=aid) +# **disable_endpoint_agent** +> EndpointAgent disable_endpoint_agent(agent_id, aid=aid) Disable endpoint agent @@ -139,11 +139,11 @@ with thousandeyes_sdk.endpoint_agents.ApiClient(configuration) as api_client: try: # Disable endpoint agent - api_response = api_instance.endpoint_agent_disable(agent_id, aid=aid) - print("The response of ManageAgentsApi->endpoint_agent_disable:\n") + api_response = api_instance.disable_endpoint_agent(agent_id, aid=aid) + print("The response of ManageAgentsApi->disable_endpoint_agent:\n") pprint(api_response) except Exception as e: - print("Exception when calling ManageAgentsApi->endpoint_agent_disable: %s\n" % e) + print("Exception when calling ManageAgentsApi->disable_endpoint_agent: %s\n" % e) ``` @@ -167,7 +167,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -181,8 +181,8 @@ 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) -# **endpoint_agent_enable** -> EndpointAgent endpoint_agent_enable(agent_id, aid=aid) +# **enable_endpoint_agent** +> EndpointAgent enable_endpoint_agent(agent_id, aid=aid) Enable endpoint agent @@ -223,11 +223,11 @@ with thousandeyes_sdk.endpoint_agents.ApiClient(configuration) as api_client: try: # Enable endpoint agent - api_response = api_instance.endpoint_agent_enable(agent_id, aid=aid) - print("The response of ManageAgentsApi->endpoint_agent_enable:\n") + api_response = api_instance.enable_endpoint_agent(agent_id, aid=aid) + print("The response of ManageAgentsApi->enable_endpoint_agent:\n") pprint(api_response) except Exception as e: - print("Exception when calling ManageAgentsApi->endpoint_agent_enable: %s\n" % e) + print("Exception when calling ManageAgentsApi->enable_endpoint_agent: %s\n" % e) ``` @@ -251,7 +251,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -265,8 +265,102 @@ 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) -# **endpoint_agent_get** -> EndpointAgent endpoint_agent_get(agent_id, aid=aid, expand=expand, include_deleted=include_deleted) +# **filter_endpoint_agents** +> FilterEndpointAgentsResponse filter_endpoint_agents(agent_search_request, max=max, cursor=cursor, aid=aid, expand=expand, include_deleted=include_deleted) + +Filter endpoint agents + +Retrieves a list of endpoint agents within the specified account group that match the specified filters. If no agents meet the filter criteria, the API returns an empty array. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.endpoint_agents +from thousandeyes_sdk.endpoint_agents.models.agent_search_request import AgentSearchRequest +from thousandeyes_sdk.endpoint_agents.models.expand import Expand +from thousandeyes_sdk.endpoint_agents.models.filter_endpoint_agents_response import FilterEndpointAgentsResponse +from thousandeyes_sdk.endpoint_agents.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.endpoint_agents.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.endpoint_agents.ManageAgentsApi(api_client) + agent_search_request = thousandeyes_sdk.endpoint_agents.AgentSearchRequest() # AgentSearchRequest | The filter options for advanced search filtering for agents. + max = 5 # int | (Optional) Maximum number of objects to return. (optional) + cursor = 'cursor_example' # str | (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. (optional) + 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) + expand = [thousandeyes_sdk.endpoint_agents.Expand()] # List[Expand] | This optional parameter allows you to control the expansion of test resources associated with the agent. By default, no expansion occurs when this query parameter is omitted. To expand the \"clients\" resource, include the query parameter `?expand=clients`. For multiple expansions, you have two options: * Separate the values with commas. For example, `?expandAgent=clients,tasks`. * Specify the parameter multiple times. For example, `?expandAgent=clients&expandAgent=tasks`. This parameter offers flexibility for users to customize the expansion of specific resources related to the agent. (optional) + include_deleted = false # bool | When requesting entities, set to `true` if you want to see deleted entities. (optional) + + try: + # Filter endpoint agents + api_response = api_instance.filter_endpoint_agents(agent_search_request, max=max, cursor=cursor, aid=aid, expand=expand, include_deleted=include_deleted) + print("The response of ManageAgentsApi->filter_endpoint_agents:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ManageAgentsApi->filter_endpoint_agents: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **agent_search_request** | [**AgentSearchRequest**](AgentSearchRequest.md)| The filter options for advanced search filtering for agents. | + **max** | **int**| (Optional) Maximum number of objects to return. | [optional] + **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. | [optional] + **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] + **expand** | [**List[Expand]**](Expand.md)| This optional parameter allows you to control the expansion of test resources associated with the agent. By default, no expansion occurs when this query parameter is omitted. To expand the \"clients\" resource, include the query parameter `?expand=clients`. For multiple expansions, you have two options: * Separate the values with commas. For example, `?expandAgent=clients,tasks`. * Specify the parameter multiple times. For example, `?expandAgent=clients&expandAgent=tasks`. This parameter offers flexibility for users to customize the expansion of specific resources related to the agent. | [optional] + **include_deleted** | **bool**| When requesting entities, set to `true` if you want to see deleted entities. | [optional] + +### Return type + +[**FilterEndpointAgentsResponse**](FilterEndpointAgentsResponse.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 | - | +**429** | Exhausted rate limit for the organization | - | + +[[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_endpoint_agent** +> EndpointAgent get_endpoint_agent(agent_id, aid=aid, expand=expand, include_deleted=include_deleted) Retrieve endpoint agent @@ -310,11 +404,11 @@ with thousandeyes_sdk.endpoint_agents.ApiClient(configuration) as api_client: try: # Retrieve endpoint agent - api_response = api_instance.endpoint_agent_get(agent_id, aid=aid, expand=expand, include_deleted=include_deleted) - print("The response of ManageAgentsApi->endpoint_agent_get:\n") + api_response = api_instance.get_endpoint_agent(agent_id, aid=aid, expand=expand, include_deleted=include_deleted) + print("The response of ManageAgentsApi->get_endpoint_agent:\n") pprint(api_response) except Exception as e: - print("Exception when calling ManageAgentsApi->endpoint_agent_get: %s\n" % e) + print("Exception when calling ManageAgentsApi->get_endpoint_agent: %s\n" % e) ``` @@ -340,7 +434,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -354,8 +448,104 @@ 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) -# **endpoint_agent_update** -> EndpointAgent endpoint_agent_update(agent_id, aid=aid, expand=expand, endpoint_agent_update=endpoint_agent_update) +# **get_endpoint_agents** +> ListEndpointAgentsResponse get_endpoint_agents(max=max, cursor=cursor, aid=aid, expand=expand, include_deleted=include_deleted, use_all_permitted_aids=use_all_permitted_aids, agent_name=agent_name, computer_name=computer_name) + +List endpoint agents + +Retrieves a list of endpoint agents in a given account group. If there are no agents in the specified account group, it returns an empty array. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.endpoint_agents +from thousandeyes_sdk.endpoint_agents.models.expand import Expand +from thousandeyes_sdk.endpoint_agents.models.list_endpoint_agents_response import ListEndpointAgentsResponse +from thousandeyes_sdk.endpoint_agents.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.endpoint_agents.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.endpoint_agents.ManageAgentsApi(api_client) + max = 5 # int | (Optional) Maximum number of objects to return. (optional) + cursor = 'cursor_example' # str | (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. (optional) + 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) + expand = [thousandeyes_sdk.endpoint_agents.Expand()] # List[Expand] | This optional parameter allows you to control the expansion of test resources associated with the agent. By default, no expansion occurs when this query parameter is omitted. To expand the \"clients\" resource, include the query parameter `?expand=clients`. For multiple expansions, you have two options: * Separate the values with commas. For example, `?expandAgent=clients,tasks`. * Specify the parameter multiple times. For example, `?expandAgent=clients&expandAgent=tasks`. This parameter offers flexibility for users to customize the expansion of specific resources related to the agent. (optional) + include_deleted = false # bool | When requesting entities, set to `true` if you want to see deleted entities. (optional) + use_all_permitted_aids = False # bool | Set to `true` to load data from all accounts the user has access to. (optional) (default to False) + agent_name = 'agent_name_example' # str | Returns only agents with the specified name. This is an exact match only. (optional) + computer_name = 'computer_name_example' # str | Returns only agents with the specified computer name. This is an exact match only. (optional) + + try: + # List endpoint agents + api_response = api_instance.get_endpoint_agents(max=max, cursor=cursor, aid=aid, expand=expand, include_deleted=include_deleted, use_all_permitted_aids=use_all_permitted_aids, agent_name=agent_name, computer_name=computer_name) + print("The response of ManageAgentsApi->get_endpoint_agents:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ManageAgentsApi->get_endpoint_agents: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **max** | **int**| (Optional) Maximum number of objects to return. | [optional] + **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. | [optional] + **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] + **expand** | [**List[Expand]**](Expand.md)| This optional parameter allows you to control the expansion of test resources associated with the agent. By default, no expansion occurs when this query parameter is omitted. To expand the \"clients\" resource, include the query parameter `?expand=clients`. For multiple expansions, you have two options: * Separate the values with commas. For example, `?expandAgent=clients,tasks`. * Specify the parameter multiple times. For example, `?expandAgent=clients&expandAgent=tasks`. This parameter offers flexibility for users to customize the expansion of specific resources related to the agent. | [optional] + **include_deleted** | **bool**| When requesting entities, set to `true` if you want to see deleted entities. | [optional] + **use_all_permitted_aids** | **bool**| Set to `true` to load data from all accounts the user has access to. | [optional] [default to False] + **agent_name** | **str**| Returns only agents with the specified name. This is an exact match only. | [optional] + **computer_name** | **str**| Returns only agents with the specified computer name. This is an exact match only. | [optional] + +### Return type + +[**ListEndpointAgentsResponse**](ListEndpointAgentsResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | +**429** | Exhausted rate limit for the organization | - | + +[[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_endpoint_agent** +> EndpointAgent update_endpoint_agent(agent_id, aid=aid, expand=expand, endpoint_agent_update=endpoint_agent_update) Update endpoint agent @@ -400,11 +590,11 @@ with thousandeyes_sdk.endpoint_agents.ApiClient(configuration) as api_client: try: # Update endpoint agent - api_response = api_instance.endpoint_agent_update(agent_id, aid=aid, expand=expand, endpoint_agent_update=endpoint_agent_update) - print("The response of ManageAgentsApi->endpoint_agent_update:\n") + api_response = api_instance.update_endpoint_agent(agent_id, aid=aid, expand=expand, endpoint_agent_update=endpoint_agent_update) + print("The response of ManageAgentsApi->update_endpoint_agent:\n") pprint(api_response) except Exception as e: - print("Exception when calling ManageAgentsApi->endpoint_agent_update: %s\n" % e) + print("Exception when calling ManageAgentsApi->update_endpoint_agent: %s\n" % e) ``` @@ -430,7 +620,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -444,193 +634,3 @@ 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) -# **endpoint_agents_list** -> ListEndpointAgentsResponse endpoint_agents_list(max=max, cursor=cursor, aid=aid, expand=expand, include_deleted=include_deleted, use_all_permitted_aids=use_all_permitted_aids, agent_name=agent_name, computer_name=computer_name) - -List endpoint agents - -Retrieves a list of endpoint agents in a given account group. If there are no agents in the specified account group, it returns an empty array. - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import thousandeyes_sdk.endpoint_agents -from thousandeyes_sdk.endpoint_agents.models.expand import Expand -from thousandeyes_sdk.endpoint_agents.models.list_endpoint_agents_response import ListEndpointAgentsResponse -from thousandeyes_sdk.endpoint_agents.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.thousandeyes.com -# See configuration.py for a list of all supported configuration parameters. -configuration = thousandeyes_sdk.client.Configuration( - host = "https://api.thousandeyes.com" -) - -# 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.client.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with thousandeyes_sdk.endpoint_agents.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = thousandeyes_sdk.endpoint_agents.ManageAgentsApi(api_client) - max = 5 # float | (Optional) Maximum number of objects to return. (optional) - cursor = 'cursor_example' # str | (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. (optional) - 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) - expand = [thousandeyes_sdk.endpoint_agents.Expand()] # List[Expand] | This optional parameter allows you to control the expansion of test resources associated with the agent. By default, no expansion occurs when this query parameter is omitted. To expand the \"clients\" resource, include the query parameter `?expand=clients`. For multiple expansions, you have two options: * Separate the values with commas. For example, `?expandAgent=clients,tasks`. * Specify the parameter multiple times. For example, `?expandAgent=clients&expandAgent=tasks`. This parameter offers flexibility for users to customize the expansion of specific resources related to the agent. (optional) - include_deleted = false # bool | When requesting entities, set to `true` if you want to see deleted entities. (optional) - use_all_permitted_aids = False # bool | Set to `true` to load data from all accounts the user has access to. (optional) (default to False) - agent_name = 'agent_name_example' # str | Returns only agents with the specified name. This is an exact match only. (optional) - computer_name = 'computer_name_example' # str | Returns only agents with the specified computer name. This is an exact match only. (optional) - - try: - # List endpoint agents - api_response = api_instance.endpoint_agents_list(max=max, cursor=cursor, aid=aid, expand=expand, include_deleted=include_deleted, use_all_permitted_aids=use_all_permitted_aids, agent_name=agent_name, computer_name=computer_name) - print("The response of ManageAgentsApi->endpoint_agents_list:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ManageAgentsApi->endpoint_agents_list: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **max** | **float**| (Optional) Maximum number of objects to return. | [optional] - **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. | [optional] - **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] - **expand** | [**List[Expand]**](Expand.md)| This optional parameter allows you to control the expansion of test resources associated with the agent. By default, no expansion occurs when this query parameter is omitted. To expand the \"clients\" resource, include the query parameter `?expand=clients`. For multiple expansions, you have two options: * Separate the values with commas. For example, `?expandAgent=clients,tasks`. * Specify the parameter multiple times. For example, `?expandAgent=clients&expandAgent=tasks`. This parameter offers flexibility for users to customize the expansion of specific resources related to the agent. | [optional] - **include_deleted** | **bool**| When requesting entities, set to `true` if you want to see deleted entities. | [optional] - **use_all_permitted_aids** | **bool**| Set to `true` to load data from all accounts the user has access to. | [optional] [default to False] - **agent_name** | **str**| Returns only agents with the specified name. This is an exact match only. | [optional] - **computer_name** | **str**| Returns only agents with the specified computer name. This is an exact match only. | [optional] - -### Return type - -[**ListEndpointAgentsResponse**](ListEndpointAgentsResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**401** | Unauthorized | - | -**403** | Insufficient permissions to query endpoint | - | -**429** | Exhausted rate limit for the organization | - | - -[[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) - -# **endpoint_agents_search** -> FilterEndpointAgentsResponse endpoint_agents_search(agent_search_request, max=max, cursor=cursor, aid=aid, expand=expand, include_deleted=include_deleted) - -Filter endpoint agents - -Retrieves a list of endpoint agents within the specified account group that match the specified filters. If no agents meet the filter criteria, the API returns an empty array. - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import thousandeyes_sdk.endpoint_agents -from thousandeyes_sdk.endpoint_agents.models.agent_search_request import AgentSearchRequest -from thousandeyes_sdk.endpoint_agents.models.expand import Expand -from thousandeyes_sdk.endpoint_agents.models.filter_endpoint_agents_response import FilterEndpointAgentsResponse -from thousandeyes_sdk.endpoint_agents.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.thousandeyes.com -# See configuration.py for a list of all supported configuration parameters. -configuration = thousandeyes_sdk.client.Configuration( - host = "https://api.thousandeyes.com" -) - -# 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.client.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with thousandeyes_sdk.endpoint_agents.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = thousandeyes_sdk.endpoint_agents.ManageAgentsApi(api_client) - agent_search_request = thousandeyes_sdk.endpoint_agents.AgentSearchRequest() # AgentSearchRequest | The filter options for advanced search filtering for agents. - max = 5 # float | (Optional) Maximum number of objects to return. (optional) - cursor = 'cursor_example' # str | (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. (optional) - 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) - expand = [thousandeyes_sdk.endpoint_agents.Expand()] # List[Expand] | This optional parameter allows you to control the expansion of test resources associated with the agent. By default, no expansion occurs when this query parameter is omitted. To expand the \"clients\" resource, include the query parameter `?expand=clients`. For multiple expansions, you have two options: * Separate the values with commas. For example, `?expandAgent=clients,tasks`. * Specify the parameter multiple times. For example, `?expandAgent=clients&expandAgent=tasks`. This parameter offers flexibility for users to customize the expansion of specific resources related to the agent. (optional) - include_deleted = false # bool | When requesting entities, set to `true` if you want to see deleted entities. (optional) - - try: - # Filter endpoint agents - api_response = api_instance.endpoint_agents_search(agent_search_request, max=max, cursor=cursor, aid=aid, expand=expand, include_deleted=include_deleted) - print("The response of ManageAgentsApi->endpoint_agents_search:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ManageAgentsApi->endpoint_agents_search: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **agent_search_request** | [**AgentSearchRequest**](AgentSearchRequest.md)| The filter options for advanced search filtering for agents. | - **max** | **float**| (Optional) Maximum number of objects to return. | [optional] - **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. | [optional] - **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] - **expand** | [**List[Expand]**](Expand.md)| This optional parameter allows you to control the expansion of test resources associated with the agent. By default, no expansion occurs when this query parameter is omitted. To expand the \"clients\" resource, include the query parameter `?expand=clients`. For multiple expansions, you have two options: * Separate the values with commas. For example, `?expandAgent=clients,tasks`. * Specify the parameter multiple times. For example, `?expandAgent=clients&expandAgent=tasks`. This parameter offers flexibility for users to customize the expansion of specific resources related to the agent. | [optional] - **include_deleted** | **bool**| When requesting entities, set to `true` if you want to see deleted entities. | [optional] - -### Return type - -[**FilterEndpointAgentsResponse**](FilterEndpointAgentsResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/hal+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 | - | -**429** | Exhausted rate limit for the organization | - | - -[[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-endpoint-agents/docs/TransferApi.md b/thousandeyes-sdk-endpoint-agents/docs/TransferApi.md index 56e8f171..7d0441c0 100644 --- a/thousandeyes-sdk-endpoint-agents/docs/TransferApi.md +++ b/thousandeyes-sdk-endpoint-agents/docs/TransferApi.md @@ -4,98 +4,12 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**endpoint_agent_bulk_transfer**](TransferApi.md#endpoint_agent_bulk_transfer) | **POST** /v7/endpoint/agents/transfer/bulk | Bulk transfer agents -[**endpoint_agent_single_transfer**](TransferApi.md#endpoint_agent_single_transfer) | **POST** /v7/endpoint/agents/{agentId}/transfer | Transfer endpoint agent +[**transfer_endpoint_agent**](TransferApi.md#transfer_endpoint_agent) | **POST** /v7/endpoint/agents/{agentId}/transfer | Transfer endpoint agent +[**transfer_endpoint_agents**](TransferApi.md#transfer_endpoint_agents) | **POST** /v7/endpoint/agents/transfer/bulk | Bulk transfer agents -# **endpoint_agent_bulk_transfer** -> BulkAgentTransferResponse endpoint_agent_bulk_transfer(aid=aid, bulk_agent_transfer_request=bulk_agent_transfer_request) - -Bulk transfer agents - -Initiates the transfer of multiple agents between accounts. The following conditions apply: * The requester must possess 'write' permissions for both the 'from' and 'to' accounts involved in each transfer. * Multiple transfers may involve a mix of different source and destination accounts. * For each transfer request, the 'from' account must match the current account of the respective agent. * Transfers are executed asynchronously. * Progress tracking is not intended, but users can monitor the progress by periodically polling the 'get agent' endpoint. * Each transfer request is individually validated and completed; this operation is not atomic, meaning transfers can succeed or fail individually. * The API response provides the status of each transfer request. - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import thousandeyes_sdk.endpoint_agents -from thousandeyes_sdk.endpoint_agents.models.bulk_agent_transfer_request import BulkAgentTransferRequest -from thousandeyes_sdk.endpoint_agents.models.bulk_agent_transfer_response import BulkAgentTransferResponse -from thousandeyes_sdk.endpoint_agents.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.thousandeyes.com -# See configuration.py for a list of all supported configuration parameters. -configuration = thousandeyes_sdk.client.Configuration( - host = "https://api.thousandeyes.com" -) - -# 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.client.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with thousandeyes_sdk.endpoint_agents.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = thousandeyes_sdk.endpoint_agents.TransferApi(api_client) - 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) - bulk_agent_transfer_request = thousandeyes_sdk.endpoint_agents.BulkAgentTransferRequest() # BulkAgentTransferRequest | A collection of `AgentTransfers`. (optional) - - try: - # Bulk transfer agents - api_response = api_instance.endpoint_agent_bulk_transfer(aid=aid, bulk_agent_transfer_request=bulk_agent_transfer_request) - print("The response of TransferApi->endpoint_agent_bulk_transfer:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling TransferApi->endpoint_agent_bulk_transfer: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **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] - **bulk_agent_transfer_request** | [**BulkAgentTransferRequest**](BulkAgentTransferRequest.md)| A collection of `AgentTransfers`. | [optional] - -### Return type - -[**BulkAgentTransferResponse**](BulkAgentTransferResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json, text/csv, text/plain - - **Accept**: application/hal+json, application/problem+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**207** | Transfer initiated | - | -**400** | Bad Request | - | -**401** | Unauthorized | - | -**403** | Insufficient permissions to query endpoint | - | -**404** | Not found | - | -**429** | Exhausted rate limit for the organization | - | - -[[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) - -# **endpoint_agent_single_transfer** -> endpoint_agent_single_transfer(agent_id, agent_transfer_request, aid=aid) +# **transfer_endpoint_agent** +> transfer_endpoint_agent(agent_id, agent_transfer_request, aid=aid) Transfer endpoint agent @@ -137,9 +51,9 @@ with thousandeyes_sdk.endpoint_agents.ApiClient(configuration) as api_client: try: # Transfer endpoint agent - api_instance.endpoint_agent_single_transfer(agent_id, agent_transfer_request, aid=aid) + api_instance.transfer_endpoint_agent(agent_id, agent_transfer_request, aid=aid) except Exception as e: - print("Exception when calling TransferApi->endpoint_agent_single_transfer: %s\n" % e) + print("Exception when calling TransferApi->transfer_endpoint_agent: %s\n" % e) ``` @@ -164,7 +78,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/problem+json + - **Accept**: application/json, application/problem+json ### HTTP response details @@ -178,3 +92,89 @@ 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) +# **transfer_endpoint_agents** +> BulkAgentTransferResponse transfer_endpoint_agents(aid=aid, bulk_agent_transfer_request=bulk_agent_transfer_request) + +Bulk transfer agents + +Initiates the transfer of multiple agents between accounts. The following conditions apply: * The requester must possess 'write' permissions for both the 'from' and 'to' accounts involved in each transfer. * Multiple transfers may involve a mix of different source and destination accounts. * For each transfer request, the 'from' account must match the current account of the respective agent. * Transfers are executed asynchronously. * Progress tracking is not intended, but users can monitor the progress by periodically polling the 'get agent' endpoint. * Each transfer request is individually validated and completed; this operation is not atomic, meaning transfers can succeed or fail individually. * The API response provides the status of each transfer request. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.endpoint_agents +from thousandeyes_sdk.endpoint_agents.models.bulk_agent_transfer_request import BulkAgentTransferRequest +from thousandeyes_sdk.endpoint_agents.models.bulk_agent_transfer_response import BulkAgentTransferResponse +from thousandeyes_sdk.endpoint_agents.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.endpoint_agents.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.endpoint_agents.TransferApi(api_client) + 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) + bulk_agent_transfer_request = thousandeyes_sdk.endpoint_agents.BulkAgentTransferRequest() # BulkAgentTransferRequest | A collection of `AgentTransfers`. (optional) + + try: + # Bulk transfer agents + api_response = api_instance.transfer_endpoint_agents(aid=aid, bulk_agent_transfer_request=bulk_agent_transfer_request) + print("The response of TransferApi->transfer_endpoint_agents:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TransferApi->transfer_endpoint_agents: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **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] + **bulk_agent_transfer_request** | [**BulkAgentTransferRequest**](BulkAgentTransferRequest.md)| A collection of `AgentTransfers`. | [optional] + +### Return type + +[**BulkAgentTransferResponse**](BulkAgentTransferResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json, text/csv, text/plain + - **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**207** | Transfer initiated | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | +**404** | Not found | - | +**429** | Exhausted rate limit for the organization | - | + +[[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-endpoint-agents/docs/ValidationErrorItem.md b/thousandeyes-sdk-endpoint-agents/docs/ValidationErrorItem.md index 4868f88d..9ab90521 100644 --- a/thousandeyes-sdk-endpoint-agents/docs/ValidationErrorItem.md +++ b/thousandeyes-sdk-endpoint-agents/docs/ValidationErrorItem.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **code** | **str** | (Optional) A unique error type/code that can be referenced in the documentation for further details. | [optional] -**var_field** | **int** | Identifies the field that triggered this particular error. | [optional] +**var_field** | **str** | Identifies the field that triggered this particular error. | [optional] **message** | **str** | A short, human-readable summary of the error. | [optional] ## Example diff --git a/thousandeyes-sdk-endpoint-agents/pyproject.toml b/thousandeyes-sdk-endpoint-agents/pyproject.toml index 4a9cbd04..8b27f3ad 100644 --- a/thousandeyes-sdk-endpoint-agents/pyproject.toml +++ b/thousandeyes-sdk-endpoint-agents/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "thousandeyes-sdk-endpoint-agents" -version = "1.0.0" +dynamic = ["version"] authors = [ { name = "ThousandEyes API Team", email = "api-team@thousandeyes.com" } ] @@ -11,9 +11,12 @@ dependencies = [ "python-dateutil >=2.8.2", "pydantic >=2", "typing-extensions >=4.7.1", - "thousandeyes-sdk-client==1.0.0", + "thousandeyes-sdk-core", ] +[tool.setuptools.dynamic] +version = {attr = "thousandeyes_sdk.client.__version__"} + [project.optional-dependencies] test = [ "pytest~=7.1.3", diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/__init__.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/__init__.py index 8a624d35..6db6dd82 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/__init__.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/__init__.py @@ -7,15 +7,13 @@ Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 -__version__ = "1.0.0" - # import apis into sdk package from thousandeyes_sdk.endpoint_agents.api.administrative_endpoints_api import AdministrativeEndpointsApi from thousandeyes_sdk.endpoint_agents.api.manage_agents_api import ManageAgentsApi diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/api/administrative_endpoints_api.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/api/administrative_endpoints_api.py index a7aacc4c..5a00155c 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/api/administrative_endpoints_api.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/api/administrative_endpoints_api.py @@ -5,7 +5,7 @@ Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -26,6 +26,7 @@ from thousandeyes_sdk.endpoint_agents.models.connection_string import Connection from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class AdministrativeEndpointsApi: @@ -38,11 +39,12 @@ class AdministrativeEndpointsApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @validate_call - def endpoint_agents_connection_string( + def get_endpoint_agents_connection_string( 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[ @@ -85,7 +87,7 @@ class AdministrativeEndpointsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._endpoint_agents_connection_string_serialize( + _param = self._get_endpoint_agents_connection_string_serialize( aid=aid, _request_auth=_request_auth, _content_type=_content_type, @@ -112,7 +114,7 @@ class AdministrativeEndpointsApi: @validate_call - def endpoint_agents_connection_string_with_http_info( + def get_endpoint_agents_connection_string_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[ @@ -155,7 +157,7 @@ class AdministrativeEndpointsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._endpoint_agents_connection_string_serialize( + _param = self._get_endpoint_agents_connection_string_serialize( aid=aid, _request_auth=_request_auth, _content_type=_content_type, @@ -182,7 +184,7 @@ class AdministrativeEndpointsApi: @validate_call - def endpoint_agents_connection_string_without_preload_content( + def get_endpoint_agents_connection_string_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[ @@ -225,7 +227,7 @@ class AdministrativeEndpointsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._endpoint_agents_connection_string_serialize( + _param = self._get_endpoint_agents_connection_string_serialize( aid=aid, _request_auth=_request_auth, _content_type=_content_type, @@ -246,7 +248,7 @@ class AdministrativeEndpointsApi: return response_data.response - def _endpoint_agents_connection_string_serialize( + def _get_endpoint_agents_connection_string_serialize( self, aid, _request_auth, @@ -282,6 +284,7 @@ class AdministrativeEndpointsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/api/manage_agents_api.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/api/manage_agents_api.py index 9a18d587..dc1b2db5 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/api/manage_agents_api.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/api/manage_agents_api.py @@ -5,7 +5,7 @@ Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,8 +18,8 @@ from typing_extensions import Annotated import thousandeyes_sdk.endpoint_agents.models -from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr -from typing import List, Optional, Union +from pydantic import Field, StrictBool, StrictInt, StrictStr +from typing import List, Optional from typing_extensions import Annotated from thousandeyes_sdk.endpoint_agents.models.agent_search_request import AgentSearchRequest from thousandeyes_sdk.endpoint_agents.models.endpoint_agent import EndpointAgent @@ -31,6 +31,7 @@ from thousandeyes_sdk.endpoint_agents.models.list_endpoint_agents_response impor from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class ManageAgentsApi: @@ -43,11 +44,12 @@ class ManageAgentsApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @validate_call - def endpoint_agent_delete( + def delete_endpoint_agent( self, agent_id: Annotated[StrictStr, Field(description="The identifier of the agent to operate on.")], 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, @@ -97,7 +99,7 @@ class ManageAgentsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._endpoint_agent_delete_serialize( + _param = self._delete_endpoint_agent_serialize( agent_id=agent_id, aid=aid, expand=expand, @@ -127,7 +129,7 @@ class ManageAgentsApi: @validate_call - def endpoint_agent_delete_with_http_info( + def delete_endpoint_agent_with_http_info( self, agent_id: Annotated[StrictStr, Field(description="The identifier of the agent to operate on.")], 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, @@ -177,7 +179,7 @@ class ManageAgentsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._endpoint_agent_delete_serialize( + _param = self._delete_endpoint_agent_serialize( agent_id=agent_id, aid=aid, expand=expand, @@ -207,7 +209,7 @@ class ManageAgentsApi: @validate_call - def endpoint_agent_delete_without_preload_content( + def delete_endpoint_agent_without_preload_content( self, agent_id: Annotated[StrictStr, Field(description="The identifier of the agent to operate on.")], 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, @@ -257,7 +259,7 @@ class ManageAgentsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._endpoint_agent_delete_serialize( + _param = self._delete_endpoint_agent_serialize( agent_id=agent_id, aid=aid, expand=expand, @@ -281,7 +283,7 @@ class ManageAgentsApi: return response_data.response - def _endpoint_agent_delete_serialize( + def _delete_endpoint_agent_serialize( self, agent_id, aid, @@ -325,6 +327,7 @@ class ManageAgentsApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ + 'application/json', 'application/problem+json' ] ) @@ -354,7 +357,7 @@ class ManageAgentsApi: @validate_call - def endpoint_agent_disable( + def disable_endpoint_agent( self, agent_id: Annotated[StrictStr, Field(description="The identifier of the agent to operate on.")], 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, @@ -401,7 +404,7 @@ class ManageAgentsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._endpoint_agent_disable_serialize( + _param = self._disable_endpoint_agent_serialize( agent_id=agent_id, aid=aid, _request_auth=_request_auth, @@ -430,7 +433,7 @@ class ManageAgentsApi: @validate_call - def endpoint_agent_disable_with_http_info( + def disable_endpoint_agent_with_http_info( self, agent_id: Annotated[StrictStr, Field(description="The identifier of the agent to operate on.")], 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, @@ -477,7 +480,7 @@ class ManageAgentsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._endpoint_agent_disable_serialize( + _param = self._disable_endpoint_agent_serialize( agent_id=agent_id, aid=aid, _request_auth=_request_auth, @@ -506,7 +509,7 @@ class ManageAgentsApi: @validate_call - def endpoint_agent_disable_without_preload_content( + def disable_endpoint_agent_without_preload_content( self, agent_id: Annotated[StrictStr, Field(description="The identifier of the agent to operate on.")], 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, @@ -553,7 +556,7 @@ class ManageAgentsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._endpoint_agent_disable_serialize( + _param = self._disable_endpoint_agent_serialize( agent_id=agent_id, aid=aid, _request_auth=_request_auth, @@ -576,7 +579,7 @@ class ManageAgentsApi: return response_data.response - def _endpoint_agent_disable_serialize( + def _disable_endpoint_agent_serialize( self, agent_id, aid, @@ -615,6 +618,7 @@ class ManageAgentsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -644,7 +648,7 @@ class ManageAgentsApi: @validate_call - def endpoint_agent_enable( + def enable_endpoint_agent( self, agent_id: Annotated[StrictStr, Field(description="The identifier of the agent to operate on.")], 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, @@ -691,7 +695,7 @@ class ManageAgentsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._endpoint_agent_enable_serialize( + _param = self._enable_endpoint_agent_serialize( agent_id=agent_id, aid=aid, _request_auth=_request_auth, @@ -720,7 +724,7 @@ class ManageAgentsApi: @validate_call - def endpoint_agent_enable_with_http_info( + def enable_endpoint_agent_with_http_info( self, agent_id: Annotated[StrictStr, Field(description="The identifier of the agent to operate on.")], 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, @@ -767,7 +771,7 @@ class ManageAgentsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._endpoint_agent_enable_serialize( + _param = self._enable_endpoint_agent_serialize( agent_id=agent_id, aid=aid, _request_auth=_request_auth, @@ -796,7 +800,7 @@ class ManageAgentsApi: @validate_call - def endpoint_agent_enable_without_preload_content( + def enable_endpoint_agent_without_preload_content( self, agent_id: Annotated[StrictStr, Field(description="The identifier of the agent to operate on.")], 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, @@ -843,7 +847,7 @@ class ManageAgentsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._endpoint_agent_enable_serialize( + _param = self._enable_endpoint_agent_serialize( agent_id=agent_id, aid=aid, _request_auth=_request_auth, @@ -866,7 +870,7 @@ class ManageAgentsApi: return response_data.response - def _endpoint_agent_enable_serialize( + def _enable_endpoint_agent_serialize( self, agent_id, aid, @@ -905,6 +909,7 @@ class ManageAgentsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -934,7 +939,380 @@ class ManageAgentsApi: @validate_call - def endpoint_agent_get( + def filter_endpoint_agents( + self, + agent_search_request: Annotated[AgentSearchRequest, Field(description="The filter options for advanced search filtering for agents.")], + max: Annotated[Optional[StrictInt], Field(description="(Optional) Maximum number of objects to return.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, + 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, + expand: Annotated[Optional[List[Expand]], Field(description="This optional parameter allows you to control the expansion of test resources associated with the agent. By default, no expansion occurs when this query parameter is omitted. To expand the \"clients\" resource, include the query parameter `?expand=clients`. For multiple expansions, you have two options: * Separate the values with commas. For example, `?expandAgent=clients,tasks`. * Specify the parameter multiple times. For example, `?expandAgent=clients&expandAgent=tasks`. This parameter offers flexibility for users to customize the expansion of specific resources related to the agent. ")] = None, + include_deleted: Annotated[Optional[StrictBool], Field(description="When requesting entities, set to `true` if you want to see deleted entities.")] = 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, + ) -> FilterEndpointAgentsResponse: + """Filter endpoint agents + + Retrieves a list of endpoint agents within the specified account group that match the specified filters. If no agents meet the filter criteria, the API returns an empty array. + + :param agent_search_request: The filter options for advanced search filtering for agents. (required) + :type agent_search_request: AgentSearchRequest + :param max: (Optional) Maximum number of objects to return. + :type max: int + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: str + :param 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 expand: This optional parameter allows you to control the expansion of test resources associated with the agent. By default, no expansion occurs when this query parameter is omitted. To expand the \"clients\" resource, include the query parameter `?expand=clients`. For multiple expansions, you have two options: * Separate the values with commas. For example, `?expandAgent=clients,tasks`. * Specify the parameter multiple times. For example, `?expandAgent=clients&expandAgent=tasks`. This parameter offers flexibility for users to customize the expansion of specific resources related to the agent. + :type expand: List[Expand] + :param include_deleted: When requesting entities, set to `true` if you want to see deleted entities. + :type include_deleted: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (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._filter_endpoint_agents_serialize( + agent_search_request=agent_search_request, + max=max, + cursor=cursor, + aid=aid, + expand=expand, + include_deleted=include_deleted, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FilterEndpointAgentsResponse", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '429': "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.endpoint_agents.models, + ).data + + + @validate_call + def filter_endpoint_agents_with_http_info( + self, + agent_search_request: Annotated[AgentSearchRequest, Field(description="The filter options for advanced search filtering for agents.")], + max: Annotated[Optional[StrictInt], Field(description="(Optional) Maximum number of objects to return.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, + 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, + expand: Annotated[Optional[List[Expand]], Field(description="This optional parameter allows you to control the expansion of test resources associated with the agent. By default, no expansion occurs when this query parameter is omitted. To expand the \"clients\" resource, include the query parameter `?expand=clients`. For multiple expansions, you have two options: * Separate the values with commas. For example, `?expandAgent=clients,tasks`. * Specify the parameter multiple times. For example, `?expandAgent=clients&expandAgent=tasks`. This parameter offers flexibility for users to customize the expansion of specific resources related to the agent. ")] = None, + include_deleted: Annotated[Optional[StrictBool], Field(description="When requesting entities, set to `true` if you want to see deleted entities.")] = 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[FilterEndpointAgentsResponse]: + """Filter endpoint agents + + Retrieves a list of endpoint agents within the specified account group that match the specified filters. If no agents meet the filter criteria, the API returns an empty array. + + :param agent_search_request: The filter options for advanced search filtering for agents. (required) + :type agent_search_request: AgentSearchRequest + :param max: (Optional) Maximum number of objects to return. + :type max: int + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: str + :param 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 expand: This optional parameter allows you to control the expansion of test resources associated with the agent. By default, no expansion occurs when this query parameter is omitted. To expand the \"clients\" resource, include the query parameter `?expand=clients`. For multiple expansions, you have two options: * Separate the values with commas. For example, `?expandAgent=clients,tasks`. * Specify the parameter multiple times. For example, `?expandAgent=clients&expandAgent=tasks`. This parameter offers flexibility for users to customize the expansion of specific resources related to the agent. + :type expand: List[Expand] + :param include_deleted: When requesting entities, set to `true` if you want to see deleted entities. + :type include_deleted: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (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._filter_endpoint_agents_serialize( + agent_search_request=agent_search_request, + max=max, + cursor=cursor, + aid=aid, + expand=expand, + include_deleted=include_deleted, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FilterEndpointAgentsResponse", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '429': "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.endpoint_agents.models, + ) + + + @validate_call + def filter_endpoint_agents_without_preload_content( + self, + agent_search_request: Annotated[AgentSearchRequest, Field(description="The filter options for advanced search filtering for agents.")], + max: Annotated[Optional[StrictInt], Field(description="(Optional) Maximum number of objects to return.")] = None, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, + 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, + expand: Annotated[Optional[List[Expand]], Field(description="This optional parameter allows you to control the expansion of test resources associated with the agent. By default, no expansion occurs when this query parameter is omitted. To expand the \"clients\" resource, include the query parameter `?expand=clients`. For multiple expansions, you have two options: * Separate the values with commas. For example, `?expandAgent=clients,tasks`. * Specify the parameter multiple times. For example, `?expandAgent=clients&expandAgent=tasks`. This parameter offers flexibility for users to customize the expansion of specific resources related to the agent. ")] = None, + include_deleted: Annotated[Optional[StrictBool], Field(description="When requesting entities, set to `true` if you want to see deleted entities.")] = 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: + """Filter endpoint agents + + Retrieves a list of endpoint agents within the specified account group that match the specified filters. If no agents meet the filter criteria, the API returns an empty array. + + :param agent_search_request: The filter options for advanced search filtering for agents. (required) + :type agent_search_request: AgentSearchRequest + :param max: (Optional) Maximum number of objects to return. + :type max: int + :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: str + :param 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 expand: This optional parameter allows you to control the expansion of test resources associated with the agent. By default, no expansion occurs when this query parameter is omitted. To expand the \"clients\" resource, include the query parameter `?expand=clients`. For multiple expansions, you have two options: * Separate the values with commas. For example, `?expandAgent=clients,tasks`. * Specify the parameter multiple times. For example, `?expandAgent=clients&expandAgent=tasks`. This parameter offers flexibility for users to customize the expansion of specific resources related to the agent. + :type expand: List[Expand] + :param include_deleted: When requesting entities, set to `true` if you want to see deleted entities. + :type include_deleted: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (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._filter_endpoint_agents_serialize( + agent_search_request=agent_search_request, + max=max, + cursor=cursor, + aid=aid, + expand=expand, + include_deleted=include_deleted, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FilterEndpointAgentsResponse", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '429': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _filter_endpoint_agents_serialize( + self, + agent_search_request, + max, + cursor, + aid, + expand, + include_deleted, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'expand': 'csv', + } + + _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 max is not None: + + _query_params.append(('max', max)) + + if cursor is not None: + + _query_params.append(('cursor', cursor)) + + if aid is not None: + + _query_params.append(('aid', aid)) + + if expand is not None: + + _query_params.append(('expand', expand)) + + if include_deleted is not None: + + _query_params.append(('includeDeleted', include_deleted)) + + # process the header parameters + # process the form parameters + # process the body parameter + if agent_search_request is not None: + _body_params = agent_search_request + + + # 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] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v7/endpoint/agents/filter', + 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_endpoint_agent( self, agent_id: Annotated[StrictStr, Field(description="The identifier of the agent to operate on.")], 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, @@ -987,7 +1365,7 @@ class ManageAgentsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._endpoint_agent_get_serialize( + _param = self._get_endpoint_agent_serialize( agent_id=agent_id, aid=aid, expand=expand, @@ -1018,7 +1396,7 @@ class ManageAgentsApi: @validate_call - def endpoint_agent_get_with_http_info( + def get_endpoint_agent_with_http_info( self, agent_id: Annotated[StrictStr, Field(description="The identifier of the agent to operate on.")], 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, @@ -1071,7 +1449,7 @@ class ManageAgentsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._endpoint_agent_get_serialize( + _param = self._get_endpoint_agent_serialize( agent_id=agent_id, aid=aid, expand=expand, @@ -1102,7 +1480,7 @@ class ManageAgentsApi: @validate_call - def endpoint_agent_get_without_preload_content( + def get_endpoint_agent_without_preload_content( self, agent_id: Annotated[StrictStr, Field(description="The identifier of the agent to operate on.")], 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, @@ -1155,7 +1533,7 @@ class ManageAgentsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._endpoint_agent_get_serialize( + _param = self._get_endpoint_agent_serialize( agent_id=agent_id, aid=aid, expand=expand, @@ -1180,7 +1558,7 @@ class ManageAgentsApi: return response_data.response - def _endpoint_agent_get_serialize( + def _get_endpoint_agent_serialize( self, agent_id, aid, @@ -1230,6 +1608,7 @@ class ManageAgentsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1259,345 +1638,9 @@ class ManageAgentsApi: @validate_call - def endpoint_agent_update( + def get_endpoint_agents( self, - agent_id: Annotated[StrictStr, Field(description="The identifier of the agent to operate on.")], - 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, - expand: Annotated[Optional[List[Expand]], Field(description="This optional parameter allows you to control the expansion of test resources associated with the agent. By default, no expansion occurs when this query parameter is omitted. To expand the \"clients\" resource, include the query parameter `?expand=clients`. For multiple expansions, you have two options: * Separate the values with commas. For example, `?expandAgent=clients,tasks`. * Specify the parameter multiple times. For example, `?expandAgent=clients&expandAgent=tasks`. This parameter offers flexibility for users to customize the expansion of specific resources related to the agent. ")] = None, - endpoint_agent_update: Annotated[Optional[EndpointAgentUpdate], Field(description="Fields to modify on the agent")] = 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, - ) -> EndpointAgent: - """Update endpoint agent - - Updates the agent with the specified `agent_id`. This API supports the modification of the following fields: * `name` * `licenseType` Any attempt to update fields other than those listed above, with a value different from their current value, will result in a 400 Bad Request response. - - :param agent_id: The identifier of the agent to operate on. (required) - :type agent_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 expand: This optional parameter allows you to control the expansion of test resources associated with the agent. By default, no expansion occurs when this query parameter is omitted. To expand the \"clients\" resource, include the query parameter `?expand=clients`. For multiple expansions, you have two options: * Separate the values with commas. For example, `?expandAgent=clients,tasks`. * Specify the parameter multiple times. For example, `?expandAgent=clients&expandAgent=tasks`. This parameter offers flexibility for users to customize the expansion of specific resources related to the agent. - :type expand: List[Expand] - :param endpoint_agent_update: Fields to modify on the agent - :type endpoint_agent_update: EndpointAgentUpdate - :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._endpoint_agent_update_serialize( - agent_id=agent_id, - aid=aid, - expand=expand, - endpoint_agent_update=endpoint_agent_update, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "EndpointAgent", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "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.endpoint_agents.models, - ).data - - - @validate_call - def endpoint_agent_update_with_http_info( - self, - agent_id: Annotated[StrictStr, Field(description="The identifier of the agent to operate on.")], - 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, - expand: Annotated[Optional[List[Expand]], Field(description="This optional parameter allows you to control the expansion of test resources associated with the agent. By default, no expansion occurs when this query parameter is omitted. To expand the \"clients\" resource, include the query parameter `?expand=clients`. For multiple expansions, you have two options: * Separate the values with commas. For example, `?expandAgent=clients,tasks`. * Specify the parameter multiple times. For example, `?expandAgent=clients&expandAgent=tasks`. This parameter offers flexibility for users to customize the expansion of specific resources related to the agent. ")] = None, - endpoint_agent_update: Annotated[Optional[EndpointAgentUpdate], Field(description="Fields to modify on the agent")] = 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[EndpointAgent]: - """Update endpoint agent - - Updates the agent with the specified `agent_id`. This API supports the modification of the following fields: * `name` * `licenseType` Any attempt to update fields other than those listed above, with a value different from their current value, will result in a 400 Bad Request response. - - :param agent_id: The identifier of the agent to operate on. (required) - :type agent_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 expand: This optional parameter allows you to control the expansion of test resources associated with the agent. By default, no expansion occurs when this query parameter is omitted. To expand the \"clients\" resource, include the query parameter `?expand=clients`. For multiple expansions, you have two options: * Separate the values with commas. For example, `?expandAgent=clients,tasks`. * Specify the parameter multiple times. For example, `?expandAgent=clients&expandAgent=tasks`. This parameter offers flexibility for users to customize the expansion of specific resources related to the agent. - :type expand: List[Expand] - :param endpoint_agent_update: Fields to modify on the agent - :type endpoint_agent_update: EndpointAgentUpdate - :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._endpoint_agent_update_serialize( - agent_id=agent_id, - aid=aid, - expand=expand, - endpoint_agent_update=endpoint_agent_update, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "EndpointAgent", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "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.endpoint_agents.models, - ) - - - @validate_call - def endpoint_agent_update_without_preload_content( - self, - agent_id: Annotated[StrictStr, Field(description="The identifier of the agent to operate on.")], - 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, - expand: Annotated[Optional[List[Expand]], Field(description="This optional parameter allows you to control the expansion of test resources associated with the agent. By default, no expansion occurs when this query parameter is omitted. To expand the \"clients\" resource, include the query parameter `?expand=clients`. For multiple expansions, you have two options: * Separate the values with commas. For example, `?expandAgent=clients,tasks`. * Specify the parameter multiple times. For example, `?expandAgent=clients&expandAgent=tasks`. This parameter offers flexibility for users to customize the expansion of specific resources related to the agent. ")] = None, - endpoint_agent_update: Annotated[Optional[EndpointAgentUpdate], Field(description="Fields to modify on the agent")] = 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: - """Update endpoint agent - - Updates the agent with the specified `agent_id`. This API supports the modification of the following fields: * `name` * `licenseType` Any attempt to update fields other than those listed above, with a value different from their current value, will result in a 400 Bad Request response. - - :param agent_id: The identifier of the agent to operate on. (required) - :type agent_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 expand: This optional parameter allows you to control the expansion of test resources associated with the agent. By default, no expansion occurs when this query parameter is omitted. To expand the \"clients\" resource, include the query parameter `?expand=clients`. For multiple expansions, you have two options: * Separate the values with commas. For example, `?expandAgent=clients,tasks`. * Specify the parameter multiple times. For example, `?expandAgent=clients&expandAgent=tasks`. This parameter offers flexibility for users to customize the expansion of specific resources related to the agent. - :type expand: List[Expand] - :param endpoint_agent_update: Fields to modify on the agent - :type endpoint_agent_update: EndpointAgentUpdate - :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._endpoint_agent_update_serialize( - agent_id=agent_id, - aid=aid, - expand=expand, - endpoint_agent_update=endpoint_agent_update, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "EndpointAgent", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _endpoint_agent_update_serialize( - self, - agent_id, - aid, - expand, - endpoint_agent_update, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - 'expand': 'csv', - } - - _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 agent_id is not None: - _path_params['agentId'] = agent_id - # process the query parameters - if aid is not None: - - _query_params.append(('aid', aid)) - - if expand is not None: - - _query_params.append(('expand', expand)) - - # process the header parameters - # process the form parameters - # process the body parameter - if endpoint_agent_update is not None: - _body_params = endpoint_agent_update - - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/hal+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] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='PATCH', - resource_path='/v7/endpoint/agents/{agentId}', - 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 endpoint_agents_list( - self, - max: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="(Optional) Maximum number of objects to return.")] = None, + max: Annotated[Optional[StrictInt], Field(description="(Optional) Maximum number of objects to return.")] = None, cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, 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, expand: Annotated[Optional[List[Expand]], Field(description="This optional parameter allows you to control the expansion of test resources associated with the agent. By default, no expansion occurs when this query parameter is omitted. To expand the \"clients\" resource, include the query parameter `?expand=clients`. For multiple expansions, you have two options: * Separate the values with commas. For example, `?expandAgent=clients,tasks`. * Specify the parameter multiple times. For example, `?expandAgent=clients&expandAgent=tasks`. This parameter offers flexibility for users to customize the expansion of specific resources related to the agent. ")] = None, @@ -1623,7 +1666,7 @@ class ManageAgentsApi: Retrieves a list of endpoint agents in a given account group. If there are no agents in the specified account group, it returns an empty array. :param max: (Optional) Maximum number of objects to return. - :type max: float + :type max: int :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. :type cursor: str :param 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. @@ -1660,7 +1703,7 @@ class ManageAgentsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._endpoint_agents_list_serialize( + _param = self._get_endpoint_agents_serialize( max=max, cursor=cursor, aid=aid, @@ -1694,9 +1737,9 @@ class ManageAgentsApi: @validate_call - def endpoint_agents_list_with_http_info( + def get_endpoint_agents_with_http_info( self, - max: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="(Optional) Maximum number of objects to return.")] = None, + max: Annotated[Optional[StrictInt], Field(description="(Optional) Maximum number of objects to return.")] = None, cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, 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, expand: Annotated[Optional[List[Expand]], Field(description="This optional parameter allows you to control the expansion of test resources associated with the agent. By default, no expansion occurs when this query parameter is omitted. To expand the \"clients\" resource, include the query parameter `?expand=clients`. For multiple expansions, you have two options: * Separate the values with commas. For example, `?expandAgent=clients,tasks`. * Specify the parameter multiple times. For example, `?expandAgent=clients&expandAgent=tasks`. This parameter offers flexibility for users to customize the expansion of specific resources related to the agent. ")] = None, @@ -1722,7 +1765,7 @@ class ManageAgentsApi: Retrieves a list of endpoint agents in a given account group. If there are no agents in the specified account group, it returns an empty array. :param max: (Optional) Maximum number of objects to return. - :type max: float + :type max: int :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. :type cursor: str :param 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. @@ -1759,7 +1802,7 @@ class ManageAgentsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._endpoint_agents_list_serialize( + _param = self._get_endpoint_agents_serialize( max=max, cursor=cursor, aid=aid, @@ -1793,9 +1836,9 @@ class ManageAgentsApi: @validate_call - def endpoint_agents_list_without_preload_content( + def get_endpoint_agents_without_preload_content( self, - max: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="(Optional) Maximum number of objects to return.")] = None, + max: Annotated[Optional[StrictInt], Field(description="(Optional) Maximum number of objects to return.")] = None, cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, 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, expand: Annotated[Optional[List[Expand]], Field(description="This optional parameter allows you to control the expansion of test resources associated with the agent. By default, no expansion occurs when this query parameter is omitted. To expand the \"clients\" resource, include the query parameter `?expand=clients`. For multiple expansions, you have two options: * Separate the values with commas. For example, `?expandAgent=clients,tasks`. * Specify the parameter multiple times. For example, `?expandAgent=clients&expandAgent=tasks`. This parameter offers flexibility for users to customize the expansion of specific resources related to the agent. ")] = None, @@ -1821,7 +1864,7 @@ class ManageAgentsApi: Retrieves a list of endpoint agents in a given account group. If there are no agents in the specified account group, it returns an empty array. :param max: (Optional) Maximum number of objects to return. - :type max: float + :type max: int :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. :type cursor: str :param 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. @@ -1858,7 +1901,7 @@ class ManageAgentsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._endpoint_agents_list_serialize( + _param = self._get_endpoint_agents_serialize( max=max, cursor=cursor, aid=aid, @@ -1886,7 +1929,7 @@ class ManageAgentsApi: return response_data.response - def _endpoint_agents_list_serialize( + def _get_endpoint_agents_serialize( self, max, cursor, @@ -1958,6 +2001,7 @@ class ManageAgentsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1987,14 +2031,12 @@ class ManageAgentsApi: @validate_call - def endpoint_agents_search( + def update_endpoint_agent( self, - agent_search_request: Annotated[AgentSearchRequest, Field(description="The filter options for advanced search filtering for agents.")], - max: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="(Optional) Maximum number of objects to return.")] = None, - cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, + agent_id: Annotated[StrictStr, Field(description="The identifier of the agent to operate on.")], 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, expand: Annotated[Optional[List[Expand]], Field(description="This optional parameter allows you to control the expansion of test resources associated with the agent. By default, no expansion occurs when this query parameter is omitted. To expand the \"clients\" resource, include the query parameter `?expand=clients`. For multiple expansions, you have two options: * Separate the values with commas. For example, `?expandAgent=clients,tasks`. * Specify the parameter multiple times. For example, `?expandAgent=clients&expandAgent=tasks`. This parameter offers flexibility for users to customize the expansion of specific resources related to the agent. ")] = None, - include_deleted: Annotated[Optional[StrictBool], Field(description="When requesting entities, set to `true` if you want to see deleted entities.")] = None, + endpoint_agent_update: Annotated[Optional[EndpointAgentUpdate], Field(description="Fields to modify on the agent")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2007,23 +2049,19 @@ class ManageAgentsApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> FilterEndpointAgentsResponse: - """Filter endpoint agents + ) -> EndpointAgent: + """Update endpoint agent - Retrieves a list of endpoint agents within the specified account group that match the specified filters. If no agents meet the filter criteria, the API returns an empty array. + Updates the agent with the specified `agent_id`. This API supports the modification of the following fields: * `name` * `licenseType` Any attempt to update fields other than those listed above, with a value different from their current value, will result in a 400 Bad Request response. - :param agent_search_request: The filter options for advanced search filtering for agents. (required) - :type agent_search_request: AgentSearchRequest - :param max: (Optional) Maximum number of objects to return. - :type max: float - :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. - :type cursor: str + :param agent_id: The identifier of the agent to operate on. (required) + :type agent_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 expand: This optional parameter allows you to control the expansion of test resources associated with the agent. By default, no expansion occurs when this query parameter is omitted. To expand the \"clients\" resource, include the query parameter `?expand=clients`. For multiple expansions, you have two options: * Separate the values with commas. For example, `?expandAgent=clients,tasks`. * Specify the parameter multiple times. For example, `?expandAgent=clients&expandAgent=tasks`. This parameter offers flexibility for users to customize the expansion of specific resources related to the agent. :type expand: List[Expand] - :param include_deleted: When requesting entities, set to `true` if you want to see deleted entities. - :type include_deleted: bool + :param endpoint_agent_update: Fields to modify on the agent + :type endpoint_agent_update: EndpointAgentUpdate :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 @@ -2046,13 +2084,11 @@ class ManageAgentsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._endpoint_agents_search_serialize( - agent_search_request=agent_search_request, - max=max, - cursor=cursor, + _param = self._update_endpoint_agent_serialize( + agent_id=agent_id, aid=aid, expand=expand, - include_deleted=include_deleted, + endpoint_agent_update=endpoint_agent_update, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2060,10 +2096,10 @@ class ManageAgentsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FilterEndpointAgentsResponse", - '400': "ValidationError", + '200': "EndpointAgent", '401': "UnauthorizedError", '403': "Error", + '404': "Error", '429': "Error", } response_data = self.api_client.call_api( @@ -2079,14 +2115,12 @@ class ManageAgentsApi: @validate_call - def endpoint_agents_search_with_http_info( + def update_endpoint_agent_with_http_info( self, - agent_search_request: Annotated[AgentSearchRequest, Field(description="The filter options for advanced search filtering for agents.")], - max: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="(Optional) Maximum number of objects to return.")] = None, - cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, + agent_id: Annotated[StrictStr, Field(description="The identifier of the agent to operate on.")], 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, expand: Annotated[Optional[List[Expand]], Field(description="This optional parameter allows you to control the expansion of test resources associated with the agent. By default, no expansion occurs when this query parameter is omitted. To expand the \"clients\" resource, include the query parameter `?expand=clients`. For multiple expansions, you have two options: * Separate the values with commas. For example, `?expandAgent=clients,tasks`. * Specify the parameter multiple times. For example, `?expandAgent=clients&expandAgent=tasks`. This parameter offers flexibility for users to customize the expansion of specific resources related to the agent. ")] = None, - include_deleted: Annotated[Optional[StrictBool], Field(description="When requesting entities, set to `true` if you want to see deleted entities.")] = None, + endpoint_agent_update: Annotated[Optional[EndpointAgentUpdate], Field(description="Fields to modify on the agent")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2099,23 +2133,19 @@ class ManageAgentsApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[FilterEndpointAgentsResponse]: - """Filter endpoint agents + ) -> ApiResponse[EndpointAgent]: + """Update endpoint agent - Retrieves a list of endpoint agents within the specified account group that match the specified filters. If no agents meet the filter criteria, the API returns an empty array. + Updates the agent with the specified `agent_id`. This API supports the modification of the following fields: * `name` * `licenseType` Any attempt to update fields other than those listed above, with a value different from their current value, will result in a 400 Bad Request response. - :param agent_search_request: The filter options for advanced search filtering for agents. (required) - :type agent_search_request: AgentSearchRequest - :param max: (Optional) Maximum number of objects to return. - :type max: float - :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. - :type cursor: str + :param agent_id: The identifier of the agent to operate on. (required) + :type agent_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 expand: This optional parameter allows you to control the expansion of test resources associated with the agent. By default, no expansion occurs when this query parameter is omitted. To expand the \"clients\" resource, include the query parameter `?expand=clients`. For multiple expansions, you have two options: * Separate the values with commas. For example, `?expandAgent=clients,tasks`. * Specify the parameter multiple times. For example, `?expandAgent=clients&expandAgent=tasks`. This parameter offers flexibility for users to customize the expansion of specific resources related to the agent. :type expand: List[Expand] - :param include_deleted: When requesting entities, set to `true` if you want to see deleted entities. - :type include_deleted: bool + :param endpoint_agent_update: Fields to modify on the agent + :type endpoint_agent_update: EndpointAgentUpdate :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 @@ -2138,13 +2168,11 @@ class ManageAgentsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._endpoint_agents_search_serialize( - agent_search_request=agent_search_request, - max=max, - cursor=cursor, + _param = self._update_endpoint_agent_serialize( + agent_id=agent_id, aid=aid, expand=expand, - include_deleted=include_deleted, + endpoint_agent_update=endpoint_agent_update, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2152,10 +2180,10 @@ class ManageAgentsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FilterEndpointAgentsResponse", - '400': "ValidationError", + '200': "EndpointAgent", '401': "UnauthorizedError", '403': "Error", + '404': "Error", '429': "Error", } response_data = self.api_client.call_api( @@ -2171,14 +2199,12 @@ class ManageAgentsApi: @validate_call - def endpoint_agents_search_without_preload_content( + def update_endpoint_agent_without_preload_content( self, - agent_search_request: Annotated[AgentSearchRequest, Field(description="The filter options for advanced search filtering for agents.")], - max: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="(Optional) Maximum number of objects to return.")] = None, - cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, + agent_id: Annotated[StrictStr, Field(description="The identifier of the agent to operate on.")], 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, expand: Annotated[Optional[List[Expand]], Field(description="This optional parameter allows you to control the expansion of test resources associated with the agent. By default, no expansion occurs when this query parameter is omitted. To expand the \"clients\" resource, include the query parameter `?expand=clients`. For multiple expansions, you have two options: * Separate the values with commas. For example, `?expandAgent=clients,tasks`. * Specify the parameter multiple times. For example, `?expandAgent=clients&expandAgent=tasks`. This parameter offers flexibility for users to customize the expansion of specific resources related to the agent. ")] = None, - include_deleted: Annotated[Optional[StrictBool], Field(description="When requesting entities, set to `true` if you want to see deleted entities.")] = None, + endpoint_agent_update: Annotated[Optional[EndpointAgentUpdate], Field(description="Fields to modify on the agent")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2192,22 +2218,18 @@ class ManageAgentsApi: _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Filter endpoint agents + """Update endpoint agent - Retrieves a list of endpoint agents within the specified account group that match the specified filters. If no agents meet the filter criteria, the API returns an empty array. + Updates the agent with the specified `agent_id`. This API supports the modification of the following fields: * `name` * `licenseType` Any attempt to update fields other than those listed above, with a value different from their current value, will result in a 400 Bad Request response. - :param agent_search_request: The filter options for advanced search filtering for agents. (required) - :type agent_search_request: AgentSearchRequest - :param max: (Optional) Maximum number of objects to return. - :type max: float - :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. - :type cursor: str + :param agent_id: The identifier of the agent to operate on. (required) + :type agent_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 expand: This optional parameter allows you to control the expansion of test resources associated with the agent. By default, no expansion occurs when this query parameter is omitted. To expand the \"clients\" resource, include the query parameter `?expand=clients`. For multiple expansions, you have two options: * Separate the values with commas. For example, `?expandAgent=clients,tasks`. * Specify the parameter multiple times. For example, `?expandAgent=clients&expandAgent=tasks`. This parameter offers flexibility for users to customize the expansion of specific resources related to the agent. :type expand: List[Expand] - :param include_deleted: When requesting entities, set to `true` if you want to see deleted entities. - :type include_deleted: bool + :param endpoint_agent_update: Fields to modify on the agent + :type endpoint_agent_update: EndpointAgentUpdate :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 @@ -2230,13 +2252,11 @@ class ManageAgentsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._endpoint_agents_search_serialize( - agent_search_request=agent_search_request, - max=max, - cursor=cursor, + _param = self._update_endpoint_agent_serialize( + agent_id=agent_id, aid=aid, expand=expand, - include_deleted=include_deleted, + endpoint_agent_update=endpoint_agent_update, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2244,10 +2264,10 @@ class ManageAgentsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FilterEndpointAgentsResponse", - '400': "ValidationError", + '200': "EndpointAgent", '401': "UnauthorizedError", '403': "Error", + '404': "Error", '429': "Error", } response_data = self.api_client.call_api( @@ -2257,14 +2277,12 @@ class ManageAgentsApi: return response_data.response - def _endpoint_agents_search_serialize( + def _update_endpoint_agent_serialize( self, - agent_search_request, - max, - cursor, + agent_id, aid, expand, - include_deleted, + endpoint_agent_update, _request_auth, _content_type, _headers, @@ -2285,15 +2303,9 @@ class ManageAgentsApi: _body_params: Optional[bytes] = None # process the path parameters + if agent_id is not None: + _path_params['agentId'] = agent_id # process the query parameters - if max is not None: - - _query_params.append(('max', max)) - - if cursor is not None: - - _query_params.append(('cursor', cursor)) - if aid is not None: _query_params.append(('aid', aid)) @@ -2302,21 +2314,18 @@ class ManageAgentsApi: _query_params.append(('expand', expand)) - if include_deleted is not None: - - _query_params.append(('includeDeleted', include_deleted)) - # process the header parameters # process the form parameters # process the body parameter - if agent_search_request is not None: - _body_params = agent_search_request + if endpoint_agent_update is not None: + _body_params = endpoint_agent_update # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -2341,8 +2350,8 @@ class ManageAgentsApi: ] return self.api_client.param_serialize( - method='POST', - resource_path='/v7/endpoint/agents/filter', + method='PATCH', + resource_path='/v7/endpoint/agents/{agentId}', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/api/transfer_api.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/api/transfer_api.py index 166bc13f..4870d4fa 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/api/transfer_api.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/api/transfer_api.py @@ -5,7 +5,7 @@ Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -28,6 +28,7 @@ from thousandeyes_sdk.endpoint_agents.models.bulk_agent_transfer_response import from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class TransferApi: @@ -40,319 +41,12 @@ class TransferApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @validate_call - def endpoint_agent_bulk_transfer( - 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, - bulk_agent_transfer_request: Annotated[Optional[BulkAgentTransferRequest], Field(description="A collection of `AgentTransfers`.")] = 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, - ) -> BulkAgentTransferResponse: - """Bulk transfer agents - - Initiates the transfer of multiple agents between accounts. The following conditions apply: * The requester must possess 'write' permissions for both the 'from' and 'to' accounts involved in each transfer. * Multiple transfers may involve a mix of different source and destination accounts. * For each transfer request, the 'from' account must match the current account of the respective agent. * Transfers are executed asynchronously. * Progress tracking is not intended, but users can monitor the progress by periodically polling the 'get agent' endpoint. * Each transfer request is individually validated and completed; this operation is not atomic, meaning transfers can succeed or fail individually. * The API response provides the status of each transfer request. - - :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 bulk_agent_transfer_request: A collection of `AgentTransfers`. - :type bulk_agent_transfer_request: BulkAgentTransferRequest - :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._endpoint_agent_bulk_transfer_serialize( - aid=aid, - bulk_agent_transfer_request=bulk_agent_transfer_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '207': "BulkAgentTransferResponse", - '400': "ValidationError", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "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.endpoint_agents.models, - ).data - - - @validate_call - def endpoint_agent_bulk_transfer_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, - bulk_agent_transfer_request: Annotated[Optional[BulkAgentTransferRequest], Field(description="A collection of `AgentTransfers`.")] = 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[BulkAgentTransferResponse]: - """Bulk transfer agents - - Initiates the transfer of multiple agents between accounts. The following conditions apply: * The requester must possess 'write' permissions for both the 'from' and 'to' accounts involved in each transfer. * Multiple transfers may involve a mix of different source and destination accounts. * For each transfer request, the 'from' account must match the current account of the respective agent. * Transfers are executed asynchronously. * Progress tracking is not intended, but users can monitor the progress by periodically polling the 'get agent' endpoint. * Each transfer request is individually validated and completed; this operation is not atomic, meaning transfers can succeed or fail individually. * The API response provides the status of each transfer request. - - :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 bulk_agent_transfer_request: A collection of `AgentTransfers`. - :type bulk_agent_transfer_request: BulkAgentTransferRequest - :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._endpoint_agent_bulk_transfer_serialize( - aid=aid, - bulk_agent_transfer_request=bulk_agent_transfer_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '207': "BulkAgentTransferResponse", - '400': "ValidationError", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "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.endpoint_agents.models, - ) - - - @validate_call - def endpoint_agent_bulk_transfer_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, - bulk_agent_transfer_request: Annotated[Optional[BulkAgentTransferRequest], Field(description="A collection of `AgentTransfers`.")] = 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: - """Bulk transfer agents - - Initiates the transfer of multiple agents between accounts. The following conditions apply: * The requester must possess 'write' permissions for both the 'from' and 'to' accounts involved in each transfer. * Multiple transfers may involve a mix of different source and destination accounts. * For each transfer request, the 'from' account must match the current account of the respective agent. * Transfers are executed asynchronously. * Progress tracking is not intended, but users can monitor the progress by periodically polling the 'get agent' endpoint. * Each transfer request is individually validated and completed; this operation is not atomic, meaning transfers can succeed or fail individually. * The API response provides the status of each transfer request. - - :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 bulk_agent_transfer_request: A collection of `AgentTransfers`. - :type bulk_agent_transfer_request: BulkAgentTransferRequest - :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._endpoint_agent_bulk_transfer_serialize( - aid=aid, - bulk_agent_transfer_request=bulk_agent_transfer_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '207': "BulkAgentTransferResponse", - '400': "ValidationError", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _endpoint_agent_bulk_transfer_serialize( - self, - aid, - bulk_agent_transfer_request, - _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 - if bulk_agent_transfer_request is not None: - _body_params = bulk_agent_transfer_request - - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/hal+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', - 'text/csv', - 'text/plain' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/v7/endpoint/agents/transfer/bulk', - 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 endpoint_agent_single_transfer( + def transfer_endpoint_agent( self, agent_id: Annotated[StrictStr, Field(description="The identifier of the agent to operate on.")], agent_transfer_request: Annotated[AgentTransferRequest, Field(description="The request to move an agent between accounts.")], @@ -402,7 +96,7 @@ class TransferApi: :return: Returns the result object. """ # noqa: E501 - _param = self._endpoint_agent_single_transfer_serialize( + _param = self._transfer_endpoint_agent_serialize( agent_id=agent_id, agent_transfer_request=agent_transfer_request, aid=aid, @@ -432,7 +126,7 @@ class TransferApi: @validate_call - def endpoint_agent_single_transfer_with_http_info( + def transfer_endpoint_agent_with_http_info( self, agent_id: Annotated[StrictStr, Field(description="The identifier of the agent to operate on.")], agent_transfer_request: Annotated[AgentTransferRequest, Field(description="The request to move an agent between accounts.")], @@ -482,7 +176,7 @@ class TransferApi: :return: Returns the result object. """ # noqa: E501 - _param = self._endpoint_agent_single_transfer_serialize( + _param = self._transfer_endpoint_agent_serialize( agent_id=agent_id, agent_transfer_request=agent_transfer_request, aid=aid, @@ -512,7 +206,7 @@ class TransferApi: @validate_call - def endpoint_agent_single_transfer_without_preload_content( + def transfer_endpoint_agent_without_preload_content( self, agent_id: Annotated[StrictStr, Field(description="The identifier of the agent to operate on.")], agent_transfer_request: Annotated[AgentTransferRequest, Field(description="The request to move an agent between accounts.")], @@ -562,7 +256,7 @@ class TransferApi: :return: Returns the result object. """ # noqa: E501 - _param = self._endpoint_agent_single_transfer_serialize( + _param = self._transfer_endpoint_agent_serialize( agent_id=agent_id, agent_transfer_request=agent_transfer_request, aid=aid, @@ -586,7 +280,7 @@ class TransferApi: return response_data.response - def _endpoint_agent_single_transfer_serialize( + def _transfer_endpoint_agent_serialize( self, agent_id, agent_transfer_request, @@ -627,6 +321,7 @@ class TransferApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ + 'application/json', 'application/problem+json' ] ) @@ -666,3 +361,312 @@ class TransferApi: ) + + + @validate_call + def transfer_endpoint_agents( + 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, + bulk_agent_transfer_request: Annotated[Optional[BulkAgentTransferRequest], Field(description="A collection of `AgentTransfers`.")] = 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, + ) -> BulkAgentTransferResponse: + """Bulk transfer agents + + Initiates the transfer of multiple agents between accounts. The following conditions apply: * The requester must possess 'write' permissions for both the 'from' and 'to' accounts involved in each transfer. * Multiple transfers may involve a mix of different source and destination accounts. * For each transfer request, the 'from' account must match the current account of the respective agent. * Transfers are executed asynchronously. * Progress tracking is not intended, but users can monitor the progress by periodically polling the 'get agent' endpoint. * Each transfer request is individually validated and completed; this operation is not atomic, meaning transfers can succeed or fail individually. * The API response provides the status of each transfer request. + + :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 bulk_agent_transfer_request: A collection of `AgentTransfers`. + :type bulk_agent_transfer_request: BulkAgentTransferRequest + :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._transfer_endpoint_agents_serialize( + aid=aid, + bulk_agent_transfer_request=bulk_agent_transfer_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '207': "BulkAgentTransferResponse", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "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.endpoint_agents.models, + ).data + + + @validate_call + def transfer_endpoint_agents_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, + bulk_agent_transfer_request: Annotated[Optional[BulkAgentTransferRequest], Field(description="A collection of `AgentTransfers`.")] = 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[BulkAgentTransferResponse]: + """Bulk transfer agents + + Initiates the transfer of multiple agents between accounts. The following conditions apply: * The requester must possess 'write' permissions for both the 'from' and 'to' accounts involved in each transfer. * Multiple transfers may involve a mix of different source and destination accounts. * For each transfer request, the 'from' account must match the current account of the respective agent. * Transfers are executed asynchronously. * Progress tracking is not intended, but users can monitor the progress by periodically polling the 'get agent' endpoint. * Each transfer request is individually validated and completed; this operation is not atomic, meaning transfers can succeed or fail individually. * The API response provides the status of each transfer request. + + :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 bulk_agent_transfer_request: A collection of `AgentTransfers`. + :type bulk_agent_transfer_request: BulkAgentTransferRequest + :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._transfer_endpoint_agents_serialize( + aid=aid, + bulk_agent_transfer_request=bulk_agent_transfer_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '207': "BulkAgentTransferResponse", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "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.endpoint_agents.models, + ) + + + @validate_call + def transfer_endpoint_agents_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, + bulk_agent_transfer_request: Annotated[Optional[BulkAgentTransferRequest], Field(description="A collection of `AgentTransfers`.")] = 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: + """Bulk transfer agents + + Initiates the transfer of multiple agents between accounts. The following conditions apply: * The requester must possess 'write' permissions for both the 'from' and 'to' accounts involved in each transfer. * Multiple transfers may involve a mix of different source and destination accounts. * For each transfer request, the 'from' account must match the current account of the respective agent. * Transfers are executed asynchronously. * Progress tracking is not intended, but users can monitor the progress by periodically polling the 'get agent' endpoint. * Each transfer request is individually validated and completed; this operation is not atomic, meaning transfers can succeed or fail individually. * The API response provides the status of each transfer request. + + :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 bulk_agent_transfer_request: A collection of `AgentTransfers`. + :type bulk_agent_transfer_request: BulkAgentTransferRequest + :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._transfer_endpoint_agents_serialize( + aid=aid, + bulk_agent_transfer_request=bulk_agent_transfer_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '207': "BulkAgentTransferResponse", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _transfer_endpoint_agents_serialize( + self, + aid, + bulk_agent_transfer_request, + _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 + if bulk_agent_transfer_request is not None: + _body_params = bulk_agent_transfer_request + + + # 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', + 'text/csv', + 'text/plain' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v7/endpoint/agents/transfer/bulk', + 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 + ) + + diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/__init__.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/__init__.py index c6d9b2a9..e46005e9 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/__init__.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/__init__.py @@ -6,7 +6,7 @@ Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/address_profile.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/address_profile.py index b8c65935..ff599346 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/address_profile.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/address_profile.py @@ -5,7 +5,7 @@ Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -38,6 +38,7 @@ class AddressProfile(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -48,7 +49,7 @@ class AddressProfile(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/address_type.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/address_type.py index f128f51b..a3be8dce 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/address_type.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/address_type.py @@ -5,7 +5,7 @@ Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/agent_license_type.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/agent_license_type.py index 81c69aef..b143225f 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/agent_license_type.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/agent_license_type.py @@ -5,7 +5,7 @@ Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/agent_search_filters.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/agent_search_filters.py index fca9afaa..0b99c7a8 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/agent_search_filters.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/agent_search_filters.py @@ -5,7 +5,7 @@ Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -44,6 +44,7 @@ class AgentSearchFilters(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -54,7 +55,7 @@ class AgentSearchFilters(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/agent_search_request.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/agent_search_request.py index 29c81fb7..c4c2efad 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/agent_search_request.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/agent_search_request.py @@ -5,7 +5,7 @@ Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -38,6 +38,7 @@ class AgentSearchRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -48,7 +49,7 @@ class AgentSearchRequest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/agent_search_sort.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/agent_search_sort.py index 3d75c74e..7760ec8a 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/agent_search_sort.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/agent_search_sort.py @@ -5,7 +5,7 @@ Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class AgentSearchSort(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class AgentSearchSort(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/agent_search_sort_key.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/agent_search_sort_key.py index 0b87957e..68ebede9 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/agent_search_sort_key.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/agent_search_sort_key.py @@ -5,7 +5,7 @@ Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/agent_threshold_filter.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/agent_threshold_filter.py index 6c79fad9..ec783fa6 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/agent_threshold_filter.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/agent_threshold_filter.py @@ -5,7 +5,7 @@ Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -46,6 +46,7 @@ class AgentThresholdFilter(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -56,7 +57,7 @@ class AgentThresholdFilter(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/agent_threshold_filters.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/agent_threshold_filters.py index 386a7cad..a0216a4e 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/agent_threshold_filters.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/agent_threshold_filters.py @@ -5,7 +5,7 @@ Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class AgentThresholdFilters(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class AgentThresholdFilters(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/agent_transfer.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/agent_transfer.py index 0adea4f2..10ad606b 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/agent_transfer.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/agent_transfer.py @@ -5,7 +5,7 @@ Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class AgentTransfer(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class AgentTransfer(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/agent_transfer_request.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/agent_transfer_request.py index 4eb8493e..587a57e0 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/agent_transfer_request.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/agent_transfer_request.py @@ -5,7 +5,7 @@ Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -33,6 +33,7 @@ class AgentTransferRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -43,7 +44,7 @@ class AgentTransferRequest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/agent_transfer_status.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/agent_transfer_status.py index cf3eaea6..0770ef0b 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/agent_transfer_status.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/agent_transfer_status.py @@ -5,7 +5,7 @@ Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -39,6 +39,7 @@ class AgentTransferStatus(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -49,7 +50,7 @@ class AgentTransferStatus(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/browser_type.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/browser_type.py index 52c9de66..4d3c20cb 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/browser_type.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/browser_type.py @@ -5,7 +5,7 @@ Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/bulk_agent_transfer_request.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/bulk_agent_transfer_request.py index 83ff3504..3d5e6b57 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/bulk_agent_transfer_request.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/bulk_agent_transfer_request.py @@ -5,7 +5,7 @@ Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class BulkAgentTransferRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class BulkAgentTransferRequest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/bulk_agent_transfer_response.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/bulk_agent_transfer_response.py index 400da668..99007e88 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/bulk_agent_transfer_response.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/bulk_agent_transfer_response.py @@ -5,7 +5,7 @@ Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class BulkAgentTransferResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class BulkAgentTransferResponse(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/conditional_operator.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/conditional_operator.py index ede8189e..92b1dc37 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/conditional_operator.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/conditional_operator.py @@ -5,7 +5,7 @@ Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/connection_string.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/connection_string.py index d1d9ea5c..c8816919 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/connection_string.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/connection_string.py @@ -5,7 +5,7 @@ Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class ConnectionString(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class ConnectionString(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/endpoint_agent.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/endpoint_agent.py index 7b107dc5..6633735d 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/endpoint_agent.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/endpoint_agent.py @@ -5,7 +5,7 @@ Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -69,6 +69,7 @@ class EndpointAgent(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -79,7 +80,7 @@ class EndpointAgent(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/endpoint_agent_location.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/endpoint_agent_location.py index 08a580e3..bf8417a4 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/endpoint_agent_location.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/endpoint_agent_location.py @@ -5,7 +5,7 @@ Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class EndpointAgentLocation(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class EndpointAgentLocation(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/endpoint_agent_update.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/endpoint_agent_update.py index e9caac53..f5437d3c 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/endpoint_agent_update.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/endpoint_agent_update.py @@ -5,7 +5,7 @@ Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class EndpointAgentUpdate(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class EndpointAgentUpdate(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/endpoint_agents.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/endpoint_agents.py index 3788dcc0..27ae10fd 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/endpoint_agents.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/endpoint_agents.py @@ -5,7 +5,7 @@ Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class EndpointAgents(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class EndpointAgents(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/endpoint_asn_details.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/endpoint_asn_details.py index 582c5fdc..d9818c4c 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/endpoint_asn_details.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/endpoint_asn_details.py @@ -5,7 +5,7 @@ Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class EndpointAsnDetails(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class EndpointAsnDetails(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/endpoint_browser_extension.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/endpoint_browser_extension.py index 3bbdfa9e..e97438b6 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/endpoint_browser_extension.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/endpoint_browser_extension.py @@ -5,7 +5,7 @@ Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -39,6 +39,7 @@ class EndpointBrowserExtension(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -49,7 +50,7 @@ class EndpointBrowserExtension(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/endpoint_client.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/endpoint_client.py index 8bb7426b..ac7a8d05 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/endpoint_client.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/endpoint_client.py @@ -5,7 +5,7 @@ Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class EndpointClient(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class EndpointClient(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/endpoint_user_profile.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/endpoint_user_profile.py index 85af7214..6fb37b02 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/endpoint_user_profile.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/endpoint_user_profile.py @@ -5,7 +5,7 @@ Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -33,6 +33,7 @@ class EndpointUserProfile(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -43,7 +44,7 @@ class EndpointUserProfile(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/endpoint_vpn_profile.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/endpoint_vpn_profile.py index a49aba5c..7d65d396 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/endpoint_vpn_profile.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/endpoint_vpn_profile.py @@ -5,7 +5,7 @@ Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -38,6 +38,7 @@ class EndpointVpnProfile(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -48,7 +49,7 @@ class EndpointVpnProfile(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/error.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/error.py index 4d46b375..cd193fed 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/error.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/error.py @@ -5,7 +5,7 @@ Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -37,6 +37,7 @@ class Error(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -47,7 +48,7 @@ class Error(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/ethernet_profile.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/ethernet_profile.py index 902064f2..46edf9a4 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/ethernet_profile.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/ethernet_profile.py @@ -5,7 +5,7 @@ Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -33,6 +33,7 @@ class EthernetProfile(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -43,7 +44,7 @@ class EthernetProfile(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/expand.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/expand.py index 20ed17fd..e649fb2a 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/expand.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/expand.py @@ -5,7 +5,7 @@ Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/filter_endpoint_agents_response.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/filter_endpoint_agents_response.py index 261a363a..bdd6c57b 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/filter_endpoint_agents_response.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/filter_endpoint_agents_response.py @@ -5,7 +5,7 @@ Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -37,6 +37,7 @@ class FilterEndpointAgentsResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -47,7 +48,7 @@ class FilterEndpointAgentsResponse(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/interface_hardware_type.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/interface_hardware_type.py index 41cf1de6..0c827881 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/interface_hardware_type.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/interface_hardware_type.py @@ -5,7 +5,7 @@ Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/interface_profile.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/interface_profile.py index cd766fad..82679db6 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/interface_profile.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/interface_profile.py @@ -5,7 +5,7 @@ Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -41,6 +41,7 @@ class InterfaceProfile(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -51,7 +52,7 @@ class InterfaceProfile(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/link.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/link.py index 46163675..3e684623 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/link.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/link.py @@ -5,7 +5,7 @@ Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -40,6 +40,7 @@ class Link(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -50,7 +51,7 @@ class Link(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/list_endpoint_agents_response.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/list_endpoint_agents_response.py index 1365a472..902da422 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/list_endpoint_agents_response.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/list_endpoint_agents_response.py @@ -5,7 +5,7 @@ Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -37,6 +37,7 @@ class ListEndpointAgentsResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -47,7 +48,7 @@ class ListEndpointAgentsResponse(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/pagination_next_and_self_link.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/pagination_next_and_self_link.py index 533d9000..41abe9c1 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/pagination_next_and_self_link.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/pagination_next_and_self_link.py @@ -5,7 +5,7 @@ Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class PaginationNextAndSelfLink(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class PaginationNextAndSelfLink(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/pagination_next_link.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/pagination_next_link.py index 9e9518eb..af20efec 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/pagination_next_link.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/pagination_next_link.py @@ -5,7 +5,7 @@ Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class PaginationNextLink(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class PaginationNextLink(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/platform.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/platform.py index a05a5c1a..c119e08e 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/platform.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/platform.py @@ -5,7 +5,7 @@ Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/self_links.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/self_links.py index d845b9c3..bdf9c32b 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/self_links.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/self_links.py @@ -5,7 +5,7 @@ Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class SelfLinks(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class SelfLinks(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/sort_order.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/sort_order.py index a2f891aa..b882fdc5 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/sort_order.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/sort_order.py @@ -5,7 +5,7 @@ Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/status.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/status.py index 114f8b84..c843fe2f 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/status.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/status.py @@ -5,7 +5,7 @@ Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/threshold_filter_operator.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/threshold_filter_operator.py index 57fa3a86..438199d4 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/threshold_filter_operator.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/threshold_filter_operator.py @@ -5,7 +5,7 @@ Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/unauthorized_error.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/unauthorized_error.py index de1a1b2c..d250d714 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/unauthorized_error.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/unauthorized_error.py @@ -5,7 +5,7 @@ Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class UnauthorizedError(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class UnauthorizedError(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/validation_error.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/validation_error.py index a2cd386e..3c9284aa 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/validation_error.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/validation_error.py @@ -5,7 +5,7 @@ Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -39,6 +39,7 @@ class ValidationError(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -49,7 +50,7 @@ class ValidationError(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/validation_error_item.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/validation_error_item.py index f17d2189..ee3c4f8f 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/validation_error_item.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/validation_error_item.py @@ -5,7 +5,7 @@ Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,7 +17,7 @@ import pprint import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +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 @@ -27,7 +27,7 @@ class ValidationErrorItem(BaseModel): ValidationErrorItem """ # noqa: E501 code: Optional[StrictStr] = Field(default=None, description="(Optional) A unique error type/code that can be referenced in the documentation for further details.") - var_field: Optional[StrictInt] = Field(default=None, description="Identifies the field that triggered this particular error.", alias="field") + var_field: Optional[StrictStr] = Field(default=None, description="Identifies the field that triggered this particular error.", alias="field") message: Optional[StrictStr] = Field(default=None, description="A short, human-readable summary of the error.") __properties: ClassVar[List[str]] = ["code", "field", "message"] @@ -35,6 +35,7 @@ class ValidationErrorItem(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class ValidationErrorItem(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/vpn_type.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/vpn_type.py index 0f33dd6b..7950b955 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/vpn_type.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/vpn_type.py @@ -5,7 +5,7 @@ Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/wireless_profile.py b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/wireless_profile.py index 150fb4fd..118a85ce 100644 --- a/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/wireless_profile.py +++ b/thousandeyes-sdk-endpoint-agents/src/thousandeyes_sdk/endpoint_agents/models/wireless_profile.py @@ -5,7 +5,7 @@ Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -37,6 +37,7 @@ class WirelessProfile(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -47,7 +48,7 @@ class WirelessProfile(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-agents/test/test_administrative_endpoints_api.py b/thousandeyes-sdk-endpoint-agents/test/test_administrative_endpoints_api.py new file mode 100644 index 00000000..9cb3ce2a --- /dev/null +++ b/thousandeyes-sdk-endpoint-agents/test/test_administrative_endpoints_api.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Endpoint Agents API + + Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.endpoint_agents.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.endpoint_agents.api.administrative_endpoints_api import AdministrativeEndpointsApi + + +class TestAdministrativeEndpointsApi(unittest.TestCase): + """AdministrativeEndpointsApi unit test stubs""" + + def setUp(self) -> None: + self.api = AdministrativeEndpointsApi() + + def tearDown(self) -> None: + pass + + def test_get_endpoint_agents_connection_string_models_validation(self) -> None: + """Test case for get_endpoint_agents_connection_string request and response models""" + + response_body_json = """ + { + "connectionString" : "D2xZSLlqo64Xe2EnYisklA==", + "_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" + } + } + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.endpoint_agents.models.ConnectionString.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-endpoint-agents/test/test_manage_agents_api.py b/thousandeyes-sdk-endpoint-agents/test/test_manage_agents_api.py new file mode 100644 index 00000000..842c5313 --- /dev/null +++ b/thousandeyes-sdk-endpoint-agents/test/test_manage_agents_api.py @@ -0,0 +1,1369 @@ +# coding: utf-8 + +""" + Endpoint Agents API + + Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.endpoint_agents.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.endpoint_agents.api.manage_agents_api import ManageAgentsApi + + +class TestManageAgentsApi(unittest.TestCase): + """ManageAgentsApi unit test stubs""" + + def setUp(self) -> None: + self.api = ManageAgentsApi() + + def tearDown(self) -> None: + pass + + def test_delete_endpoint_agent_models_validation(self) -> None: + """Test case for delete_endpoint_agent request and response models""" + + + def test_disable_endpoint_agent_models_validation(self) -> None: + """Test case for disable_endpoint_agent request and response models""" + + response_body_json = """ + { + "npcapVersion" : "npcapVersion", + "asnDetails" : { + "asName" : "Virgin Media Limited", + "asNumber" : 5089 + }, + "clients" : [ { + "browserExtensions" : [ { + "browser" : "edge", + "profile" : "Profile 1", + "active" : true, + "error" : "", + "version" : "0.123.0", + "enabled" : true + }, { + "browser" : "edge", + "profile" : "Profile 1", + "active" : true, + "error" : "", + "version" : "0.123.0", + "enabled" : true + } ], + "userProfile" : { + "userName" : "joeblogs32" + } + }, { + "browserExtensions" : [ { + "browser" : "edge", + "profile" : "Profile 1", + "active" : true, + "error" : "", + "version" : "0.123.0", + "enabled" : true + }, { + "browser" : "edge", + "profile" : "Profile 1", + "active" : true, + "error" : "", + "version" : "0.123.0", + "enabled" : true + } ], + "userProfile" : { + "userName" : "joeblogs32" + } + } ], + "agentType" : "endpoint", + "_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" + } + }, + "publicIP" : "88.45.2.123", + "tcpDriverAvailable" : true, + "platform" : "mac", + "manufacturer" : "Apple, Inc.", + "createdAt" : "2022-05-26T23:37:16Z", + "numberOfClients" : 3, + "licenseType" : "essentials", + "osVersion" : "Version 10.15.2 (Build 19C57)", + "computerName" : "DESKJET-123", + "model" : "MacBookAir7,2", + "id" : "5d0764ac-7e42-4ec8-a0d4-39fc53edccba", + "version" : "0.123.4", + "vpnProfiles" : [ { + "vpnClientNetworkRange" : [ "10.100.0.0/22" ], + "vpnGatewayAddress" : "vpnGatewayAddress", + "vpnType" : "cisco-anyconnect", + "interfaceName" : "interfaceName", + "vpnClientAddresses" : [ "10.100.0.10" ] + }, { + "vpnClientNetworkRange" : [ "10.100.0.0/22" ], + "vpnGatewayAddress" : "vpnGatewayAddress", + "vpnType" : "cisco-anyconnect", + "interfaceName" : "interfaceName", + "vpnClientAddresses" : [ "10.100.0.10" ] + } ], + "lastSeen" : "2022-05-26T23:37:16Z", + "deleted" : true, + "totalMemory" : "16384 MB", + "kernelVersion" : "Darwin 19.2.0", + "name" : "Office Printer", + "location" : { + "locationName" : "London", + "latitude" : 51.51279, + "longitude" : -0.09184 + }, + "aid" : "", + "status" : "enabled", + "networkInterfaceProfiles" : [ { + "ethernetProfile" : { + "linkSpeed" : 0 + }, + "hardwareType" : "wireless", + "interfaceName" : "en0", + "addressProfiles" : [ { + "prefixLength" : 24, + "addressType" : "unique-local", + "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888", + "routerHardwareAddress" : "5c:b1:3e:46:1c:84", + "gateway" : "192.168.0.254" + }, { + "prefixLength" : 24, + "addressType" : "unique-local", + "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888", + "routerHardwareAddress" : "5c:b1:3e:46:1c:84", + "gateway" : "192.168.0.254" + } ], + "wirelessProfile" : { + "rssi" : -36, + "bssid" : "00:11:22:aa:bb:cc", + "channel" : 48, + "phyMode" : "802.11ac", + "ssid" : "GuestWiFi" + } + }, { + "ethernetProfile" : { + "linkSpeed" : 0 + }, + "hardwareType" : "wireless", + "interfaceName" : "en0", + "addressProfiles" : [ { + "prefixLength" : 24, + "addressType" : "unique-local", + "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888", + "routerHardwareAddress" : "5c:b1:3e:46:1c:84", + "gateway" : "192.168.0.254" + }, { + "prefixLength" : 24, + "addressType" : "unique-local", + "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888", + "routerHardwareAddress" : "5c:b1:3e:46:1c:84", + "gateway" : "192.168.0.254" + } ], + "wirelessProfile" : { + "rssi" : -36, + "bssid" : "00:11:22:aa:bb:cc", + "channel" : 48, + "phyMode" : "802.11ac", + "ssid" : "GuestWiFi" + } + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.endpoint_agents.models.EndpointAgent.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_enable_endpoint_agent_models_validation(self) -> None: + """Test case for enable_endpoint_agent request and response models""" + + response_body_json = """ + { + "npcapVersion" : "npcapVersion", + "asnDetails" : { + "asName" : "Virgin Media Limited", + "asNumber" : 5089 + }, + "clients" : [ { + "browserExtensions" : [ { + "browser" : "edge", + "profile" : "Profile 1", + "active" : true, + "error" : "", + "version" : "0.123.0", + "enabled" : true + }, { + "browser" : "edge", + "profile" : "Profile 1", + "active" : true, + "error" : "", + "version" : "0.123.0", + "enabled" : true + } ], + "userProfile" : { + "userName" : "joeblogs32" + } + }, { + "browserExtensions" : [ { + "browser" : "edge", + "profile" : "Profile 1", + "active" : true, + "error" : "", + "version" : "0.123.0", + "enabled" : true + }, { + "browser" : "edge", + "profile" : "Profile 1", + "active" : true, + "error" : "", + "version" : "0.123.0", + "enabled" : true + } ], + "userProfile" : { + "userName" : "joeblogs32" + } + } ], + "agentType" : "endpoint", + "_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" + } + }, + "publicIP" : "88.45.2.123", + "tcpDriverAvailable" : true, + "platform" : "mac", + "manufacturer" : "Apple, Inc.", + "createdAt" : "2022-05-26T23:37:16Z", + "numberOfClients" : 3, + "licenseType" : "essentials", + "osVersion" : "Version 10.15.2 (Build 19C57)", + "computerName" : "DESKJET-123", + "model" : "MacBookAir7,2", + "id" : "5d0764ac-7e42-4ec8-a0d4-39fc53edccba", + "version" : "0.123.4", + "vpnProfiles" : [ { + "vpnClientNetworkRange" : [ "10.100.0.0/22" ], + "vpnGatewayAddress" : "vpnGatewayAddress", + "vpnType" : "cisco-anyconnect", + "interfaceName" : "interfaceName", + "vpnClientAddresses" : [ "10.100.0.10" ] + }, { + "vpnClientNetworkRange" : [ "10.100.0.0/22" ], + "vpnGatewayAddress" : "vpnGatewayAddress", + "vpnType" : "cisco-anyconnect", + "interfaceName" : "interfaceName", + "vpnClientAddresses" : [ "10.100.0.10" ] + } ], + "lastSeen" : "2022-05-26T23:37:16Z", + "deleted" : true, + "totalMemory" : "16384 MB", + "kernelVersion" : "Darwin 19.2.0", + "name" : "Office Printer", + "location" : { + "locationName" : "London", + "latitude" : 51.51279, + "longitude" : -0.09184 + }, + "aid" : "", + "status" : "enabled", + "networkInterfaceProfiles" : [ { + "ethernetProfile" : { + "linkSpeed" : 0 + }, + "hardwareType" : "wireless", + "interfaceName" : "en0", + "addressProfiles" : [ { + "prefixLength" : 24, + "addressType" : "unique-local", + "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888", + "routerHardwareAddress" : "5c:b1:3e:46:1c:84", + "gateway" : "192.168.0.254" + }, { + "prefixLength" : 24, + "addressType" : "unique-local", + "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888", + "routerHardwareAddress" : "5c:b1:3e:46:1c:84", + "gateway" : "192.168.0.254" + } ], + "wirelessProfile" : { + "rssi" : -36, + "bssid" : "00:11:22:aa:bb:cc", + "channel" : 48, + "phyMode" : "802.11ac", + "ssid" : "GuestWiFi" + } + }, { + "ethernetProfile" : { + "linkSpeed" : 0 + }, + "hardwareType" : "wireless", + "interfaceName" : "en0", + "addressProfiles" : [ { + "prefixLength" : 24, + "addressType" : "unique-local", + "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888", + "routerHardwareAddress" : "5c:b1:3e:46:1c:84", + "gateway" : "192.168.0.254" + }, { + "prefixLength" : 24, + "addressType" : "unique-local", + "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888", + "routerHardwareAddress" : "5c:b1:3e:46:1c:84", + "gateway" : "192.168.0.254" + } ], + "wirelessProfile" : { + "rssi" : -36, + "bssid" : "00:11:22:aa:bb:cc", + "channel" : 48, + "phyMode" : "802.11ac", + "ssid" : "GuestWiFi" + } + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.endpoint_agents.models.EndpointAgent.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_filter_endpoint_agents_models_validation(self) -> None: + """Test case for filter_endpoint_agents request and response models""" + request_body_json = """ + { + "searchSort" : [ { + "sort" : "platform", + "order" : "desc" + }, { + "sort" : "platform", + "order" : "desc" + } ], + "searchFilters" : { + "licenseType" : [ "essentials", "essentials" ], + "osVersion" : [ "Version 10.15.2", "Version 10.15.2" ], + "computerName" : [ "DESKTOP-45AE8", "DESKTOP-45AE8" ], + "locationCountryISO" : [ "FR", "FR" ], + "agentName" : [ "myagent-1234", "myagent-1234" ], + "locationSubdivision1Code" : [ "ENG", "ENG" ], + "id" : [ "5d0764ac-7e42-4ec8-a0d4-39fc53edccba", "5d0764ac-7e42-4ec8-a0d4-39fc53edccba" ], + "platform" : [ "mac", "mac" ], + "locationCity" : [ "Paris", "Paris" ], + "username" : [ "picard" ] + }, + "thresholdFilter" : { + "conditionalOperator" : "and", + "filters" : [ { + "name" : "last-seen-ms", + "value" : 0.8008281904610115, + "operator" : "gte" + }, { + "name" : "last-seen-ms", + "value" : 0.8008281904610115, + "operator" : "gte" + } ] + } + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.endpoint_agents.models.AgentSearchRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "_links" : { + "next" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "totalAgents" : 1, + "agents" : [ { + "npcapVersion" : "npcapVersion", + "asnDetails" : { + "asName" : "Virgin Media Limited", + "asNumber" : 5089 + }, + "clients" : [ { + "browserExtensions" : [ { + "browser" : "edge", + "profile" : "Profile 1", + "active" : true, + "error" : "", + "version" : "0.123.0", + "enabled" : true + }, { + "browser" : "edge", + "profile" : "Profile 1", + "active" : true, + "error" : "", + "version" : "0.123.0", + "enabled" : true + } ], + "userProfile" : { + "userName" : "joeblogs32" + } + }, { + "browserExtensions" : [ { + "browser" : "edge", + "profile" : "Profile 1", + "active" : true, + "error" : "", + "version" : "0.123.0", + "enabled" : true + }, { + "browser" : "edge", + "profile" : "Profile 1", + "active" : true, + "error" : "", + "version" : "0.123.0", + "enabled" : true + } ], + "userProfile" : { + "userName" : "joeblogs32" + } + } ], + "agentType" : "endpoint", + "_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" + } + }, + "publicIP" : "88.45.2.123", + "tcpDriverAvailable" : true, + "platform" : "mac", + "manufacturer" : "Apple, Inc.", + "createdAt" : "2022-05-26T23:37:16Z", + "numberOfClients" : 3, + "licenseType" : "essentials", + "osVersion" : "Version 10.15.2 (Build 19C57)", + "computerName" : "DESKJET-123", + "model" : "MacBookAir7,2", + "id" : "5d0764ac-7e42-4ec8-a0d4-39fc53edccba", + "version" : "0.123.4", + "vpnProfiles" : [ { + "vpnClientNetworkRange" : [ "10.100.0.0/22" ], + "vpnGatewayAddress" : "vpnGatewayAddress", + "vpnType" : "cisco-anyconnect", + "interfaceName" : "interfaceName", + "vpnClientAddresses" : [ "10.100.0.10" ] + }, { + "vpnClientNetworkRange" : [ "10.100.0.0/22" ], + "vpnGatewayAddress" : "vpnGatewayAddress", + "vpnType" : "cisco-anyconnect", + "interfaceName" : "interfaceName", + "vpnClientAddresses" : [ "10.100.0.10" ] + } ], + "lastSeen" : "2022-05-26T23:37:16Z", + "deleted" : true, + "totalMemory" : "16384 MB", + "kernelVersion" : "Darwin 19.2.0", + "name" : "Office Printer", + "location" : { + "locationName" : "London", + "latitude" : 51.51279, + "longitude" : -0.09184 + }, + "aid" : "", + "status" : "enabled", + "networkInterfaceProfiles" : [ { + "ethernetProfile" : { + "linkSpeed" : 0 + }, + "hardwareType" : "wireless", + "interfaceName" : "en0", + "addressProfiles" : [ { + "prefixLength" : 24, + "addressType" : "unique-local", + "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888", + "routerHardwareAddress" : "5c:b1:3e:46:1c:84", + "gateway" : "192.168.0.254" + }, { + "prefixLength" : 24, + "addressType" : "unique-local", + "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888", + "routerHardwareAddress" : "5c:b1:3e:46:1c:84", + "gateway" : "192.168.0.254" + } ], + "wirelessProfile" : { + "rssi" : -36, + "bssid" : "00:11:22:aa:bb:cc", + "channel" : 48, + "phyMode" : "802.11ac", + "ssid" : "GuestWiFi" + } + }, { + "ethernetProfile" : { + "linkSpeed" : 0 + }, + "hardwareType" : "wireless", + "interfaceName" : "en0", + "addressProfiles" : [ { + "prefixLength" : 24, + "addressType" : "unique-local", + "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888", + "routerHardwareAddress" : "5c:b1:3e:46:1c:84", + "gateway" : "192.168.0.254" + }, { + "prefixLength" : 24, + "addressType" : "unique-local", + "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888", + "routerHardwareAddress" : "5c:b1:3e:46:1c:84", + "gateway" : "192.168.0.254" + } ], + "wirelessProfile" : { + "rssi" : -36, + "bssid" : "00:11:22:aa:bb:cc", + "channel" : 48, + "phyMode" : "802.11ac", + "ssid" : "GuestWiFi" + } + } ] + }, { + "npcapVersion" : "npcapVersion", + "asnDetails" : { + "asName" : "Virgin Media Limited", + "asNumber" : 5089 + }, + "clients" : [ { + "browserExtensions" : [ { + "browser" : "edge", + "profile" : "Profile 1", + "active" : true, + "error" : "", + "version" : "0.123.0", + "enabled" : true + }, { + "browser" : "edge", + "profile" : "Profile 1", + "active" : true, + "error" : "", + "version" : "0.123.0", + "enabled" : true + } ], + "userProfile" : { + "userName" : "joeblogs32" + } + }, { + "browserExtensions" : [ { + "browser" : "edge", + "profile" : "Profile 1", + "active" : true, + "error" : "", + "version" : "0.123.0", + "enabled" : true + }, { + "browser" : "edge", + "profile" : "Profile 1", + "active" : true, + "error" : "", + "version" : "0.123.0", + "enabled" : true + } ], + "userProfile" : { + "userName" : "joeblogs32" + } + } ], + "agentType" : "endpoint", + "_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" + } + }, + "publicIP" : "88.45.2.123", + "tcpDriverAvailable" : true, + "platform" : "mac", + "manufacturer" : "Apple, Inc.", + "createdAt" : "2022-05-26T23:37:16Z", + "numberOfClients" : 3, + "licenseType" : "essentials", + "osVersion" : "Version 10.15.2 (Build 19C57)", + "computerName" : "DESKJET-123", + "model" : "MacBookAir7,2", + "id" : "5d0764ac-7e42-4ec8-a0d4-39fc53edccba", + "version" : "0.123.4", + "vpnProfiles" : [ { + "vpnClientNetworkRange" : [ "10.100.0.0/22" ], + "vpnGatewayAddress" : "vpnGatewayAddress", + "vpnType" : "cisco-anyconnect", + "interfaceName" : "interfaceName", + "vpnClientAddresses" : [ "10.100.0.10" ] + }, { + "vpnClientNetworkRange" : [ "10.100.0.0/22" ], + "vpnGatewayAddress" : "vpnGatewayAddress", + "vpnType" : "cisco-anyconnect", + "interfaceName" : "interfaceName", + "vpnClientAddresses" : [ "10.100.0.10" ] + } ], + "lastSeen" : "2022-05-26T23:37:16Z", + "deleted" : true, + "totalMemory" : "16384 MB", + "kernelVersion" : "Darwin 19.2.0", + "name" : "Office Printer", + "location" : { + "locationName" : "London", + "latitude" : 51.51279, + "longitude" : -0.09184 + }, + "aid" : "", + "status" : "enabled", + "networkInterfaceProfiles" : [ { + "ethernetProfile" : { + "linkSpeed" : 0 + }, + "hardwareType" : "wireless", + "interfaceName" : "en0", + "addressProfiles" : [ { + "prefixLength" : 24, + "addressType" : "unique-local", + "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888", + "routerHardwareAddress" : "5c:b1:3e:46:1c:84", + "gateway" : "192.168.0.254" + }, { + "prefixLength" : 24, + "addressType" : "unique-local", + "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888", + "routerHardwareAddress" : "5c:b1:3e:46:1c:84", + "gateway" : "192.168.0.254" + } ], + "wirelessProfile" : { + "rssi" : -36, + "bssid" : "00:11:22:aa:bb:cc", + "channel" : 48, + "phyMode" : "802.11ac", + "ssid" : "GuestWiFi" + } + }, { + "ethernetProfile" : { + "linkSpeed" : 0 + }, + "hardwareType" : "wireless", + "interfaceName" : "en0", + "addressProfiles" : [ { + "prefixLength" : 24, + "addressType" : "unique-local", + "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888", + "routerHardwareAddress" : "5c:b1:3e:46:1c:84", + "gateway" : "192.168.0.254" + }, { + "prefixLength" : 24, + "addressType" : "unique-local", + "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888", + "routerHardwareAddress" : "5c:b1:3e:46:1c:84", + "gateway" : "192.168.0.254" + } ], + "wirelessProfile" : { + "rssi" : -36, + "bssid" : "00:11:22:aa:bb:cc", + "channel" : 48, + "phyMode" : "802.11ac", + "ssid" : "GuestWiFi" + } + } ] + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.endpoint_agents.models.FilterEndpointAgentsResponse.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_endpoint_agent_models_validation(self) -> None: + """Test case for get_endpoint_agent request and response models""" + + response_body_json = """ + { + "npcapVersion" : "npcapVersion", + "asnDetails" : { + "asName" : "Virgin Media Limited", + "asNumber" : 5089 + }, + "clients" : [ { + "browserExtensions" : [ { + "browser" : "edge", + "profile" : "Profile 1", + "active" : true, + "error" : "", + "version" : "0.123.0", + "enabled" : true + }, { + "browser" : "edge", + "profile" : "Profile 1", + "active" : true, + "error" : "", + "version" : "0.123.0", + "enabled" : true + } ], + "userProfile" : { + "userName" : "joeblogs32" + } + }, { + "browserExtensions" : [ { + "browser" : "edge", + "profile" : "Profile 1", + "active" : true, + "error" : "", + "version" : "0.123.0", + "enabled" : true + }, { + "browser" : "edge", + "profile" : "Profile 1", + "active" : true, + "error" : "", + "version" : "0.123.0", + "enabled" : true + } ], + "userProfile" : { + "userName" : "joeblogs32" + } + } ], + "agentType" : "endpoint", + "_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" + } + }, + "publicIP" : "88.45.2.123", + "tcpDriverAvailable" : true, + "platform" : "mac", + "manufacturer" : "Apple, Inc.", + "createdAt" : "2022-05-26T23:37:16Z", + "numberOfClients" : 3, + "licenseType" : "essentials", + "osVersion" : "Version 10.15.2 (Build 19C57)", + "computerName" : "DESKJET-123", + "model" : "MacBookAir7,2", + "id" : "5d0764ac-7e42-4ec8-a0d4-39fc53edccba", + "version" : "0.123.4", + "vpnProfiles" : [ { + "vpnClientNetworkRange" : [ "10.100.0.0/22" ], + "vpnGatewayAddress" : "vpnGatewayAddress", + "vpnType" : "cisco-anyconnect", + "interfaceName" : "interfaceName", + "vpnClientAddresses" : [ "10.100.0.10" ] + }, { + "vpnClientNetworkRange" : [ "10.100.0.0/22" ], + "vpnGatewayAddress" : "vpnGatewayAddress", + "vpnType" : "cisco-anyconnect", + "interfaceName" : "interfaceName", + "vpnClientAddresses" : [ "10.100.0.10" ] + } ], + "lastSeen" : "2022-05-26T23:37:16Z", + "deleted" : true, + "totalMemory" : "16384 MB", + "kernelVersion" : "Darwin 19.2.0", + "name" : "Office Printer", + "location" : { + "locationName" : "London", + "latitude" : 51.51279, + "longitude" : -0.09184 + }, + "aid" : "", + "status" : "enabled", + "networkInterfaceProfiles" : [ { + "ethernetProfile" : { + "linkSpeed" : 0 + }, + "hardwareType" : "wireless", + "interfaceName" : "en0", + "addressProfiles" : [ { + "prefixLength" : 24, + "addressType" : "unique-local", + "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888", + "routerHardwareAddress" : "5c:b1:3e:46:1c:84", + "gateway" : "192.168.0.254" + }, { + "prefixLength" : 24, + "addressType" : "unique-local", + "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888", + "routerHardwareAddress" : "5c:b1:3e:46:1c:84", + "gateway" : "192.168.0.254" + } ], + "wirelessProfile" : { + "rssi" : -36, + "bssid" : "00:11:22:aa:bb:cc", + "channel" : 48, + "phyMode" : "802.11ac", + "ssid" : "GuestWiFi" + } + }, { + "ethernetProfile" : { + "linkSpeed" : 0 + }, + "hardwareType" : "wireless", + "interfaceName" : "en0", + "addressProfiles" : [ { + "prefixLength" : 24, + "addressType" : "unique-local", + "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888", + "routerHardwareAddress" : "5c:b1:3e:46:1c:84", + "gateway" : "192.168.0.254" + }, { + "prefixLength" : 24, + "addressType" : "unique-local", + "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888", + "routerHardwareAddress" : "5c:b1:3e:46:1c:84", + "gateway" : "192.168.0.254" + } ], + "wirelessProfile" : { + "rssi" : -36, + "bssid" : "00:11:22:aa:bb:cc", + "channel" : 48, + "phyMode" : "802.11ac", + "ssid" : "GuestWiFi" + } + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.endpoint_agents.models.EndpointAgent.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_endpoint_agents_models_validation(self) -> None: + """Test case for get_endpoint_agents request and response models""" + + response_body_json = """ + { + "_links" : { + "next" : { + "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" + } + }, + "totalAgents" : 1, + "agents" : [ { + "npcapVersion" : "npcapVersion", + "asnDetails" : { + "asName" : "Virgin Media Limited", + "asNumber" : 5089 + }, + "clients" : [ { + "browserExtensions" : [ { + "browser" : "edge", + "profile" : "Profile 1", + "active" : true, + "error" : "", + "version" : "0.123.0", + "enabled" : true + }, { + "browser" : "edge", + "profile" : "Profile 1", + "active" : true, + "error" : "", + "version" : "0.123.0", + "enabled" : true + } ], + "userProfile" : { + "userName" : "joeblogs32" + } + }, { + "browserExtensions" : [ { + "browser" : "edge", + "profile" : "Profile 1", + "active" : true, + "error" : "", + "version" : "0.123.0", + "enabled" : true + }, { + "browser" : "edge", + "profile" : "Profile 1", + "active" : true, + "error" : "", + "version" : "0.123.0", + "enabled" : true + } ], + "userProfile" : { + "userName" : "joeblogs32" + } + } ], + "agentType" : "endpoint", + "_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" + } + }, + "publicIP" : "88.45.2.123", + "tcpDriverAvailable" : true, + "platform" : "mac", + "manufacturer" : "Apple, Inc.", + "createdAt" : "2022-05-26T23:37:16Z", + "numberOfClients" : 3, + "licenseType" : "essentials", + "osVersion" : "Version 10.15.2 (Build 19C57)", + "computerName" : "DESKJET-123", + "model" : "MacBookAir7,2", + "id" : "5d0764ac-7e42-4ec8-a0d4-39fc53edccba", + "version" : "0.123.4", + "vpnProfiles" : [ { + "vpnClientNetworkRange" : [ "10.100.0.0/22" ], + "vpnGatewayAddress" : "vpnGatewayAddress", + "vpnType" : "cisco-anyconnect", + "interfaceName" : "interfaceName", + "vpnClientAddresses" : [ "10.100.0.10" ] + }, { + "vpnClientNetworkRange" : [ "10.100.0.0/22" ], + "vpnGatewayAddress" : "vpnGatewayAddress", + "vpnType" : "cisco-anyconnect", + "interfaceName" : "interfaceName", + "vpnClientAddresses" : [ "10.100.0.10" ] + } ], + "lastSeen" : "2022-05-26T23:37:16Z", + "deleted" : true, + "totalMemory" : "16384 MB", + "kernelVersion" : "Darwin 19.2.0", + "name" : "Office Printer", + "location" : { + "locationName" : "London", + "latitude" : 51.51279, + "longitude" : -0.09184 + }, + "aid" : "", + "status" : "enabled", + "networkInterfaceProfiles" : [ { + "ethernetProfile" : { + "linkSpeed" : 0 + }, + "hardwareType" : "wireless", + "interfaceName" : "en0", + "addressProfiles" : [ { + "prefixLength" : 24, + "addressType" : "unique-local", + "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888", + "routerHardwareAddress" : "5c:b1:3e:46:1c:84", + "gateway" : "192.168.0.254" + }, { + "prefixLength" : 24, + "addressType" : "unique-local", + "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888", + "routerHardwareAddress" : "5c:b1:3e:46:1c:84", + "gateway" : "192.168.0.254" + } ], + "wirelessProfile" : { + "rssi" : -36, + "bssid" : "00:11:22:aa:bb:cc", + "channel" : 48, + "phyMode" : "802.11ac", + "ssid" : "GuestWiFi" + } + }, { + "ethernetProfile" : { + "linkSpeed" : 0 + }, + "hardwareType" : "wireless", + "interfaceName" : "en0", + "addressProfiles" : [ { + "prefixLength" : 24, + "addressType" : "unique-local", + "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888", + "routerHardwareAddress" : "5c:b1:3e:46:1c:84", + "gateway" : "192.168.0.254" + }, { + "prefixLength" : 24, + "addressType" : "unique-local", + "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888", + "routerHardwareAddress" : "5c:b1:3e:46:1c:84", + "gateway" : "192.168.0.254" + } ], + "wirelessProfile" : { + "rssi" : -36, + "bssid" : "00:11:22:aa:bb:cc", + "channel" : 48, + "phyMode" : "802.11ac", + "ssid" : "GuestWiFi" + } + } ] + }, { + "npcapVersion" : "npcapVersion", + "asnDetails" : { + "asName" : "Virgin Media Limited", + "asNumber" : 5089 + }, + "clients" : [ { + "browserExtensions" : [ { + "browser" : "edge", + "profile" : "Profile 1", + "active" : true, + "error" : "", + "version" : "0.123.0", + "enabled" : true + }, { + "browser" : "edge", + "profile" : "Profile 1", + "active" : true, + "error" : "", + "version" : "0.123.0", + "enabled" : true + } ], + "userProfile" : { + "userName" : "joeblogs32" + } + }, { + "browserExtensions" : [ { + "browser" : "edge", + "profile" : "Profile 1", + "active" : true, + "error" : "", + "version" : "0.123.0", + "enabled" : true + }, { + "browser" : "edge", + "profile" : "Profile 1", + "active" : true, + "error" : "", + "version" : "0.123.0", + "enabled" : true + } ], + "userProfile" : { + "userName" : "joeblogs32" + } + } ], + "agentType" : "endpoint", + "_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" + } + }, + "publicIP" : "88.45.2.123", + "tcpDriverAvailable" : true, + "platform" : "mac", + "manufacturer" : "Apple, Inc.", + "createdAt" : "2022-05-26T23:37:16Z", + "numberOfClients" : 3, + "licenseType" : "essentials", + "osVersion" : "Version 10.15.2 (Build 19C57)", + "computerName" : "DESKJET-123", + "model" : "MacBookAir7,2", + "id" : "5d0764ac-7e42-4ec8-a0d4-39fc53edccba", + "version" : "0.123.4", + "vpnProfiles" : [ { + "vpnClientNetworkRange" : [ "10.100.0.0/22" ], + "vpnGatewayAddress" : "vpnGatewayAddress", + "vpnType" : "cisco-anyconnect", + "interfaceName" : "interfaceName", + "vpnClientAddresses" : [ "10.100.0.10" ] + }, { + "vpnClientNetworkRange" : [ "10.100.0.0/22" ], + "vpnGatewayAddress" : "vpnGatewayAddress", + "vpnType" : "cisco-anyconnect", + "interfaceName" : "interfaceName", + "vpnClientAddresses" : [ "10.100.0.10" ] + } ], + "lastSeen" : "2022-05-26T23:37:16Z", + "deleted" : true, + "totalMemory" : "16384 MB", + "kernelVersion" : "Darwin 19.2.0", + "name" : "Office Printer", + "location" : { + "locationName" : "London", + "latitude" : 51.51279, + "longitude" : -0.09184 + }, + "aid" : "", + "status" : "enabled", + "networkInterfaceProfiles" : [ { + "ethernetProfile" : { + "linkSpeed" : 0 + }, + "hardwareType" : "wireless", + "interfaceName" : "en0", + "addressProfiles" : [ { + "prefixLength" : 24, + "addressType" : "unique-local", + "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888", + "routerHardwareAddress" : "5c:b1:3e:46:1c:84", + "gateway" : "192.168.0.254" + }, { + "prefixLength" : 24, + "addressType" : "unique-local", + "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888", + "routerHardwareAddress" : "5c:b1:3e:46:1c:84", + "gateway" : "192.168.0.254" + } ], + "wirelessProfile" : { + "rssi" : -36, + "bssid" : "00:11:22:aa:bb:cc", + "channel" : 48, + "phyMode" : "802.11ac", + "ssid" : "GuestWiFi" + } + }, { + "ethernetProfile" : { + "linkSpeed" : 0 + }, + "hardwareType" : "wireless", + "interfaceName" : "en0", + "addressProfiles" : [ { + "prefixLength" : 24, + "addressType" : "unique-local", + "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888", + "routerHardwareAddress" : "5c:b1:3e:46:1c:84", + "gateway" : "192.168.0.254" + }, { + "prefixLength" : 24, + "addressType" : "unique-local", + "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888", + "routerHardwareAddress" : "5c:b1:3e:46:1c:84", + "gateway" : "192.168.0.254" + } ], + "wirelessProfile" : { + "rssi" : -36, + "bssid" : "00:11:22:aa:bb:cc", + "channel" : 48, + "phyMode" : "802.11ac", + "ssid" : "GuestWiFi" + } + } ] + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.endpoint_agents.models.ListEndpointAgentsResponse.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_update_endpoint_agent_models_validation(self) -> None: + """Test case for update_endpoint_agent request and response models""" + request_body_json = """ + { + "licenseType" : "essentials", + "name" : "Office Printer" + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.endpoint_agents.models.EndpointAgentUpdate.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "npcapVersion" : "npcapVersion", + "asnDetails" : { + "asName" : "Virgin Media Limited", + "asNumber" : 5089 + }, + "clients" : [ { + "browserExtensions" : [ { + "browser" : "edge", + "profile" : "Profile 1", + "active" : true, + "error" : "", + "version" : "0.123.0", + "enabled" : true + }, { + "browser" : "edge", + "profile" : "Profile 1", + "active" : true, + "error" : "", + "version" : "0.123.0", + "enabled" : true + } ], + "userProfile" : { + "userName" : "joeblogs32" + } + }, { + "browserExtensions" : [ { + "browser" : "edge", + "profile" : "Profile 1", + "active" : true, + "error" : "", + "version" : "0.123.0", + "enabled" : true + }, { + "browser" : "edge", + "profile" : "Profile 1", + "active" : true, + "error" : "", + "version" : "0.123.0", + "enabled" : true + } ], + "userProfile" : { + "userName" : "joeblogs32" + } + } ], + "agentType" : "endpoint", + "_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" + } + }, + "publicIP" : "88.45.2.123", + "tcpDriverAvailable" : true, + "platform" : "mac", + "manufacturer" : "Apple, Inc.", + "createdAt" : "2022-05-26T23:37:16Z", + "numberOfClients" : 3, + "licenseType" : "essentials", + "osVersion" : "Version 10.15.2 (Build 19C57)", + "computerName" : "DESKJET-123", + "model" : "MacBookAir7,2", + "id" : "5d0764ac-7e42-4ec8-a0d4-39fc53edccba", + "version" : "0.123.4", + "vpnProfiles" : [ { + "vpnClientNetworkRange" : [ "10.100.0.0/22" ], + "vpnGatewayAddress" : "vpnGatewayAddress", + "vpnType" : "cisco-anyconnect", + "interfaceName" : "interfaceName", + "vpnClientAddresses" : [ "10.100.0.10" ] + }, { + "vpnClientNetworkRange" : [ "10.100.0.0/22" ], + "vpnGatewayAddress" : "vpnGatewayAddress", + "vpnType" : "cisco-anyconnect", + "interfaceName" : "interfaceName", + "vpnClientAddresses" : [ "10.100.0.10" ] + } ], + "lastSeen" : "2022-05-26T23:37:16Z", + "deleted" : true, + "totalMemory" : "16384 MB", + "kernelVersion" : "Darwin 19.2.0", + "name" : "Office Printer", + "location" : { + "locationName" : "London", + "latitude" : 51.51279, + "longitude" : -0.09184 + }, + "aid" : "", + "status" : "enabled", + "networkInterfaceProfiles" : [ { + "ethernetProfile" : { + "linkSpeed" : 0 + }, + "hardwareType" : "wireless", + "interfaceName" : "en0", + "addressProfiles" : [ { + "prefixLength" : 24, + "addressType" : "unique-local", + "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888", + "routerHardwareAddress" : "5c:b1:3e:46:1c:84", + "gateway" : "192.168.0.254" + }, { + "prefixLength" : 24, + "addressType" : "unique-local", + "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888", + "routerHardwareAddress" : "5c:b1:3e:46:1c:84", + "gateway" : "192.168.0.254" + } ], + "wirelessProfile" : { + "rssi" : -36, + "bssid" : "00:11:22:aa:bb:cc", + "channel" : 48, + "phyMode" : "802.11ac", + "ssid" : "GuestWiFi" + } + }, { + "ethernetProfile" : { + "linkSpeed" : 0 + }, + "hardwareType" : "wireless", + "interfaceName" : "en0", + "addressProfiles" : [ { + "prefixLength" : 24, + "addressType" : "unique-local", + "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888", + "routerHardwareAddress" : "5c:b1:3e:46:1c:84", + "gateway" : "192.168.0.254" + }, { + "prefixLength" : 24, + "addressType" : "unique-local", + "ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888", + "routerHardwareAddress" : "5c:b1:3e:46:1c:84", + "gateway" : "192.168.0.254" + } ], + "wirelessProfile" : { + "rssi" : -36, + "bssid" : "00:11:22:aa:bb:cc", + "channel" : 48, + "phyMode" : "802.11ac", + "ssid" : "GuestWiFi" + } + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.endpoint_agents.models.EndpointAgent.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-endpoint-agents/test/test_transfer_api.py b/thousandeyes-sdk-endpoint-agents/test/test_transfer_api.py new file mode 100644 index 00000000..3d5b8f4b --- /dev/null +++ b/thousandeyes-sdk-endpoint-agents/test/test_transfer_api.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Endpoint Agents API + + Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents). + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.endpoint_agents.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.endpoint_agents.api.transfer_api import TransferApi + + +class TestTransferApi(unittest.TestCase): + """TransferApi unit test stubs""" + + def setUp(self) -> None: + self.api = TransferApi() + + def tearDown(self) -> None: + pass + + def test_transfer_endpoint_agent_models_validation(self) -> None: + """Test case for transfer_endpoint_agent request and response models""" + request_body_json = """ + { + "toAid" : "1234" + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.endpoint_agents.models.AgentTransferRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + + def test_transfer_endpoint_agents_models_validation(self) -> None: + """Test case for transfer_endpoint_agents request and response models""" + request_body_json = """ + { + "transfers" : [ { + "agentId" : "5d0764ac-7e42-4ec8-a0d4-39fc53edccba", + "fromAid" : "1234", + "toAid" : "12345" + }, { + "agentId" : "5d0764ac-7e42-4ec8-a0d4-39fc53edccba", + "fromAid" : "1234", + "toAid" : "12345" + } ] + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.endpoint_agents.models.BulkAgentTransferRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "items" : [ { + "status" : 200, + "detail" : "Initiated", + "request" : { + "agentId" : "5d0764ac-7e42-4ec8-a0d4-39fc53edccba", + "fromAid" : "1234", + "toAid" : "12345" + } + }, { + "status" : 400, + "detail" : "Missing from-account id", + "request" : { + "agentId" : "5d0764ac-7e42-4ec8-a0d5-39fc53ed1234", + "fromAid" : "xxx", + "toAid" : "12345" + } + }, { + "status" : 403, + "detail" : "User does not have permission on 'to' aid", + "request" : { + "agentId" : "5d0764ac-7e42-4ec8-a0d5-39fc53ed7890", + "fromAid" : "1234", + "toAid" : "12345" + } + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.endpoint_agents.models.BulkAgentTransferResponse.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-endpoint-agents/test/test_utils.py b/thousandeyes-sdk-endpoint-agents/test/test_utils.py new file mode 100644 index 00000000..930528d9 --- /dev/null +++ b/thousandeyes-sdk-endpoint-agents/test/test_utils.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +import json +import unittest + +from pydantic import BaseModel + + +def assert_constructed_model_matches_example_json(model: BaseModel, loaded_json: dict): + test_case = unittest.TestCase() + test_case.maxDiff = None + test_case.assertIsNotNone(model) + constructed_json = json.loads(model.to_json()) + sorted_loaded_json = json.dumps(loaded_json, sort_keys=True) + sorted_constructed_json = json.dumps(constructed_json, sort_keys=True) + test_case.assertEqual(sorted_loaded_json, sorted_constructed_json) diff --git a/thousandeyes-sdk-endpoint-instant-tests/.openapi-generator/FILES b/thousandeyes-sdk-endpoint-instant-tests/.openapi-generator/FILES index 18647fa2..749697f1 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/.openapi-generator/FILES +++ b/thousandeyes-sdk-endpoint-instant-tests/.openapi-generator/FILES @@ -75,34 +75,7 @@ src/thousandeyes_sdk/endpoint_instant_tests/models/validation_error.py src/thousandeyes_sdk/endpoint_instant_tests/models/validation_error_item.py src/thousandeyes_sdk/endpoint_instant_tests/py.typed test/__init__.py -test/test_alert_direction.py -test/test_alert_rounds_violation_mode.py -test/test_alert_rule.py -test/test_alert_type.py -test/test_endpoint_agent_labels_selector_config.py -test/test_endpoint_agent_selector_config.py -test/test_endpoint_agent_to_server_instant_test.py -test/test_endpoint_agent_to_server_test.py -test/test_endpoint_all_agents_selector_config.py -test/test_endpoint_http_server_base_test.py -test/test_endpoint_http_server_instant_test.py -test/test_endpoint_http_server_test.py -test/test_endpoint_instant_test.py -test/test_endpoint_scheduled_test_type.py -test/test_endpoint_specific_agents_selector_config.py -test/test_endpoint_test.py -test/test_endpoint_test_agent_selector_type.py -test/test_endpoint_test_auth_type.py -test/test_endpoint_test_links.py -test/test_endpoint_test_protocol.py -test/test_endpoint_test_self_link.py -test/test_error.py -test/test_link.py -test/test_severity.py -test/test_test_interval.py -test/test_test_label.py -test/test_test_probe_mode_response.py -test/test_test_ssl_version_id.py -test/test_unauthorized_error.py -test/test_validation_error.py -test/test_validation_error_item.py +test/test_agent_to_server_instant_scheduled_test_api.py +test/test_http_server_instant_scheduled_test_api.py +test/test_run_existing_test_api.py +test/test_utils.py diff --git a/thousandeyes-sdk-endpoint-instant-tests/README.md b/thousandeyes-sdk-endpoint-instant-tests/README.md index 735dee16..94e86f5f 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/README.md +++ b/thousandeyes-sdk-endpoint-instant-tests/README.md @@ -13,8 +13,7 @@ The URLs for these API test data endpoints are provided within the test definiti This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.4 -- Package version: 1.0.0 +- API version: 7.0.6 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator @@ -28,9 +27,9 @@ Python 3.7+ If the python package is hosted on a repository, you can install directly using: ```sh -pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +pip install -e git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git#egg=thousandeyes-sdk-endpoint-instant-tests\&subdirectory=thousandeyes-sdk-endpoint-instant-tests ``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) +(you may need to run `pip` with root permission: `sudo pip install -e git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git#egg=thousandeyes-sdk-endpoint-instant-tests\&subdirectory=thousandeyes-sdk-endpoint-instant-tests`) Then import the package: ```python @@ -92,11 +91,11 @@ with thousandeyes_sdk.client.ApiClient(configuration) as api_client: try: # Run agent to server instant scheduled test - api_response = api_instance.post_agent_to_server_instant_test(endpoint_agent_to_server_instant_test, aid=aid) - print("The response of AgentToServerInstantScheduledTestApi->post_agent_to_server_instant_test:\n") + api_response = api_instance.create_agent_to_server_scheduled_instant_test(endpoint_agent_to_server_instant_test, aid=aid) + print("The response of AgentToServerInstantScheduledTestApi->create_agent_to_server_scheduled_instant_test:\n") pprint(api_response) except ApiException as e: - print("Exception when calling AgentToServerInstantScheduledTestApi->post_agent_to_server_instant_test: %s\n" % e) + print("Exception when calling AgentToServerInstantScheduledTestApi->create_agent_to_server_scheduled_instant_test: %s\n" % e) ``` @@ -106,9 +105,9 @@ All URIs are relative to *https://api.thousandeyes.com* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*AgentToServerInstantScheduledTestApi* | [**post_agent_to_server_instant_test**](docs/AgentToServerInstantScheduledTestApi.md#post_agent_to_server_instant_test) | **POST** /v7/endpoint/tests/scheduled-tests/agent-to-server/instant | Run agent to server instant scheduled test -*HttpServerInstantScheduledTestApi* | [**post_http_server_instant_test**](docs/HttpServerInstantScheduledTestApi.md#post_http_server_instant_test) | **POST** /v7/endpoint/tests/scheduled-tests/http-server/instant | Run http server instant scheduled test -*RunExistingTestApi* | [**post_endpoint_instant_run**](docs/RunExistingTestApi.md#post_endpoint_instant_run) | **POST** /v7/endpoint/tests/scheduled-tests/{testId}/run | Run endpoint instant scheduled test +*AgentToServerInstantScheduledTestApi* | [**create_agent_to_server_scheduled_instant_test**](docs/AgentToServerInstantScheduledTestApi.md#create_agent_to_server_scheduled_instant_test) | **POST** /v7/endpoint/tests/scheduled-tests/agent-to-server/instant | Run agent to server instant scheduled test +*HttpServerInstantScheduledTestApi* | [**create_http_server_scheduled_instant_test**](docs/HttpServerInstantScheduledTestApi.md#create_http_server_scheduled_instant_test) | **POST** /v7/endpoint/tests/scheduled-tests/http-server/instant | Run http server instant scheduled test +*RunExistingTestApi* | [**run_endpoint_scheduled_instant_test**](docs/RunExistingTestApi.md#run_endpoint_scheduled_instant_test) | **POST** /v7/endpoint/tests/scheduled-tests/{testId}/run | Run endpoint instant scheduled test ## Documentation For Models diff --git a/thousandeyes-sdk-endpoint-instant-tests/docs/AgentToServerInstantScheduledTestApi.md b/thousandeyes-sdk-endpoint-instant-tests/docs/AgentToServerInstantScheduledTestApi.md index 149cc098..815eb877 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/docs/AgentToServerInstantScheduledTestApi.md +++ b/thousandeyes-sdk-endpoint-instant-tests/docs/AgentToServerInstantScheduledTestApi.md @@ -4,11 +4,11 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**post_agent_to_server_instant_test**](AgentToServerInstantScheduledTestApi.md#post_agent_to_server_instant_test) | **POST** /v7/endpoint/tests/scheduled-tests/agent-to-server/instant | Run agent to server instant scheduled test +[**create_agent_to_server_scheduled_instant_test**](AgentToServerInstantScheduledTestApi.md#create_agent_to_server_scheduled_instant_test) | **POST** /v7/endpoint/tests/scheduled-tests/agent-to-server/instant | Run agent to server instant scheduled test -# **post_agent_to_server_instant_test** -> EndpointAgentToServerTest post_agent_to_server_instant_test(endpoint_agent_to_server_instant_test, aid=aid) +# **create_agent_to_server_scheduled_instant_test** +> EndpointAgentToServerTest create_agent_to_server_scheduled_instant_test(endpoint_agent_to_server_instant_test, aid=aid) Run agent to server instant scheduled test @@ -50,11 +50,11 @@ with thousandeyes_sdk.endpoint_instant_tests.ApiClient(configuration) as api_cli try: # Run agent to server instant scheduled test - api_response = api_instance.post_agent_to_server_instant_test(endpoint_agent_to_server_instant_test, aid=aid) - print("The response of AgentToServerInstantScheduledTestApi->post_agent_to_server_instant_test:\n") + api_response = api_instance.create_agent_to_server_scheduled_instant_test(endpoint_agent_to_server_instant_test, aid=aid) + print("The response of AgentToServerInstantScheduledTestApi->create_agent_to_server_scheduled_instant_test:\n") pprint(api_response) except Exception as e: - print("Exception when calling AgentToServerInstantScheduledTestApi->post_agent_to_server_instant_test: %s\n" % e) + print("Exception when calling AgentToServerInstantScheduledTestApi->create_agent_to_server_scheduled_instant_test: %s\n" % e) ``` @@ -78,7 +78,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-endpoint-instant-tests/docs/EndpointHttpServerTest.md b/thousandeyes-sdk-endpoint-instant-tests/docs/EndpointHttpServerTest.md index e909a446..0a870222 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/docs/EndpointHttpServerTest.md +++ b/thousandeyes-sdk-endpoint-instant-tests/docs/EndpointHttpServerTest.md @@ -30,7 +30,7 @@ Name | Type | Description | Notes **ssl_version_id** | [**TestSslVersionId**](TestSslVersionId.md) | | [optional] **verify_certificate** | **bool** | Flag indicating if a certificate should be verified. | [optional] **content_regex** | **str** | Content regex, this field does not require escaping. | [optional] -**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to false. | [optional] [default to True] +**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`. | [optional] [default to True] **http_target_time** | **int** | Target time for HTTP server completion, specified in milliseconds. | [optional] **http_version** | **int** | HTTP protocol version. Set to '2' to prefer HTTP/2, or '1' to use only HTTP/1.1. | [optional] [default to 2] **post_body** | **str** | Enter the body for the HTTP POST request in this field. No special escaping is necessary. If the post body is provided with content, the `requestMethod` is automatically set to POST. | [optional] diff --git a/thousandeyes-sdk-endpoint-instant-tests/docs/HttpServerInstantScheduledTestApi.md b/thousandeyes-sdk-endpoint-instant-tests/docs/HttpServerInstantScheduledTestApi.md index a384f6da..80ce1561 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/docs/HttpServerInstantScheduledTestApi.md +++ b/thousandeyes-sdk-endpoint-instant-tests/docs/HttpServerInstantScheduledTestApi.md @@ -4,11 +4,11 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**post_http_server_instant_test**](HttpServerInstantScheduledTestApi.md#post_http_server_instant_test) | **POST** /v7/endpoint/tests/scheduled-tests/http-server/instant | Run http server instant scheduled test +[**create_http_server_scheduled_instant_test**](HttpServerInstantScheduledTestApi.md#create_http_server_scheduled_instant_test) | **POST** /v7/endpoint/tests/scheduled-tests/http-server/instant | Run http server instant scheduled test -# **post_http_server_instant_test** -> EndpointHttpServerTest post_http_server_instant_test(endpoint_http_server_instant_test, aid=aid) +# **create_http_server_scheduled_instant_test** +> EndpointHttpServerTest create_http_server_scheduled_instant_test(endpoint_http_server_instant_test, aid=aid) Run http server instant scheduled test @@ -50,11 +50,11 @@ with thousandeyes_sdk.endpoint_instant_tests.ApiClient(configuration) as api_cli try: # Run http server instant scheduled test - api_response = api_instance.post_http_server_instant_test(endpoint_http_server_instant_test, aid=aid) - print("The response of HttpServerInstantScheduledTestApi->post_http_server_instant_test:\n") + api_response = api_instance.create_http_server_scheduled_instant_test(endpoint_http_server_instant_test, aid=aid) + print("The response of HttpServerInstantScheduledTestApi->create_http_server_scheduled_instant_test:\n") pprint(api_response) except Exception as e: - print("Exception when calling HttpServerInstantScheduledTestApi->post_http_server_instant_test: %s\n" % e) + print("Exception when calling HttpServerInstantScheduledTestApi->create_http_server_scheduled_instant_test: %s\n" % e) ``` @@ -78,7 +78,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-endpoint-instant-tests/docs/RunExistingTestApi.md b/thousandeyes-sdk-endpoint-instant-tests/docs/RunExistingTestApi.md index 64b52299..12c3fb41 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/docs/RunExistingTestApi.md +++ b/thousandeyes-sdk-endpoint-instant-tests/docs/RunExistingTestApi.md @@ -4,11 +4,11 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**post_endpoint_instant_run**](RunExistingTestApi.md#post_endpoint_instant_run) | **POST** /v7/endpoint/tests/scheduled-tests/{testId}/run | Run endpoint instant scheduled test +[**run_endpoint_scheduled_instant_test**](RunExistingTestApi.md#run_endpoint_scheduled_instant_test) | **POST** /v7/endpoint/tests/scheduled-tests/{testId}/run | Run endpoint instant scheduled test -# **post_endpoint_instant_run** -> post_endpoint_instant_run(test_id, aid=aid) +# **run_endpoint_scheduled_instant_test** +> run_endpoint_scheduled_instant_test(test_id, aid=aid) Run endpoint instant scheduled test @@ -48,9 +48,9 @@ with thousandeyes_sdk.endpoint_instant_tests.ApiClient(configuration) as api_cli try: # Run endpoint instant scheduled test - api_instance.post_endpoint_instant_run(test_id, aid=aid) + api_instance.run_endpoint_scheduled_instant_test(test_id, aid=aid) except Exception as e: - print("Exception when calling RunExistingTestApi->post_endpoint_instant_run: %s\n" % e) + print("Exception when calling RunExistingTestApi->run_endpoint_scheduled_instant_test: %s\n" % e) ``` diff --git a/thousandeyes-sdk-endpoint-instant-tests/docs/ValidationErrorItem.md b/thousandeyes-sdk-endpoint-instant-tests/docs/ValidationErrorItem.md index 7db7b4b5..e926249e 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/docs/ValidationErrorItem.md +++ b/thousandeyes-sdk-endpoint-instant-tests/docs/ValidationErrorItem.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **code** | **str** | (Optional) A unique error type/code that can be referenced in the documentation for further details. | [optional] -**var_field** | **int** | Identifies the field that triggered this particular error. | [optional] +**var_field** | **str** | Identifies the field that triggered this particular error. | [optional] **message** | **str** | A short, human-readable summary of the error. | [optional] ## Example diff --git a/thousandeyes-sdk-endpoint-instant-tests/pyproject.toml b/thousandeyes-sdk-endpoint-instant-tests/pyproject.toml index b3469766..6653f945 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/pyproject.toml +++ b/thousandeyes-sdk-endpoint-instant-tests/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "thousandeyes-sdk-endpoint-instant-tests" -version = "1.0.0" +dynamic = ["version"] authors = [ { name = "ThousandEyes API Team", email = "api-team@thousandeyes.com" } ] @@ -11,9 +11,12 @@ dependencies = [ "python-dateutil >=2.8.2", "pydantic >=2", "typing-extensions >=4.7.1", - "thousandeyes-sdk-client==1.0.0", + "thousandeyes-sdk-core", ] +[tool.setuptools.dynamic] +version = {attr = "thousandeyes_sdk.client.__version__"} + [project.optional-dependencies] test = [ "pytest~=7.1.3", diff --git a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/__init__.py b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/__init__.py index fc07d5c4..fc198411 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/__init__.py +++ b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/__init__.py @@ -7,15 +7,13 @@ You can create and execute a new endpoint instant scheduled test within ThousandEyes using this API. The test parameters are specified in the `POST` data. The following applies to the Endpoint Instant Scheduled Tests API: * To initiate the creation and execution of an instant scheduled test, the user must possess the `Edit endpoint tests` permission. * Upon successful creation of an instant scheduled test, the API responds with an HTTP/201 CREATED status code and return the test definition. * It's important to note that the response does not include the results of the instant scheduled test. To retrieve test results, users can utilize the Endpoint Test Data endpoints. The URLs for these API test data endpoints are provided within the test definition output when an instant scheduled test is created. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 -__version__ = "1.0.0" - # import apis into sdk package from thousandeyes_sdk.endpoint_instant_tests.api.agent_to_server_instant_scheduled_test_api import AgentToServerInstantScheduledTestApi from thousandeyes_sdk.endpoint_instant_tests.api.http_server_instant_scheduled_test_api import HttpServerInstantScheduledTestApi diff --git a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/api/agent_to_server_instant_scheduled_test_api.py b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/api/agent_to_server_instant_scheduled_test_api.py index 10c73a16..6b9065f2 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/api/agent_to_server_instant_scheduled_test_api.py +++ b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/api/agent_to_server_instant_scheduled_test_api.py @@ -5,7 +5,7 @@ You can create and execute a new endpoint instant scheduled test within ThousandEyes using this API. The test parameters are specified in the `POST` data. The following applies to the Endpoint Instant Scheduled Tests API: * To initiate the creation and execution of an instant scheduled test, the user must possess the `Edit endpoint tests` permission. * Upon successful creation of an instant scheduled test, the API responds with an HTTP/201 CREATED status code and return the test definition. * It's important to note that the response does not include the results of the instant scheduled test. To retrieve test results, users can utilize the Endpoint Test Data endpoints. The URLs for these API test data endpoints are provided within the test definition output when an instant scheduled test is created. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -27,6 +27,7 @@ from thousandeyes_sdk.endpoint_instant_tests.models.endpoint_agent_to_server_tes from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class AgentToServerInstantScheduledTestApi: @@ -39,11 +40,12 @@ class AgentToServerInstantScheduledTestApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @validate_call - def post_agent_to_server_instant_test( + def create_agent_to_server_scheduled_instant_test( self, endpoint_agent_to_server_instant_test: EndpointAgentToServerInstantTest, 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, @@ -90,7 +92,7 @@ class AgentToServerInstantScheduledTestApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_agent_to_server_instant_test_serialize( + _param = self._create_agent_to_server_scheduled_instant_test_serialize( endpoint_agent_to_server_instant_test=endpoint_agent_to_server_instant_test, aid=aid, _request_auth=_request_auth, @@ -121,7 +123,7 @@ class AgentToServerInstantScheduledTestApi: @validate_call - def post_agent_to_server_instant_test_with_http_info( + def create_agent_to_server_scheduled_instant_test_with_http_info( self, endpoint_agent_to_server_instant_test: EndpointAgentToServerInstantTest, 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, @@ -168,7 +170,7 @@ class AgentToServerInstantScheduledTestApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_agent_to_server_instant_test_serialize( + _param = self._create_agent_to_server_scheduled_instant_test_serialize( endpoint_agent_to_server_instant_test=endpoint_agent_to_server_instant_test, aid=aid, _request_auth=_request_auth, @@ -199,7 +201,7 @@ class AgentToServerInstantScheduledTestApi: @validate_call - def post_agent_to_server_instant_test_without_preload_content( + def create_agent_to_server_scheduled_instant_test_without_preload_content( self, endpoint_agent_to_server_instant_test: EndpointAgentToServerInstantTest, 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, @@ -246,7 +248,7 @@ class AgentToServerInstantScheduledTestApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_agent_to_server_instant_test_serialize( + _param = self._create_agent_to_server_scheduled_instant_test_serialize( endpoint_agent_to_server_instant_test=endpoint_agent_to_server_instant_test, aid=aid, _request_auth=_request_auth, @@ -271,7 +273,7 @@ class AgentToServerInstantScheduledTestApi: return response_data.response - def _post_agent_to_server_instant_test_serialize( + def _create_agent_to_server_scheduled_instant_test_serialize( self, endpoint_agent_to_server_instant_test, aid, @@ -310,6 +312,7 @@ class AgentToServerInstantScheduledTestApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/api/http_server_instant_scheduled_test_api.py b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/api/http_server_instant_scheduled_test_api.py index 154f6b80..164238d7 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/api/http_server_instant_scheduled_test_api.py +++ b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/api/http_server_instant_scheduled_test_api.py @@ -5,7 +5,7 @@ You can create and execute a new endpoint instant scheduled test within ThousandEyes using this API. The test parameters are specified in the `POST` data. The following applies to the Endpoint Instant Scheduled Tests API: * To initiate the creation and execution of an instant scheduled test, the user must possess the `Edit endpoint tests` permission. * Upon successful creation of an instant scheduled test, the API responds with an HTTP/201 CREATED status code and return the test definition. * It's important to note that the response does not include the results of the instant scheduled test. To retrieve test results, users can utilize the Endpoint Test Data endpoints. The URLs for these API test data endpoints are provided within the test definition output when an instant scheduled test is created. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -27,6 +27,7 @@ from thousandeyes_sdk.endpoint_instant_tests.models.endpoint_http_server_test im from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class HttpServerInstantScheduledTestApi: @@ -39,11 +40,12 @@ class HttpServerInstantScheduledTestApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @validate_call - def post_http_server_instant_test( + def create_http_server_scheduled_instant_test( self, endpoint_http_server_instant_test: EndpointHttpServerInstantTest, 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, @@ -90,7 +92,7 @@ class HttpServerInstantScheduledTestApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_http_server_instant_test_serialize( + _param = self._create_http_server_scheduled_instant_test_serialize( endpoint_http_server_instant_test=endpoint_http_server_instant_test, aid=aid, _request_auth=_request_auth, @@ -121,7 +123,7 @@ class HttpServerInstantScheduledTestApi: @validate_call - def post_http_server_instant_test_with_http_info( + def create_http_server_scheduled_instant_test_with_http_info( self, endpoint_http_server_instant_test: EndpointHttpServerInstantTest, 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, @@ -168,7 +170,7 @@ class HttpServerInstantScheduledTestApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_http_server_instant_test_serialize( + _param = self._create_http_server_scheduled_instant_test_serialize( endpoint_http_server_instant_test=endpoint_http_server_instant_test, aid=aid, _request_auth=_request_auth, @@ -199,7 +201,7 @@ class HttpServerInstantScheduledTestApi: @validate_call - def post_http_server_instant_test_without_preload_content( + def create_http_server_scheduled_instant_test_without_preload_content( self, endpoint_http_server_instant_test: EndpointHttpServerInstantTest, 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, @@ -246,7 +248,7 @@ class HttpServerInstantScheduledTestApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_http_server_instant_test_serialize( + _param = self._create_http_server_scheduled_instant_test_serialize( endpoint_http_server_instant_test=endpoint_http_server_instant_test, aid=aid, _request_auth=_request_auth, @@ -271,7 +273,7 @@ class HttpServerInstantScheduledTestApi: return response_data.response - def _post_http_server_instant_test_serialize( + def _create_http_server_scheduled_instant_test_serialize( self, endpoint_http_server_instant_test, aid, @@ -310,6 +312,7 @@ class HttpServerInstantScheduledTestApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/api/run_existing_test_api.py b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/api/run_existing_test_api.py index 95d7dc71..e33f3b87 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/api/run_existing_test_api.py +++ b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/api/run_existing_test_api.py @@ -5,7 +5,7 @@ You can create and execute a new endpoint instant scheduled test within ThousandEyes using this API. The test parameters are specified in the `POST` data. The following applies to the Endpoint Instant Scheduled Tests API: * To initiate the creation and execution of an instant scheduled test, the user must possess the `Edit endpoint tests` permission. * Upon successful creation of an instant scheduled test, the API responds with an HTTP/201 CREATED status code and return the test definition. * It's important to note that the response does not include the results of the instant scheduled test. To retrieve test results, users can utilize the Endpoint Test Data endpoints. The URLs for these API test data endpoints are provided within the test definition output when an instant scheduled test is created. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -25,6 +25,7 @@ from typing_extensions import Annotated from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class RunExistingTestApi: @@ -37,11 +38,12 @@ class RunExistingTestApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @validate_call - def post_endpoint_instant_run( + def run_endpoint_scheduled_instant_test( self, test_id: Annotated[StrictStr, Field(description="ID of the endpoint instant scheduled test to rerun")], 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, @@ -88,7 +90,7 @@ class RunExistingTestApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_endpoint_instant_run_serialize( + _param = self._run_endpoint_scheduled_instant_test_serialize( test_id=test_id, aid=aid, _request_auth=_request_auth, @@ -119,7 +121,7 @@ class RunExistingTestApi: @validate_call - def post_endpoint_instant_run_with_http_info( + def run_endpoint_scheduled_instant_test_with_http_info( self, test_id: Annotated[StrictStr, Field(description="ID of the endpoint instant scheduled test to rerun")], 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, @@ -166,7 +168,7 @@ class RunExistingTestApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_endpoint_instant_run_serialize( + _param = self._run_endpoint_scheduled_instant_test_serialize( test_id=test_id, aid=aid, _request_auth=_request_auth, @@ -197,7 +199,7 @@ class RunExistingTestApi: @validate_call - def post_endpoint_instant_run_without_preload_content( + def run_endpoint_scheduled_instant_test_without_preload_content( self, test_id: Annotated[StrictStr, Field(description="ID of the endpoint instant scheduled test to rerun")], 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, @@ -244,7 +246,7 @@ class RunExistingTestApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_endpoint_instant_run_serialize( + _param = self._run_endpoint_scheduled_instant_test_serialize( test_id=test_id, aid=aid, _request_auth=_request_auth, @@ -269,7 +271,7 @@ class RunExistingTestApi: return response_data.response - def _post_endpoint_instant_run_serialize( + def _run_endpoint_scheduled_instant_test_serialize( self, test_id, aid, diff --git a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/__init__.py b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/__init__.py index d270c409..9c14e2cc 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/__init__.py +++ b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/__init__.py @@ -6,7 +6,7 @@ You can create and execute a new endpoint instant scheduled test within ThousandEyes using this API. The test parameters are specified in the `POST` data. The following applies to the Endpoint Instant Scheduled Tests API: * To initiate the creation and execution of an instant scheduled test, the user must possess the `Edit endpoint tests` permission. * Upon successful creation of an instant scheduled test, the API responds with an HTTP/201 CREATED status code and return the test definition. * It's important to note that the response does not include the results of the instant scheduled test. To retrieve test results, users can utilize the Endpoint Test Data endpoints. The URLs for these API test data endpoints are provided within the test definition output when an instant scheduled test is created. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/alert_direction.py b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/alert_direction.py index 9d0be7dd..1f9c0cec 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/alert_direction.py +++ b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/alert_direction.py @@ -5,7 +5,7 @@ You can create and execute a new endpoint instant scheduled test within ThousandEyes using this API. The test parameters are specified in the `POST` data. The following applies to the Endpoint Instant Scheduled Tests API: * To initiate the creation and execution of an instant scheduled test, the user must possess the `Edit endpoint tests` permission. * Upon successful creation of an instant scheduled test, the API responds with an HTTP/201 CREATED status code and return the test definition. * It's important to note that the response does not include the results of the instant scheduled test. To retrieve test results, users can utilize the Endpoint Test Data endpoints. The URLs for these API test data endpoints are provided within the test definition output when an instant scheduled test is created. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/alert_rounds_violation_mode.py b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/alert_rounds_violation_mode.py index f65f4b9a..52e8593d 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/alert_rounds_violation_mode.py +++ b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/alert_rounds_violation_mode.py @@ -5,7 +5,7 @@ You can create and execute a new endpoint instant scheduled test within ThousandEyes using this API. The test parameters are specified in the `POST` data. The following applies to the Endpoint Instant Scheduled Tests API: * To initiate the creation and execution of an instant scheduled test, the user must possess the `Edit endpoint tests` permission. * Upon successful creation of an instant scheduled test, the API responds with an HTTP/201 CREATED status code and return the test definition. * It's important to note that the response does not include the results of the instant scheduled test. To retrieve test results, users can utilize the Endpoint Test Data endpoints. The URLs for these API test data endpoints are provided within the test definition output when an instant scheduled test is created. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/alert_rule.py b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/alert_rule.py index 5767541c..f10ac536 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/alert_rule.py +++ b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/alert_rule.py @@ -5,7 +5,7 @@ You can create and execute a new endpoint instant scheduled test within ThousandEyes using this API. The test parameters are specified in the `POST` data. The following applies to the Endpoint Instant Scheduled Tests API: * To initiate the creation and execution of an instant scheduled test, the user must possess the `Edit endpoint tests` permission. * Upon successful creation of an instant scheduled test, the API responds with an HTTP/201 CREATED status code and return the test definition. * It's important to note that the response does not include the results of the instant scheduled test. To retrieve test results, users can utilize the Endpoint Test Data endpoints. The URLs for these API test data endpoints are provided within the test definition output when an instant scheduled test is created. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -48,6 +48,7 @@ class AlertRule(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -58,7 +59,7 @@ class AlertRule(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/alert_type.py b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/alert_type.py index 2ba476a6..5f6a50f3 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/alert_type.py +++ b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/alert_type.py @@ -5,7 +5,7 @@ You can create and execute a new endpoint instant scheduled test within ThousandEyes using this API. The test parameters are specified in the `POST` data. The following applies to the Endpoint Instant Scheduled Tests API: * To initiate the creation and execution of an instant scheduled test, the user must possess the `Edit endpoint tests` permission. * Upon successful creation of an instant scheduled test, the API responds with an HTTP/201 CREATED status code and return the test definition. * It's important to note that the response does not include the results of the instant scheduled test. To retrieve test results, users can utilize the Endpoint Test Data endpoints. The URLs for these API test data endpoints are provided within the test definition output when an instant scheduled test is created. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_agent_labels_selector_config.py b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_agent_labels_selector_config.py index b68fd5e3..d08479e1 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_agent_labels_selector_config.py +++ b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_agent_labels_selector_config.py @@ -5,7 +5,7 @@ You can create and execute a new endpoint instant scheduled test within ThousandEyes using this API. The test parameters are specified in the `POST` data. The following applies to the Endpoint Instant Scheduled Tests API: * To initiate the creation and execution of an instant scheduled test, the user must possess the `Edit endpoint tests` permission. * Upon successful creation of an instant scheduled test, the API responds with an HTTP/201 CREATED status code and return the test definition. * It's important to note that the response does not include the results of the instant scheduled test. To retrieve test results, users can utilize the Endpoint Test Data endpoints. The URLs for these API test data endpoints are provided within the test definition output when an instant scheduled test is created. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -43,6 +43,7 @@ class EndpointAgentLabelsSelectorConfig(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -53,7 +54,7 @@ class EndpointAgentLabelsSelectorConfig(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_agent_selector_config.py b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_agent_selector_config.py index 5ab5e111..0ec2079e 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_agent_selector_config.py +++ b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_agent_selector_config.py @@ -5,7 +5,7 @@ You can create and execute a new endpoint instant scheduled test within ThousandEyes using this API. The test parameters are specified in the `POST` data. The following applies to the Endpoint Instant Scheduled Tests API: * To initiate the creation and execution of an instant scheduled test, the user must possess the `Edit endpoint tests` permission. * Upon successful creation of an instant scheduled test, the API responds with an HTTP/201 CREATED status code and return the test definition. * It's important to note that the response does not include the results of the instant scheduled test. To retrieve test results, users can utilize the Endpoint Test Data endpoints. The URLs for these API test data endpoints are provided within the test definition output when an instant scheduled test is created. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -20,7 +20,7 @@ from typing import Any, List, Optional from thousandeyes_sdk.endpoint_instant_tests.models.endpoint_agent_labels_selector_config import EndpointAgentLabelsSelectorConfig from thousandeyes_sdk.endpoint_instant_tests.models.endpoint_all_agents_selector_config import EndpointAllAgentsSelectorConfig from thousandeyes_sdk.endpoint_instant_tests.models.endpoint_specific_agents_selector_config import EndpointSpecificAgentsSelectorConfig -from pydantic import StrictStr, Field +from pydantic import StrictStr, Field, model_serializer from typing import Union, List, Set, Optional, Dict from typing_extensions import Literal, Self @@ -126,6 +126,10 @@ class EndpointAgentSelectorConfig(BaseModel): 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: diff --git a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_agent_to_server_instant_test.py b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_agent_to_server_instant_test.py index 3c33ebd4..79d8ee27 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_agent_to_server_instant_test.py +++ b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_agent_to_server_instant_test.py @@ -5,7 +5,7 @@ You can create and execute a new endpoint instant scheduled test within ThousandEyes using this API. The test parameters are specified in the `POST` data. The following applies to the Endpoint Instant Scheduled Tests API: * To initiate the creation and execution of an instant scheduled test, the user must possess the `Edit endpoint tests` permission. * Upon successful creation of an instant scheduled test, the API responds with an HTTP/201 CREATED status code and return the test definition. * It's important to note that the response does not include the results of the instant scheduled test. To retrieve test results, users can utilize the Endpoint Test Data endpoints. The URLs for these API test data endpoints are provided within the test definition output when an instant scheduled test is created. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -43,6 +43,7 @@ class EndpointAgentToServerInstantTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -53,7 +54,7 @@ class EndpointAgentToServerInstantTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_agent_to_server_test.py b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_agent_to_server_test.py index 8aa6ff72..c87f7e09 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_agent_to_server_test.py +++ b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_agent_to_server_test.py @@ -5,7 +5,7 @@ You can create and execute a new endpoint instant scheduled test within ThousandEyes using this API. The test parameters are specified in the `POST` data. The following applies to the Endpoint Instant Scheduled Tests API: * To initiate the creation and execution of an instant scheduled test, the user must possess the `Edit endpoint tests` permission. * Upon successful creation of an instant scheduled test, the API responds with an HTTP/201 CREATED status code and return the test definition. * It's important to note that the response does not include the results of the instant scheduled test. To retrieve test results, users can utilize the Endpoint Test Data endpoints. The URLs for these API test data endpoints are provided within the test definition output when an instant scheduled test is created. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -67,6 +67,7 @@ class EndpointAgentToServerTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -77,7 +78,7 @@ class EndpointAgentToServerTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_all_agents_selector_config.py b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_all_agents_selector_config.py index 0100d59d..5bce3179 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_all_agents_selector_config.py +++ b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_all_agents_selector_config.py @@ -5,7 +5,7 @@ You can create and execute a new endpoint instant scheduled test within ThousandEyes using this API. The test parameters are specified in the `POST` data. The following applies to the Endpoint Instant Scheduled Tests API: * To initiate the creation and execution of an instant scheduled test, the user must possess the `Edit endpoint tests` permission. * Upon successful creation of an instant scheduled test, the API responds with an HTTP/201 CREATED status code and return the test definition. * It's important to note that the response does not include the results of the instant scheduled test. To retrieve test results, users can utilize the Endpoint Test Data endpoints. The URLs for these API test data endpoints are provided within the test definition output when an instant scheduled test is created. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -42,6 +42,7 @@ class EndpointAllAgentsSelectorConfig(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -52,7 +53,7 @@ class EndpointAllAgentsSelectorConfig(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_http_server_base_test.py b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_http_server_base_test.py index c99ccbff..f3745934 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_http_server_base_test.py +++ b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_http_server_base_test.py @@ -5,7 +5,7 @@ You can create and execute a new endpoint instant scheduled test within ThousandEyes using this API. The test parameters are specified in the `POST` data. The following applies to the Endpoint Instant Scheduled Tests API: * To initiate the creation and execution of an instant scheduled test, the user must possess the `Edit endpoint tests` permission. * Upon successful creation of an instant scheduled test, the API responds with an HTTP/201 CREATED status code and return the test definition. * It's important to note that the response does not include the results of the instant scheduled test. To retrieve test results, users can utilize the Endpoint Test Data endpoints. The URLs for these API test data endpoints are provided within the test definition output when an instant scheduled test is created. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -45,6 +45,7 @@ class EndpointHttpServerBaseTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -55,7 +56,7 @@ class EndpointHttpServerBaseTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_http_server_instant_test.py b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_http_server_instant_test.py index 2f3d4ecc..1d7f6855 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_http_server_instant_test.py +++ b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_http_server_instant_test.py @@ -5,7 +5,7 @@ You can create and execute a new endpoint instant scheduled test within ThousandEyes using this API. The test parameters are specified in the `POST` data. The following applies to the Endpoint Instant Scheduled Tests API: * To initiate the creation and execution of an instant scheduled test, the user must possess the `Edit endpoint tests` permission. * Upon successful creation of an instant scheduled test, the API responds with an HTTP/201 CREATED status code and return the test definition. * It's important to note that the response does not include the results of the instant scheduled test. To retrieve test results, users can utilize the Endpoint Test Data endpoints. The URLs for these API test data endpoints are provided within the test definition output when an instant scheduled test is created. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -57,6 +57,7 @@ class EndpointHttpServerInstantTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -67,7 +68,7 @@ class EndpointHttpServerInstantTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_http_server_test.py b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_http_server_test.py index 3b10ac40..0ec186bf 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_http_server_test.py +++ b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_http_server_test.py @@ -5,7 +5,7 @@ You can create and execute a new endpoint instant scheduled test within ThousandEyes using this API. The test parameters are specified in the `POST` data. The following applies to the Endpoint Instant Scheduled Tests API: * To initiate the creation and execution of an instant scheduled test, the user must possess the `Edit endpoint tests` permission. * Upon successful creation of an instant scheduled test, the API responds with an HTTP/201 CREATED status code and return the test definition. * It's important to note that the response does not include the results of the instant scheduled test. To retrieve test results, users can utilize the Endpoint Test Data endpoints. The URLs for these API test data endpoints are provided within the test definition output when an instant scheduled test is created. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -62,7 +62,7 @@ class EndpointHttpServerTest(BaseModel): ssl_version_id: Optional[TestSslVersionId] = Field(default=None, alias="sslVersionId") verify_certificate: Optional[StrictBool] = Field(default=None, description="Flag indicating if a certificate should be verified.", alias="verifyCertificate") content_regex: Optional[StrictStr] = Field(default=None, description="Content regex, this field does not require escaping.", alias="contentRegex") - follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to false.", alias="followRedirects") + follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`.", alias="followRedirects") http_target_time: Optional[Annotated[int, Field(le=5000, strict=True, ge=100)]] = Field(default=None, description="Target time for HTTP server completion, specified in milliseconds.", alias="httpTargetTime") http_version: Optional[Annotated[int, Field(le=2, strict=True, ge=1)]] = Field(default=2, description="HTTP protocol version. Set to '2' to prefer HTTP/2, or '1' to use only HTTP/1.1.", alias="httpVersion") post_body: Optional[StrictStr] = Field(default=None, description="Enter the body for the HTTP POST request in this field. No special escaping is necessary. If the post body is provided with content, the `requestMethod` is automatically set to POST.", alias="postBody") @@ -83,6 +83,7 @@ class EndpointHttpServerTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -93,7 +94,7 @@ class EndpointHttpServerTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_instant_test.py b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_instant_test.py index ab3f5945..96d1dfc7 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_instant_test.py +++ b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_instant_test.py @@ -5,7 +5,7 @@ You can create and execute a new endpoint instant scheduled test within ThousandEyes using this API. The test parameters are specified in the `POST` data. The following applies to the Endpoint Instant Scheduled Tests API: * To initiate the creation and execution of an instant scheduled test, the user must possess the `Edit endpoint tests` permission. * Upon successful creation of an instant scheduled test, the API responds with an HTTP/201 CREATED status code and return the test definition. * It's important to note that the response does not include the results of the instant scheduled test. To retrieve test results, users can utilize the Endpoint Test Data endpoints. The URLs for these API test data endpoints are provided within the test definition output when an instant scheduled test is created. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -42,6 +42,7 @@ class EndpointInstantTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -52,7 +53,7 @@ class EndpointInstantTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_scheduled_test_type.py b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_scheduled_test_type.py index d2cdc647..9b63b678 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_scheduled_test_type.py +++ b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_scheduled_test_type.py @@ -5,7 +5,7 @@ You can create and execute a new endpoint instant scheduled test within ThousandEyes using this API. The test parameters are specified in the `POST` data. The following applies to the Endpoint Instant Scheduled Tests API: * To initiate the creation and execution of an instant scheduled test, the user must possess the `Edit endpoint tests` permission. * Upon successful creation of an instant scheduled test, the API responds with an HTTP/201 CREATED status code and return the test definition. * It's important to note that the response does not include the results of the instant scheduled test. To retrieve test results, users can utilize the Endpoint Test Data endpoints. The URLs for these API test data endpoints are provided within the test definition output when an instant scheduled test is created. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_specific_agents_selector_config.py b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_specific_agents_selector_config.py index ec54cc59..ee2dd178 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_specific_agents_selector_config.py +++ b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_specific_agents_selector_config.py @@ -5,7 +5,7 @@ You can create and execute a new endpoint instant scheduled test within ThousandEyes using this API. The test parameters are specified in the `POST` data. The following applies to the Endpoint Instant Scheduled Tests API: * To initiate the creation and execution of an instant scheduled test, the user must possess the `Edit endpoint tests` permission. * Upon successful creation of an instant scheduled test, the API responds with an HTTP/201 CREATED status code and return the test definition. * It's important to note that the response does not include the results of the instant scheduled test. To retrieve test results, users can utilize the Endpoint Test Data endpoints. The URLs for these API test data endpoints are provided within the test definition output when an instant scheduled test is created. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -43,6 +43,7 @@ class EndpointSpecificAgentsSelectorConfig(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -53,7 +54,7 @@ class EndpointSpecificAgentsSelectorConfig(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_test.py b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_test.py index 7f26a3a7..33dcf2dc 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_test.py +++ b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_test.py @@ -5,7 +5,7 @@ You can create and execute a new endpoint instant scheduled test within ThousandEyes using this API. The test parameters are specified in the `POST` data. The following applies to the Endpoint Instant Scheduled Tests API: * To initiate the creation and execution of an instant scheduled test, the user must possess the `Edit endpoint tests` permission. * Upon successful creation of an instant scheduled test, the API responds with an HTTP/201 CREATED status code and return the test definition. * It's important to note that the response does not include the results of the instant scheduled test. To retrieve test results, users can utilize the Endpoint Test Data endpoints. The URLs for these API test data endpoints are provided within the test definition output when an instant scheduled test is created. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -58,6 +58,7 @@ class EndpointTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -68,7 +69,7 @@ class EndpointTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_test_agent_selector_type.py b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_test_agent_selector_type.py index 436f2d82..dd57aea6 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_test_agent_selector_type.py +++ b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_test_agent_selector_type.py @@ -5,7 +5,7 @@ You can create and execute a new endpoint instant scheduled test within ThousandEyes using this API. The test parameters are specified in the `POST` data. The following applies to the Endpoint Instant Scheduled Tests API: * To initiate the creation and execution of an instant scheduled test, the user must possess the `Edit endpoint tests` permission. * Upon successful creation of an instant scheduled test, the API responds with an HTTP/201 CREATED status code and return the test definition. * It's important to note that the response does not include the results of the instant scheduled test. To retrieve test results, users can utilize the Endpoint Test Data endpoints. The URLs for these API test data endpoints are provided within the test definition output when an instant scheduled test is created. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_test_auth_type.py b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_test_auth_type.py index 236f3615..d73da0f5 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_test_auth_type.py +++ b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_test_auth_type.py @@ -5,7 +5,7 @@ You can create and execute a new endpoint instant scheduled test within ThousandEyes using this API. The test parameters are specified in the `POST` data. The following applies to the Endpoint Instant Scheduled Tests API: * To initiate the creation and execution of an instant scheduled test, the user must possess the `Edit endpoint tests` permission. * Upon successful creation of an instant scheduled test, the API responds with an HTTP/201 CREATED status code and return the test definition. * It's important to note that the response does not include the results of the instant scheduled test. To retrieve test results, users can utilize the Endpoint Test Data endpoints. The URLs for these API test data endpoints are provided within the test definition output when an instant scheduled test is created. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_test_links.py b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_test_links.py index 6570f9a3..78f8f627 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_test_links.py +++ b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_test_links.py @@ -5,7 +5,7 @@ You can create and execute a new endpoint instant scheduled test within ThousandEyes using this API. The test parameters are specified in the `POST` data. The following applies to the Endpoint Instant Scheduled Tests API: * To initiate the creation and execution of an instant scheduled test, the user must possess the `Edit endpoint tests` permission. * Upon successful creation of an instant scheduled test, the API responds with an HTTP/201 CREATED status code and return the test definition. * It's important to note that the response does not include the results of the instant scheduled test. To retrieve test results, users can utilize the Endpoint Test Data endpoints. The URLs for these API test data endpoints are provided within the test definition output when an instant scheduled test is created. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class EndpointTestLinks(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class EndpointTestLinks(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_test_protocol.py b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_test_protocol.py index 2b7d3f8d..2cf0af0f 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_test_protocol.py +++ b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_test_protocol.py @@ -5,7 +5,7 @@ You can create and execute a new endpoint instant scheduled test within ThousandEyes using this API. The test parameters are specified in the `POST` data. The following applies to the Endpoint Instant Scheduled Tests API: * To initiate the creation and execution of an instant scheduled test, the user must possess the `Edit endpoint tests` permission. * Upon successful creation of an instant scheduled test, the API responds with an HTTP/201 CREATED status code and return the test definition. * It's important to note that the response does not include the results of the instant scheduled test. To retrieve test results, users can utilize the Endpoint Test Data endpoints. The URLs for these API test data endpoints are provided within the test definition output when an instant scheduled test is created. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_test_self_link.py b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_test_self_link.py index ee105cf6..6baa055d 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_test_self_link.py +++ b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/endpoint_test_self_link.py @@ -5,7 +5,7 @@ You can create and execute a new endpoint instant scheduled test within ThousandEyes using this API. The test parameters are specified in the `POST` data. The following applies to the Endpoint Instant Scheduled Tests API: * To initiate the creation and execution of an instant scheduled test, the user must possess the `Edit endpoint tests` permission. * Upon successful creation of an instant scheduled test, the API responds with an HTTP/201 CREATED status code and return the test definition. * It's important to note that the response does not include the results of the instant scheduled test. To retrieve test results, users can utilize the Endpoint Test Data endpoints. The URLs for these API test data endpoints are provided within the test definition output when an instant scheduled test is created. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -40,6 +40,7 @@ class EndpointTestSelfLink(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -50,7 +51,7 @@ class EndpointTestSelfLink(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/error.py b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/error.py index 3473941e..b35062d6 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/error.py +++ b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/error.py @@ -5,7 +5,7 @@ You can create and execute a new endpoint instant scheduled test within ThousandEyes using this API. The test parameters are specified in the `POST` data. The following applies to the Endpoint Instant Scheduled Tests API: * To initiate the creation and execution of an instant scheduled test, the user must possess the `Edit endpoint tests` permission. * Upon successful creation of an instant scheduled test, the API responds with an HTTP/201 CREATED status code and return the test definition. * It's important to note that the response does not include the results of the instant scheduled test. To retrieve test results, users can utilize the Endpoint Test Data endpoints. The URLs for these API test data endpoints are provided within the test definition output when an instant scheduled test is created. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -37,6 +37,7 @@ class Error(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -47,7 +48,7 @@ class Error(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/link.py b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/link.py index ce30ac28..d69c897e 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/link.py +++ b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/link.py @@ -5,7 +5,7 @@ You can create and execute a new endpoint instant scheduled test within ThousandEyes using this API. The test parameters are specified in the `POST` data. The following applies to the Endpoint Instant Scheduled Tests API: * To initiate the creation and execution of an instant scheduled test, the user must possess the `Edit endpoint tests` permission. * Upon successful creation of an instant scheduled test, the API responds with an HTTP/201 CREATED status code and return the test definition. * It's important to note that the response does not include the results of the instant scheduled test. To retrieve test results, users can utilize the Endpoint Test Data endpoints. The URLs for these API test data endpoints are provided within the test definition output when an instant scheduled test is created. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -40,6 +40,7 @@ class Link(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -50,7 +51,7 @@ class Link(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/severity.py b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/severity.py index c386853c..cdad2157 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/severity.py +++ b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/severity.py @@ -5,7 +5,7 @@ You can create and execute a new endpoint instant scheduled test within ThousandEyes using this API. The test parameters are specified in the `POST` data. The following applies to the Endpoint Instant Scheduled Tests API: * To initiate the creation and execution of an instant scheduled test, the user must possess the `Edit endpoint tests` permission. * Upon successful creation of an instant scheduled test, the API responds with an HTTP/201 CREATED status code and return the test definition. * It's important to note that the response does not include the results of the instant scheduled test. To retrieve test results, users can utilize the Endpoint Test Data endpoints. The URLs for these API test data endpoints are provided within the test definition output when an instant scheduled test is created. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/test_interval.py b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/test_interval.py index e0e714cc..ddf6517d 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/test_interval.py +++ b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/test_interval.py @@ -5,7 +5,7 @@ You can create and execute a new endpoint instant scheduled test within ThousandEyes using this API. The test parameters are specified in the `POST` data. The following applies to the Endpoint Instant Scheduled Tests API: * To initiate the creation and execution of an instant scheduled test, the user must possess the `Edit endpoint tests` permission. * Upon successful creation of an instant scheduled test, the API responds with an HTTP/201 CREATED status code and return the test definition. * It's important to note that the response does not include the results of the instant scheduled test. To retrieve test results, users can utilize the Endpoint Test Data endpoints. The URLs for these API test data endpoints are provided within the test definition output when an instant scheduled test is created. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/test_label.py b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/test_label.py index 6db14ad2..4192b405 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/test_label.py +++ b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/test_label.py @@ -5,7 +5,7 @@ You can create and execute a new endpoint instant scheduled test within ThousandEyes using this API. The test parameters are specified in the `POST` data. The following applies to the Endpoint Instant Scheduled Tests API: * To initiate the creation and execution of an instant scheduled test, the user must possess the `Edit endpoint tests` permission. * Upon successful creation of an instant scheduled test, the API responds with an HTTP/201 CREATED status code and return the test definition. * It's important to note that the response does not include the results of the instant scheduled test. To retrieve test results, users can utilize the Endpoint Test Data endpoints. The URLs for these API test data endpoints are provided within the test definition output when an instant scheduled test is created. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class TestLabel(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class TestLabel(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/test_probe_mode_response.py b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/test_probe_mode_response.py index 213575cc..089a30f7 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/test_probe_mode_response.py +++ b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/test_probe_mode_response.py @@ -5,7 +5,7 @@ You can create and execute a new endpoint instant scheduled test within ThousandEyes using this API. The test parameters are specified in the `POST` data. The following applies to the Endpoint Instant Scheduled Tests API: * To initiate the creation and execution of an instant scheduled test, the user must possess the `Edit endpoint tests` permission. * Upon successful creation of an instant scheduled test, the API responds with an HTTP/201 CREATED status code and return the test definition. * It's important to note that the response does not include the results of the instant scheduled test. To retrieve test results, users can utilize the Endpoint Test Data endpoints. The URLs for these API test data endpoints are provided within the test definition output when an instant scheduled test is created. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/test_ssl_version_id.py b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/test_ssl_version_id.py index 9567a568..f7fb1bce 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/test_ssl_version_id.py +++ b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/test_ssl_version_id.py @@ -5,7 +5,7 @@ You can create and execute a new endpoint instant scheduled test within ThousandEyes using this API. The test parameters are specified in the `POST` data. The following applies to the Endpoint Instant Scheduled Tests API: * To initiate the creation and execution of an instant scheduled test, the user must possess the `Edit endpoint tests` permission. * Upon successful creation of an instant scheduled test, the API responds with an HTTP/201 CREATED status code and return the test definition. * It's important to note that the response does not include the results of the instant scheduled test. To retrieve test results, users can utilize the Endpoint Test Data endpoints. The URLs for these API test data endpoints are provided within the test definition output when an instant scheduled test is created. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/unauthorized_error.py b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/unauthorized_error.py index cbf33b30..54cdd1ef 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/unauthorized_error.py +++ b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/unauthorized_error.py @@ -5,7 +5,7 @@ You can create and execute a new endpoint instant scheduled test within ThousandEyes using this API. The test parameters are specified in the `POST` data. The following applies to the Endpoint Instant Scheduled Tests API: * To initiate the creation and execution of an instant scheduled test, the user must possess the `Edit endpoint tests` permission. * Upon successful creation of an instant scheduled test, the API responds with an HTTP/201 CREATED status code and return the test definition. * It's important to note that the response does not include the results of the instant scheduled test. To retrieve test results, users can utilize the Endpoint Test Data endpoints. The URLs for these API test data endpoints are provided within the test definition output when an instant scheduled test is created. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class UnauthorizedError(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class UnauthorizedError(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/validation_error.py b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/validation_error.py index 5f1d5cb9..238842ea 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/validation_error.py +++ b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/validation_error.py @@ -5,7 +5,7 @@ You can create and execute a new endpoint instant scheduled test within ThousandEyes using this API. The test parameters are specified in the `POST` data. The following applies to the Endpoint Instant Scheduled Tests API: * To initiate the creation and execution of an instant scheduled test, the user must possess the `Edit endpoint tests` permission. * Upon successful creation of an instant scheduled test, the API responds with an HTTP/201 CREATED status code and return the test definition. * It's important to note that the response does not include the results of the instant scheduled test. To retrieve test results, users can utilize the Endpoint Test Data endpoints. The URLs for these API test data endpoints are provided within the test definition output when an instant scheduled test is created. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -39,6 +39,7 @@ class ValidationError(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -49,7 +50,7 @@ class ValidationError(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/validation_error_item.py b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/validation_error_item.py index 65e4e462..0fb2cfae 100644 --- a/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/validation_error_item.py +++ b/thousandeyes-sdk-endpoint-instant-tests/src/thousandeyes_sdk/endpoint_instant_tests/models/validation_error_item.py @@ -5,7 +5,7 @@ You can create and execute a new endpoint instant scheduled test within ThousandEyes using this API. The test parameters are specified in the `POST` data. The following applies to the Endpoint Instant Scheduled Tests API: * To initiate the creation and execution of an instant scheduled test, the user must possess the `Edit endpoint tests` permission. * Upon successful creation of an instant scheduled test, the API responds with an HTTP/201 CREATED status code and return the test definition. * It's important to note that the response does not include the results of the instant scheduled test. To retrieve test results, users can utilize the Endpoint Test Data endpoints. The URLs for these API test data endpoints are provided within the test definition output when an instant scheduled test is created. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,7 +17,7 @@ import pprint import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +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 @@ -27,7 +27,7 @@ class ValidationErrorItem(BaseModel): ValidationErrorItem """ # noqa: E501 code: Optional[StrictStr] = Field(default=None, description="(Optional) A unique error type/code that can be referenced in the documentation for further details.") - var_field: Optional[StrictInt] = Field(default=None, description="Identifies the field that triggered this particular error.", alias="field") + var_field: Optional[StrictStr] = Field(default=None, description="Identifies the field that triggered this particular error.", alias="field") message: Optional[StrictStr] = Field(default=None, description="A short, human-readable summary of the error.") __properties: ClassVar[List[str]] = ["code", "field", "message"] @@ -35,6 +35,7 @@ class ValidationErrorItem(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class ValidationErrorItem(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-instant-tests/test/test_agent_to_server_instant_scheduled_test_api.py b/thousandeyes-sdk-endpoint-instant-tests/test/test_agent_to_server_instant_scheduled_test_api.py new file mode 100644 index 00000000..d0109b4e --- /dev/null +++ b/thousandeyes-sdk-endpoint-instant-tests/test/test_agent_to_server_instant_scheduled_test_api.py @@ -0,0 +1,133 @@ +# coding: utf-8 + +""" + Endpoint Instant Scheduled Tests API + + You can create and execute a new endpoint instant scheduled test within ThousandEyes using this API. The test parameters are specified in the `POST` data. The following applies to the Endpoint Instant Scheduled Tests API: * To initiate the creation and execution of an instant scheduled test, the user must possess the `Edit endpoint tests` permission. * Upon successful creation of an instant scheduled test, the API responds with an HTTP/201 CREATED status code and return the test definition. * It's important to note that the response does not include the results of the instant scheduled test. To retrieve test results, users can utilize the Endpoint Test Data endpoints. The URLs for these API test data endpoints are provided within the test definition output when an instant scheduled test is created. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.endpoint_instant_tests.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.endpoint_instant_tests.api.agent_to_server_instant_scheduled_test_api import AgentToServerInstantScheduledTestApi + + +class TestAgentToServerInstantScheduledTestApi(unittest.TestCase): + """AgentToServerInstantScheduledTestApi unit test stubs""" + + def setUp(self) -> None: + self.api = AgentToServerInstantScheduledTestApi() + + def tearDown(self) -> None: + pass + + def test_create_agent_to_server_scheduled_instant_test_models_validation(self) -> None: + """Test case for create_agent_to_server_scheduled_instant_test request and response models""" + request_body_json = """ + { + "hasPing" : true, + "port" : 80, + "agentSelectorType" : "all-agents", + "hasTraceroute" : true, + "maxMachines" : 10, + "serverName" : "www.example.com", + "endpointAgentLabels" : [ "567", "214" ], + "agents" : [ "0a3b9998-dc3a-4ff2-b50d-ac4a7cd986e1", "66eec0f1-72b4-4755-aa83-3aed61d17f3c" ], + "testName" : "Test name" + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.endpoint_instant_tests.models.EndpointAgentToServerInstantTest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "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" + } + }, + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "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", + "port" : 80, + "isEnabled" : true, + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "aid" : "1234", + "agentSelectorConfig" : { + "agentSelectorType" : "all-agents", + "maxMachines" : 10 + }, + "hasPathTraceInSession" : true, + "testName" : "Test name" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.endpoint_instant_tests.models.EndpointAgentToServerTest.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-endpoint-instant-tests/test/test_http_server_instant_scheduled_test_api.py b/thousandeyes-sdk-endpoint-instant-tests/test/test_http_server_instant_scheduled_test_api.py new file mode 100644 index 00000000..7184683d --- /dev/null +++ b/thousandeyes-sdk-endpoint-instant-tests/test/test_http_server_instant_scheduled_test_api.py @@ -0,0 +1,157 @@ +# coding: utf-8 + +""" + Endpoint Instant Scheduled Tests API + + You can create and execute a new endpoint instant scheduled test within ThousandEyes using this API. The test parameters are specified in the `POST` data. The following applies to the Endpoint Instant Scheduled Tests API: * To initiate the creation and execution of an instant scheduled test, the user must possess the `Edit endpoint tests` permission. * Upon successful creation of an instant scheduled test, the API responds with an HTTP/201 CREATED status code and return the test definition. * It's important to note that the response does not include the results of the instant scheduled test. To retrieve test results, users can utilize the Endpoint Test Data endpoints. The URLs for these API test data endpoints are provided within the test definition output when an instant scheduled test is created. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.endpoint_instant_tests.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.endpoint_instant_tests.api.http_server_instant_scheduled_test_api import HttpServerInstantScheduledTestApi + + +class TestHttpServerInstantScheduledTestApi(unittest.TestCase): + """HttpServerInstantScheduledTestApi unit test stubs""" + + def setUp(self) -> None: + self.api = HttpServerInstantScheduledTestApi() + + def tearDown(self) -> None: + pass + + def test_create_http_server_scheduled_instant_test_models_validation(self) -> None: + """Test case for create_http_server_scheduled_instant_test request and response models""" + request_body_json = """ + { + "hasPing" : true, + "verifyCertificate" : false, + "agentSelectorType" : "all-agents", + "maxMachines" : 10, + "httpTimeLimit" : 5000, + "endpointAgentLabels" : [ "567", "214" ], + "url" : "www.example.com", + "tcpProbeMode" : "auto", + "agents" : [ "0a3b9998-dc3a-4ff2-b50d-ac4a7cd986e1", "66eec0f1-72b4-4755-aa83-3aed61d17f3c" ], + "protocol" : "icmp", + "password" : "password", + "port" : 80, + "hasTraceroute" : true, + "targetResponseTime" : 1000, + "authType" : "none", + "hasPathTraceInSession" : true, + "testName" : "Test name", + "username" : "username", + "sslVersionId" : "0" + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.endpoint_instant_tests.models.EndpointHttpServerInstantTest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "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" + } + }, + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "httpTimeLimit" : 5000, + "type" : "http-server", + "protocol" : "icmp", + "httpVersion" : 2, + "followRedirects" : true, + "contentRegex" : "(regex)+", + "authType" : "none", + "testName" : "Test name", + "verifyCertificate" : false, + "userAgent" : "curl", + "networkMeasurements" : true, + "tcpProbeMode" : "auto", + "url" : "www.example.com", + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "postBody" : "body", + "port" : 80, + "isEnabled" : true, + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "aid" : "1234", + "agentSelectorConfig" : { + "agentSelectorType" : "all-agents", + "maxMachines" : 10 + }, + "hasPathTraceInSession" : true, + "httpTargetTime" : 100, + "username" : "username", + "sslVersionId" : "0" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.endpoint_instant_tests.models.EndpointHttpServerTest.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-endpoint-instant-tests/test/test_run_existing_test_api.py b/thousandeyes-sdk-endpoint-instant-tests/test/test_run_existing_test_api.py new file mode 100644 index 00000000..22f7b74b --- /dev/null +++ b/thousandeyes-sdk-endpoint-instant-tests/test/test_run_existing_test_api.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Endpoint Instant Scheduled Tests API + + You can create and execute a new endpoint instant scheduled test within ThousandEyes using this API. The test parameters are specified in the `POST` data. The following applies to the Endpoint Instant Scheduled Tests API: * To initiate the creation and execution of an instant scheduled test, the user must possess the `Edit endpoint tests` permission. * Upon successful creation of an instant scheduled test, the API responds with an HTTP/201 CREATED status code and return the test definition. * It's important to note that the response does not include the results of the instant scheduled test. To retrieve test results, users can utilize the Endpoint Test Data endpoints. The URLs for these API test data endpoints are provided within the test definition output when an instant scheduled test is created. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.endpoint_instant_tests.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.endpoint_instant_tests.api.run_existing_test_api import RunExistingTestApi + + +class TestRunExistingTestApi(unittest.TestCase): + """RunExistingTestApi unit test stubs""" + + def setUp(self) -> None: + self.api = RunExistingTestApi() + + def tearDown(self) -> None: + pass + + def test_run_endpoint_scheduled_instant_test_models_validation(self) -> None: + """Test case for run_endpoint_scheduled_instant_test request and response models""" + + + +if __name__ == '__main__': + unittest.main() diff --git a/thousandeyes-sdk-endpoint-instant-tests/test/test_utils.py b/thousandeyes-sdk-endpoint-instant-tests/test/test_utils.py new file mode 100644 index 00000000..930528d9 --- /dev/null +++ b/thousandeyes-sdk-endpoint-instant-tests/test/test_utils.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +import json +import unittest + +from pydantic import BaseModel + + +def assert_constructed_model_matches_example_json(model: BaseModel, loaded_json: dict): + test_case = unittest.TestCase() + test_case.maxDiff = None + test_case.assertIsNotNone(model) + constructed_json = json.loads(model.to_json()) + sorted_loaded_json = json.dumps(loaded_json, sort_keys=True) + sorted_constructed_json = json.dumps(constructed_json, sort_keys=True) + test_case.assertEqual(sorted_loaded_json, sorted_constructed_json) diff --git a/thousandeyes-sdk-endpoint-labels/.openapi-generator/FILES b/thousandeyes-sdk-endpoint-labels/.openapi-generator/FILES index ff32ee83..d808aea3 100644 --- a/thousandeyes-sdk-endpoint-labels/.openapi-generator/FILES +++ b/thousandeyes-sdk-endpoint-labels/.openapi-generator/FILES @@ -41,19 +41,5 @@ src/thousandeyes_sdk/endpoint_labels/models/validation_error.py src/thousandeyes_sdk/endpoint_labels/models/validation_error_item.py src/thousandeyes_sdk/endpoint_labels/py.typed test/__init__.py -test/test_error.py -test/test_expand.py -test/test_filter.py -test/test_filter_type.py -test/test_label.py -test/test_label_filter_mode.py -test/test_label_request.py -test/test_label_response.py -test/test_labels.py -test/test_link.py -test/test_match_type.py -test/test_pagination_next_and_self_link.py -test/test_self_links.py -test/test_unauthorized_error.py -test/test_validation_error.py -test/test_validation_error_item.py +test/test_manage_labels_api.py +test/test_utils.py diff --git a/thousandeyes-sdk-endpoint-labels/README.md b/thousandeyes-sdk-endpoint-labels/README.md index 3851e6c9..86ddc3f4 100644 --- a/thousandeyes-sdk-endpoint-labels/README.md +++ b/thousandeyes-sdk-endpoint-labels/README.md @@ -4,8 +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.4 -- Package version: 1.0.0 +- API version: 7.0.6 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator @@ -19,9 +18,9 @@ Python 3.7+ If the python package is hosted on a repository, you can install directly using: ```sh -pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +pip install -e git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git#egg=thousandeyes-sdk-endpoint-labels\&subdirectory=thousandeyes-sdk-endpoint-labels ``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) +(you may need to run `pip` with root permission: `sudo pip install -e git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git#egg=thousandeyes-sdk-endpoint-labels\&subdirectory=thousandeyes-sdk-endpoint-labels`) Then import the package: ```python @@ -78,14 +77,16 @@ configuration = thousandeyes_sdk.client.Configuration( with thousandeyes_sdk.client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = thousandeyes_sdk.endpoint_labels.ManageLabelsApi(api_client) - id = 'id_example' # str | The unique identifier of the label to operate on. 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) + label_request = thousandeyes_sdk.endpoint_labels.LabelRequest() # LabelRequest | Label settings (optional) try: - # Delete label - api_instance.endpoint_label_delete(id, aid=aid) + # Create label + api_response = api_instance.create_endpoint_label(aid=aid, label_request=label_request) + print("The response of ManageLabelsApi->create_endpoint_label:\n") + pprint(api_response) except ApiException as e: - print("Exception when calling ManageLabelsApi->endpoint_label_delete: %s\n" % e) + print("Exception when calling ManageLabelsApi->create_endpoint_label: %s\n" % e) ``` @@ -95,11 +96,11 @@ All URIs are relative to *https://api.thousandeyes.com* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*ManageLabelsApi* | [**endpoint_label_delete**](docs/ManageLabelsApi.md#endpoint_label_delete) | **DELETE** /v7/endpoint/labels/{id} | Delete label -*ManageLabelsApi* | [**endpoint_label_get**](docs/ManageLabelsApi.md#endpoint_label_get) | **GET** /v7/endpoint/labels/{id} | Retrieve label -*ManageLabelsApi* | [**endpoint_label_update**](docs/ManageLabelsApi.md#endpoint_label_update) | **PATCH** /v7/endpoint/labels/{id} | Update label -*ManageLabelsApi* | [**endpoint_labels_list**](docs/ManageLabelsApi.md#endpoint_labels_list) | **GET** /v7/endpoint/labels | List labels -*ManageLabelsApi* | [**v7_endpoint_labels_post**](docs/ManageLabelsApi.md#v7_endpoint_labels_post) | **POST** /v7/endpoint/labels | Create label +*ManageLabelsApi* | [**create_endpoint_label**](docs/ManageLabelsApi.md#create_endpoint_label) | **POST** /v7/endpoint/labels | Create label +*ManageLabelsApi* | [**delete_endpoint_label**](docs/ManageLabelsApi.md#delete_endpoint_label) | **DELETE** /v7/endpoint/labels/{id} | Delete label +*ManageLabelsApi* | [**get_endpoint_label**](docs/ManageLabelsApi.md#get_endpoint_label) | **GET** /v7/endpoint/labels/{id} | Retrieve label +*ManageLabelsApi* | [**get_endpoint_labels**](docs/ManageLabelsApi.md#get_endpoint_labels) | **GET** /v7/endpoint/labels | List labels +*ManageLabelsApi* | [**update_endpoint_label**](docs/ManageLabelsApi.md#update_endpoint_label) | **PATCH** /v7/endpoint/labels/{id} | Update label ## Documentation For Models diff --git a/thousandeyes-sdk-endpoint-labels/docs/ManageLabelsApi.md b/thousandeyes-sdk-endpoint-labels/docs/ManageLabelsApi.md index 10ebee45..6262a29f 100644 --- a/thousandeyes-sdk-endpoint-labels/docs/ManageLabelsApi.md +++ b/thousandeyes-sdk-endpoint-labels/docs/ManageLabelsApi.md @@ -4,15 +4,100 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**endpoint_label_delete**](ManageLabelsApi.md#endpoint_label_delete) | **DELETE** /v7/endpoint/labels/{id} | Delete label -[**endpoint_label_get**](ManageLabelsApi.md#endpoint_label_get) | **GET** /v7/endpoint/labels/{id} | Retrieve label -[**endpoint_label_update**](ManageLabelsApi.md#endpoint_label_update) | **PATCH** /v7/endpoint/labels/{id} | Update label -[**endpoint_labels_list**](ManageLabelsApi.md#endpoint_labels_list) | **GET** /v7/endpoint/labels | List labels -[**v7_endpoint_labels_post**](ManageLabelsApi.md#v7_endpoint_labels_post) | **POST** /v7/endpoint/labels | Create label +[**create_endpoint_label**](ManageLabelsApi.md#create_endpoint_label) | **POST** /v7/endpoint/labels | Create label +[**delete_endpoint_label**](ManageLabelsApi.md#delete_endpoint_label) | **DELETE** /v7/endpoint/labels/{id} | Delete label +[**get_endpoint_label**](ManageLabelsApi.md#get_endpoint_label) | **GET** /v7/endpoint/labels/{id} | Retrieve label +[**get_endpoint_labels**](ManageLabelsApi.md#get_endpoint_labels) | **GET** /v7/endpoint/labels | List labels +[**update_endpoint_label**](ManageLabelsApi.md#update_endpoint_label) | **PATCH** /v7/endpoint/labels/{id} | Update label -# **endpoint_label_delete** -> endpoint_label_delete(id, aid=aid) +# **create_endpoint_label** +> LabelResponse create_endpoint_label(aid=aid, label_request=label_request) + +Create label + +Creates a new label. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.endpoint_labels +from thousandeyes_sdk.endpoint_labels.models.label_request import LabelRequest +from thousandeyes_sdk.endpoint_labels.models.label_response import LabelResponse +from thousandeyes_sdk.endpoint_labels.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.endpoint_labels.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.endpoint_labels.ManageLabelsApi(api_client) + 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) + label_request = thousandeyes_sdk.endpoint_labels.LabelRequest() # LabelRequest | Label settings (optional) + + try: + # Create label + api_response = api_instance.create_endpoint_label(aid=aid, label_request=label_request) + print("The response of ManageLabelsApi->create_endpoint_label:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ManageLabelsApi->create_endpoint_label: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **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] + **label_request** | [**LabelRequest**](LabelRequest.md)| Label settings | [optional] + +### Return type + +[**LabelResponse**](LabelResponse.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** | created | * Location -
| +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | +**429** | Exhausted rate limit for the organization | - | + +[[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_endpoint_label** +> delete_endpoint_label(id, aid=aid) Delete label @@ -52,9 +137,9 @@ with thousandeyes_sdk.endpoint_labels.ApiClient(configuration) as api_client: try: # Delete label - api_instance.endpoint_label_delete(id, aid=aid) + api_instance.delete_endpoint_label(id, aid=aid) except Exception as e: - print("Exception when calling ManageLabelsApi->endpoint_label_delete: %s\n" % e) + print("Exception when calling ManageLabelsApi->delete_endpoint_label: %s\n" % e) ``` @@ -78,7 +163,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/problem+json + - **Accept**: application/json, application/problem+json ### HTTP response details @@ -92,8 +177,8 @@ 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) -# **endpoint_label_get** -> LabelResponse endpoint_label_get(id, expand=expand, aid=aid) +# **get_endpoint_label** +> LabelResponse get_endpoint_label(id, expand=expand, aid=aid) Retrieve label @@ -136,11 +221,11 @@ with thousandeyes_sdk.endpoint_labels.ApiClient(configuration) as api_client: try: # Retrieve label - api_response = api_instance.endpoint_label_get(id, expand=expand, aid=aid) - print("The response of ManageLabelsApi->endpoint_label_get:\n") + api_response = api_instance.get_endpoint_label(id, expand=expand, aid=aid) + print("The response of ManageLabelsApi->get_endpoint_label:\n") pprint(api_response) except Exception as e: - print("Exception when calling ManageLabelsApi->endpoint_label_get: %s\n" % e) + print("Exception when calling ManageLabelsApi->get_endpoint_label: %s\n" % e) ``` @@ -165,7 +250,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -179,8 +264,96 @@ 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) -# **endpoint_label_update** -> LabelResponse endpoint_label_update(id, aid=aid, label=label) +# **get_endpoint_labels** +> Labels get_endpoint_labels(max=max, cursor=cursor, expand=expand, aid=aid) + +List labels + +Returns a list of labels. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.endpoint_labels +from thousandeyes_sdk.endpoint_labels.models.expand import Expand +from thousandeyes_sdk.endpoint_labels.models.labels import Labels +from thousandeyes_sdk.endpoint_labels.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.endpoint_labels.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.endpoint_labels.ManageLabelsApi(api_client) + max = 5 # int | (Optional) Maximum number of objects to return. (optional) + cursor = 'cursor_example' # str | (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. (optional) + expand = [thousandeyes_sdk.endpoint_labels.Expand()] # List[Expand] | This parameter is optional and determines whether to include additional details in the response. To specify multiple expansions, you can either separate the values with commas or specify the parameter multiple times. (optional) + 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: + # List labels + api_response = api_instance.get_endpoint_labels(max=max, cursor=cursor, expand=expand, aid=aid) + print("The response of ManageLabelsApi->get_endpoint_labels:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ManageLabelsApi->get_endpoint_labels: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **max** | **int**| (Optional) Maximum number of objects to return. | [optional] + **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. | [optional] + **expand** | [**List[Expand]**](Expand.md)| This parameter is optional and determines whether to include additional details in the response. To specify multiple expansions, you can either separate the values with commas or specify the parameter multiple times. | [optional] + **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 + +[**Labels**](Labels.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | +**429** | Exhausted rate limit for the organization | - | + +[[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_endpoint_label** +> LabelResponse update_endpoint_label(id, aid=aid, label=label) Update label @@ -223,11 +396,11 @@ with thousandeyes_sdk.endpoint_labels.ApiClient(configuration) as api_client: try: # Update label - api_response = api_instance.endpoint_label_update(id, aid=aid, label=label) - print("The response of ManageLabelsApi->endpoint_label_update:\n") + api_response = api_instance.update_endpoint_label(id, aid=aid, label=label) + print("The response of ManageLabelsApi->update_endpoint_label:\n") pprint(api_response) except Exception as e: - print("Exception when calling ManageLabelsApi->endpoint_label_update: %s\n" % e) + print("Exception when calling ManageLabelsApi->update_endpoint_label: %s\n" % e) ``` @@ -252,7 +425,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -267,176 +440,3 @@ 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) -# **endpoint_labels_list** -> Labels endpoint_labels_list(max=max, cursor=cursor, expand=expand, aid=aid) - -List labels - -Returns a list of labels. - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import thousandeyes_sdk.endpoint_labels -from thousandeyes_sdk.endpoint_labels.models.expand import Expand -from thousandeyes_sdk.endpoint_labels.models.labels import Labels -from thousandeyes_sdk.endpoint_labels.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.thousandeyes.com -# See configuration.py for a list of all supported configuration parameters. -configuration = thousandeyes_sdk.client.Configuration( - host = "https://api.thousandeyes.com" -) - -# 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.client.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with thousandeyes_sdk.endpoint_labels.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = thousandeyes_sdk.endpoint_labels.ManageLabelsApi(api_client) - max = 5 # float | (Optional) Maximum number of objects to return. (optional) - cursor = 'cursor_example' # str | (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. (optional) - expand = [thousandeyes_sdk.endpoint_labels.Expand()] # List[Expand] | This parameter is optional and determines whether to include additional details in the response. To specify multiple expansions, you can either separate the values with commas or specify the parameter multiple times. (optional) - 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: - # List labels - api_response = api_instance.endpoint_labels_list(max=max, cursor=cursor, expand=expand, aid=aid) - print("The response of ManageLabelsApi->endpoint_labels_list:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ManageLabelsApi->endpoint_labels_list: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **max** | **float**| (Optional) Maximum number of objects to return. | [optional] - **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. | [optional] - **expand** | [**List[Expand]**](Expand.md)| This parameter is optional and determines whether to include additional details in the response. To specify multiple expansions, you can either separate the values with commas or specify the parameter multiple times. | [optional] - **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 - -[**Labels**](Labels.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**401** | Unauthorized | - | -**403** | Insufficient permissions to query endpoint | - | -**429** | Exhausted rate limit for the organization | - | - -[[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) - -# **v7_endpoint_labels_post** -> LabelResponse v7_endpoint_labels_post(aid=aid, label_request=label_request) - -Create label - -Creates a new label. - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import thousandeyes_sdk.endpoint_labels -from thousandeyes_sdk.endpoint_labels.models.label_request import LabelRequest -from thousandeyes_sdk.endpoint_labels.models.label_response import LabelResponse -from thousandeyes_sdk.endpoint_labels.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.thousandeyes.com -# See configuration.py for a list of all supported configuration parameters. -configuration = thousandeyes_sdk.client.Configuration( - host = "https://api.thousandeyes.com" -) - -# 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.client.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with thousandeyes_sdk.endpoint_labels.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = thousandeyes_sdk.endpoint_labels.ManageLabelsApi(api_client) - 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) - label_request = thousandeyes_sdk.endpoint_labels.LabelRequest() # LabelRequest | Label settings (optional) - - try: - # Create label - api_response = api_instance.v7_endpoint_labels_post(aid=aid, label_request=label_request) - print("The response of ManageLabelsApi->v7_endpoint_labels_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ManageLabelsApi->v7_endpoint_labels_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **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] - **label_request** | [**LabelRequest**](LabelRequest.md)| Label settings | [optional] - -### Return type - -[**LabelResponse**](LabelResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | created | * Location -
| -**400** | Bad Request | - | -**401** | Unauthorized | - | -**403** | Insufficient permissions to query endpoint | - | -**429** | Exhausted rate limit for the organization | - | - -[[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-endpoint-labels/docs/ValidationErrorItem.md b/thousandeyes-sdk-endpoint-labels/docs/ValidationErrorItem.md index c54d8dd7..cb5640f2 100644 --- a/thousandeyes-sdk-endpoint-labels/docs/ValidationErrorItem.md +++ b/thousandeyes-sdk-endpoint-labels/docs/ValidationErrorItem.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **code** | **str** | (Optional) A unique error type/code that can be referenced in the documentation for further details. | [optional] -**var_field** | **int** | Identifies the field that triggered this particular error. | [optional] +**var_field** | **str** | Identifies the field that triggered this particular error. | [optional] **message** | **str** | A short, human-readable summary of the error. | [optional] ## Example diff --git a/thousandeyes-sdk-endpoint-labels/pyproject.toml b/thousandeyes-sdk-endpoint-labels/pyproject.toml index bf2065cb..449b3ed4 100644 --- a/thousandeyes-sdk-endpoint-labels/pyproject.toml +++ b/thousandeyes-sdk-endpoint-labels/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "thousandeyes-sdk-endpoint-labels" -version = "1.0.0" +dynamic = ["version"] authors = [ { name = "ThousandEyes API Team", email = "api-team@thousandeyes.com" } ] @@ -11,9 +11,12 @@ dependencies = [ "python-dateutil >=2.8.2", "pydantic >=2", "typing-extensions >=4.7.1", - "thousandeyes-sdk-client==1.0.0", + "thousandeyes-sdk-core", ] +[tool.setuptools.dynamic] +version = {attr = "thousandeyes_sdk.client.__version__"} + [project.optional-dependencies] test = [ "pytest~=7.1.3", diff --git a/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/__init__.py b/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/__init__.py index fbbd6801..7a0809c9 100644 --- a/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/__init__.py +++ b/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/__init__.py @@ -7,15 +7,13 @@ Manage labels applied to endpoint agents using this API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 -__version__ = "1.0.0" - # import apis into sdk package from thousandeyes_sdk.endpoint_labels.api.manage_labels_api import ManageLabelsApi diff --git a/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/api/manage_labels_api.py b/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/api/manage_labels_api.py index c28ab823..740e8659 100644 --- a/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/api/manage_labels_api.py +++ b/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/api/manage_labels_api.py @@ -5,7 +5,7 @@ Manage labels applied to endpoint agents using this API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,8 +18,8 @@ from typing_extensions import Annotated import thousandeyes_sdk.endpoint_labels.models -from pydantic import Field, StrictFloat, StrictInt, StrictStr -from typing import List, Optional, Union +from pydantic import Field, StrictInt, StrictStr +from typing import List, Optional from typing_extensions import Annotated from thousandeyes_sdk.endpoint_labels.models.expand import Expand from thousandeyes_sdk.endpoint_labels.models.label import Label @@ -30,6 +30,7 @@ from thousandeyes_sdk.endpoint_labels.models.labels import Labels from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class ManageLabelsApi: @@ -42,11 +43,316 @@ class ManageLabelsApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @validate_call - def endpoint_label_delete( + def create_endpoint_label( + 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, + label_request: Annotated[Optional[LabelRequest], Field(description="Label settings")] = 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, + ) -> LabelResponse: + """Create label + + Creates a new label. + + :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 label_request: Label settings + :type label_request: LabelRequest + :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._create_endpoint_label_serialize( + aid=aid, + label_request=label_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "LabelResponse", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '429': "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.endpoint_labels.models, + ).data + + + @validate_call + def create_endpoint_label_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, + label_request: Annotated[Optional[LabelRequest], Field(description="Label settings")] = 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[LabelResponse]: + """Create label + + Creates a new label. + + :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 label_request: Label settings + :type label_request: LabelRequest + :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._create_endpoint_label_serialize( + aid=aid, + label_request=label_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "LabelResponse", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '429': "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.endpoint_labels.models, + ) + + + @validate_call + def create_endpoint_label_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, + label_request: Annotated[Optional[LabelRequest], Field(description="Label settings")] = 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: + """Create label + + Creates a new label. + + :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 label_request: Label settings + :type label_request: LabelRequest + :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._create_endpoint_label_serialize( + aid=aid, + label_request=label_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "LabelResponse", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '429': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_endpoint_label_serialize( + self, + aid, + label_request, + _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 + if label_request is not None: + _body_params = label_request + + + # 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] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v7/endpoint/labels', + 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 delete_endpoint_label( self, id: Annotated[StrictStr, Field(description="The unique identifier of the label to operate on.")], 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, @@ -93,7 +399,7 @@ class ManageLabelsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._endpoint_label_delete_serialize( + _param = self._delete_endpoint_label_serialize( id=id, aid=aid, _request_auth=_request_auth, @@ -122,7 +428,7 @@ class ManageLabelsApi: @validate_call - def endpoint_label_delete_with_http_info( + def delete_endpoint_label_with_http_info( self, id: Annotated[StrictStr, Field(description="The unique identifier of the label to operate on.")], 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, @@ -169,7 +475,7 @@ class ManageLabelsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._endpoint_label_delete_serialize( + _param = self._delete_endpoint_label_serialize( id=id, aid=aid, _request_auth=_request_auth, @@ -198,7 +504,7 @@ class ManageLabelsApi: @validate_call - def endpoint_label_delete_without_preload_content( + def delete_endpoint_label_without_preload_content( self, id: Annotated[StrictStr, Field(description="The unique identifier of the label to operate on.")], 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, @@ -245,7 +551,7 @@ class ManageLabelsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._endpoint_label_delete_serialize( + _param = self._delete_endpoint_label_serialize( id=id, aid=aid, _request_auth=_request_auth, @@ -268,7 +574,7 @@ class ManageLabelsApi: return response_data.response - def _endpoint_label_delete_serialize( + def _delete_endpoint_label_serialize( self, id, aid, @@ -306,6 +612,7 @@ class ManageLabelsApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ + 'application/json', 'application/problem+json' ] ) @@ -335,7 +642,7 @@ class ManageLabelsApi: @validate_call - def endpoint_label_get( + def get_endpoint_label( self, id: Annotated[StrictStr, Field(description="The unique identifier of the label to operate on.")], expand: Annotated[Optional[List[Expand]], Field(description="This parameter is optional and determines whether to include additional details in the response. To specify multiple expansions, you can either separate the values with commas or specify the parameter multiple times.")] = None, @@ -385,7 +692,7 @@ class ManageLabelsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._endpoint_label_get_serialize( + _param = self._get_endpoint_label_serialize( id=id, expand=expand, aid=aid, @@ -415,7 +722,7 @@ class ManageLabelsApi: @validate_call - def endpoint_label_get_with_http_info( + def get_endpoint_label_with_http_info( self, id: Annotated[StrictStr, Field(description="The unique identifier of the label to operate on.")], expand: Annotated[Optional[List[Expand]], Field(description="This parameter is optional and determines whether to include additional details in the response. To specify multiple expansions, you can either separate the values with commas or specify the parameter multiple times.")] = None, @@ -465,7 +772,7 @@ class ManageLabelsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._endpoint_label_get_serialize( + _param = self._get_endpoint_label_serialize( id=id, expand=expand, aid=aid, @@ -495,7 +802,7 @@ class ManageLabelsApi: @validate_call - def endpoint_label_get_without_preload_content( + def get_endpoint_label_without_preload_content( self, id: Annotated[StrictStr, Field(description="The unique identifier of the label to operate on.")], expand: Annotated[Optional[List[Expand]], Field(description="This parameter is optional and determines whether to include additional details in the response. To specify multiple expansions, you can either separate the values with commas or specify the parameter multiple times.")] = None, @@ -545,7 +852,7 @@ class ManageLabelsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._endpoint_label_get_serialize( + _param = self._get_endpoint_label_serialize( id=id, expand=expand, aid=aid, @@ -569,7 +876,7 @@ class ManageLabelsApi: return response_data.response - def _endpoint_label_get_serialize( + def _get_endpoint_label_serialize( self, id, expand, @@ -614,6 +921,7 @@ class ManageLabelsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -643,330 +951,9 @@ class ManageLabelsApi: @validate_call - def endpoint_label_update( + def get_endpoint_labels( self, - id: Annotated[StrictStr, Field(description="The unique identifier of the label to operate on.")], - 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, - label: Annotated[Optional[Label], Field(description="Fields to change on the agent")] = 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, - ) -> LabelResponse: - """Update label - - Updates a label using its ID. - - :param id: The unique identifier of the label to operate on. (required) - :type 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 label: Fields to change on the agent - :type label: Label - :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._endpoint_label_update_serialize( - id=id, - aid=aid, - label=label, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "LabelResponse", - '400': "ValidationError", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "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.endpoint_labels.models, - ).data - - - @validate_call - def endpoint_label_update_with_http_info( - self, - id: Annotated[StrictStr, Field(description="The unique identifier of the label to operate on.")], - 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, - label: Annotated[Optional[Label], Field(description="Fields to change on the agent")] = 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[LabelResponse]: - """Update label - - Updates a label using its ID. - - :param id: The unique identifier of the label to operate on. (required) - :type 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 label: Fields to change on the agent - :type label: Label - :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._endpoint_label_update_serialize( - id=id, - aid=aid, - label=label, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "LabelResponse", - '400': "ValidationError", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "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.endpoint_labels.models, - ) - - - @validate_call - def endpoint_label_update_without_preload_content( - self, - id: Annotated[StrictStr, Field(description="The unique identifier of the label to operate on.")], - 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, - label: Annotated[Optional[Label], Field(description="Fields to change on the agent")] = 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: - """Update label - - Updates a label using its ID. - - :param id: The unique identifier of the label to operate on. (required) - :type 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 label: Fields to change on the agent - :type label: Label - :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._endpoint_label_update_serialize( - id=id, - aid=aid, - label=label, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "LabelResponse", - '400': "ValidationError", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _endpoint_label_update_serialize( - self, - id, - aid, - label, - _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 id is not None: - _path_params['id'] = id - # 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 - if label is not None: - _body_params = label - - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/hal+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] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='PATCH', - resource_path='/v7/endpoint/labels/{id}', - 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 endpoint_labels_list( - self, - max: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="(Optional) Maximum number of objects to return.")] = None, + max: Annotated[Optional[StrictInt], Field(description="(Optional) Maximum number of objects to return.")] = None, cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, expand: Annotated[Optional[List[Expand]], Field(description="This parameter is optional and determines whether to include additional details in the response. To specify multiple expansions, you can either separate the values with commas or specify the parameter multiple times.")] = None, 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, @@ -988,7 +975,7 @@ class ManageLabelsApi: Returns a list of labels. :param max: (Optional) Maximum number of objects to return. - :type max: float + :type max: int :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. :type cursor: str :param expand: This parameter is optional and determines whether to include additional details in the response. To specify multiple expansions, you can either separate the values with commas or specify the parameter multiple times. @@ -1017,7 +1004,7 @@ class ManageLabelsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._endpoint_labels_list_serialize( + _param = self._get_endpoint_labels_serialize( max=max, cursor=cursor, expand=expand, @@ -1047,9 +1034,9 @@ class ManageLabelsApi: @validate_call - def endpoint_labels_list_with_http_info( + def get_endpoint_labels_with_http_info( self, - max: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="(Optional) Maximum number of objects to return.")] = None, + max: Annotated[Optional[StrictInt], Field(description="(Optional) Maximum number of objects to return.")] = None, cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, expand: Annotated[Optional[List[Expand]], Field(description="This parameter is optional and determines whether to include additional details in the response. To specify multiple expansions, you can either separate the values with commas or specify the parameter multiple times.")] = None, 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, @@ -1071,7 +1058,7 @@ class ManageLabelsApi: Returns a list of labels. :param max: (Optional) Maximum number of objects to return. - :type max: float + :type max: int :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. :type cursor: str :param expand: This parameter is optional and determines whether to include additional details in the response. To specify multiple expansions, you can either separate the values with commas or specify the parameter multiple times. @@ -1100,7 +1087,7 @@ class ManageLabelsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._endpoint_labels_list_serialize( + _param = self._get_endpoint_labels_serialize( max=max, cursor=cursor, expand=expand, @@ -1130,9 +1117,9 @@ class ManageLabelsApi: @validate_call - def endpoint_labels_list_without_preload_content( + def get_endpoint_labels_without_preload_content( self, - max: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="(Optional) Maximum number of objects to return.")] = None, + max: Annotated[Optional[StrictInt], Field(description="(Optional) Maximum number of objects to return.")] = None, cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, expand: Annotated[Optional[List[Expand]], Field(description="This parameter is optional and determines whether to include additional details in the response. To specify multiple expansions, you can either separate the values with commas or specify the parameter multiple times.")] = None, 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, @@ -1154,7 +1141,7 @@ class ManageLabelsApi: Returns a list of labels. :param max: (Optional) Maximum number of objects to return. - :type max: float + :type max: int :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. :type cursor: str :param expand: This parameter is optional and determines whether to include additional details in the response. To specify multiple expansions, you can either separate the values with commas or specify the parameter multiple times. @@ -1183,7 +1170,7 @@ class ManageLabelsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._endpoint_labels_list_serialize( + _param = self._get_endpoint_labels_serialize( max=max, cursor=cursor, expand=expand, @@ -1207,7 +1194,7 @@ class ManageLabelsApi: return response_data.response - def _endpoint_labels_list_serialize( + def _get_endpoint_labels_serialize( self, max, cursor, @@ -1259,6 +1246,7 @@ class ManageLabelsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1288,10 +1276,11 @@ class ManageLabelsApi: @validate_call - def v7_endpoint_labels_post( + def update_endpoint_label( self, + id: Annotated[StrictStr, Field(description="The unique identifier of the label to operate on.")], 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, - label_request: Annotated[Optional[LabelRequest], Field(description="Label settings")] = None, + label: Annotated[Optional[Label], Field(description="Fields to change on the agent")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1305,14 +1294,16 @@ class ManageLabelsApi: _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> LabelResponse: - """Create label + """Update label - Creates a new label. + Updates a label using its ID. + :param id: The unique identifier of the label to operate on. (required) + :type 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 label_request: Label settings - :type label_request: LabelRequest + :param label: Fields to change on the agent + :type label: Label :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 @@ -1335,9 +1326,10 @@ class ManageLabelsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._v7_endpoint_labels_post_serialize( + _param = self._update_endpoint_label_serialize( + id=id, aid=aid, - label_request=label_request, + label=label, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1345,10 +1337,11 @@ class ManageLabelsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '201': "LabelResponse", + '200': "LabelResponse", '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", + '404': "Error", '429': "Error", } response_data = self.api_client.call_api( @@ -1364,10 +1357,11 @@ class ManageLabelsApi: @validate_call - def v7_endpoint_labels_post_with_http_info( + def update_endpoint_label_with_http_info( self, + id: Annotated[StrictStr, Field(description="The unique identifier of the label to operate on.")], 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, - label_request: Annotated[Optional[LabelRequest], Field(description="Label settings")] = None, + label: Annotated[Optional[Label], Field(description="Fields to change on the agent")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1381,14 +1375,16 @@ class ManageLabelsApi: _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[LabelResponse]: - """Create label + """Update label - Creates a new label. + Updates a label using its ID. + :param id: The unique identifier of the label to operate on. (required) + :type 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 label_request: Label settings - :type label_request: LabelRequest + :param label: Fields to change on the agent + :type label: Label :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 @@ -1411,9 +1407,10 @@ class ManageLabelsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._v7_endpoint_labels_post_serialize( + _param = self._update_endpoint_label_serialize( + id=id, aid=aid, - label_request=label_request, + label=label, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1421,10 +1418,11 @@ class ManageLabelsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '201': "LabelResponse", + '200': "LabelResponse", '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", + '404': "Error", '429': "Error", } response_data = self.api_client.call_api( @@ -1440,10 +1438,11 @@ class ManageLabelsApi: @validate_call - def v7_endpoint_labels_post_without_preload_content( + def update_endpoint_label_without_preload_content( self, + id: Annotated[StrictStr, Field(description="The unique identifier of the label to operate on.")], 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, - label_request: Annotated[Optional[LabelRequest], Field(description="Label settings")] = None, + label: Annotated[Optional[Label], Field(description="Fields to change on the agent")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1457,14 +1456,16 @@ class ManageLabelsApi: _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create label + """Update label - Creates a new label. + Updates a label using its ID. + :param id: The unique identifier of the label to operate on. (required) + :type 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 label_request: Label settings - :type label_request: LabelRequest + :param label: Fields to change on the agent + :type label: Label :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 @@ -1487,9 +1488,10 @@ class ManageLabelsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._v7_endpoint_labels_post_serialize( + _param = self._update_endpoint_label_serialize( + id=id, aid=aid, - label_request=label_request, + label=label, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1497,10 +1499,11 @@ class ManageLabelsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '201': "LabelResponse", + '200': "LabelResponse", '400': "ValidationError", '401': "UnauthorizedError", '403': "Error", + '404': "Error", '429': "Error", } response_data = self.api_client.call_api( @@ -1510,10 +1513,11 @@ class ManageLabelsApi: return response_data.response - def _v7_endpoint_labels_post_serialize( + def _update_endpoint_label_serialize( self, + id, aid, - label_request, + label, _request_auth, _content_type, _headers, @@ -1533,6 +1537,8 @@ class ManageLabelsApi: _body_params: Optional[bytes] = None # process the path parameters + if id is not None: + _path_params['id'] = id # process the query parameters if aid is not None: @@ -1541,14 +1547,15 @@ class ManageLabelsApi: # process the header parameters # process the form parameters # process the body parameter - if label_request is not None: - _body_params = label_request + if label is not None: + _body_params = label # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1573,8 +1580,8 @@ class ManageLabelsApi: ] return self.api_client.param_serialize( - method='POST', - resource_path='/v7/endpoint/labels', + method='PATCH', + resource_path='/v7/endpoint/labels/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/__init__.py b/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/__init__.py index 2324046f..242fa82b 100644 --- a/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/__init__.py +++ b/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/__init__.py @@ -6,7 +6,7 @@ Manage labels applied to endpoint agents using this API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/error.py b/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/error.py index 576719b0..58d90113 100644 --- a/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/error.py +++ b/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/error.py @@ -5,7 +5,7 @@ Manage labels applied to endpoint agents using this API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -37,6 +37,7 @@ class Error(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -47,7 +48,7 @@ class Error(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/expand.py b/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/expand.py index ae9b5274..42edc229 100644 --- a/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/expand.py +++ b/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/expand.py @@ -5,7 +5,7 @@ Manage labels applied to endpoint agents using this API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/filter.py b/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/filter.py index 0d1e146a..a31de754 100644 --- a/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/filter.py +++ b/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/filter.py @@ -5,7 +5,7 @@ Manage labels applied to endpoint agents using this API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -37,6 +37,7 @@ class Filter(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -47,7 +48,7 @@ class Filter(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/filter_type.py b/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/filter_type.py index 132f79a2..0368b4ad 100644 --- a/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/filter_type.py +++ b/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/filter_type.py @@ -5,7 +5,7 @@ Manage labels applied to endpoint agents using this API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/label.py b/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/label.py index d1cfa425..1a7da35c 100644 --- a/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/label.py +++ b/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/label.py @@ -5,7 +5,7 @@ Manage labels applied to endpoint agents using this API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -39,6 +39,7 @@ class Label(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -49,7 +50,7 @@ class Label(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/label_filter_mode.py b/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/label_filter_mode.py index dffaf21c..91fa9aa0 100644 --- a/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/label_filter_mode.py +++ b/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/label_filter_mode.py @@ -5,7 +5,7 @@ Manage labels applied to endpoint agents using this API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/label_request.py b/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/label_request.py index e1ba6b70..ac5ff234 100644 --- a/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/label_request.py +++ b/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/label_request.py @@ -5,7 +5,7 @@ Manage labels applied to endpoint agents using this API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -39,6 +39,7 @@ class LabelRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -49,7 +50,7 @@ class LabelRequest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/label_response.py b/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/label_response.py index dfd3fb29..0d73cc61 100644 --- a/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/label_response.py +++ b/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/label_response.py @@ -5,7 +5,7 @@ Manage labels applied to endpoint agents using this API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -41,6 +41,7 @@ class LabelResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -51,7 +52,7 @@ class LabelResponse(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/labels.py b/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/labels.py index 3508f3bd..285aea7c 100644 --- a/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/labels.py +++ b/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/labels.py @@ -5,7 +5,7 @@ Manage labels applied to endpoint agents using this API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class Labels(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class Labels(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/link.py b/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/link.py index a3b6a108..72538382 100644 --- a/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/link.py +++ b/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/link.py @@ -5,7 +5,7 @@ Manage labels applied to endpoint agents using this API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -40,6 +40,7 @@ class Link(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -50,7 +51,7 @@ class Link(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/match_type.py b/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/match_type.py index 6c29a28b..55b503cb 100644 --- a/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/match_type.py +++ b/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/match_type.py @@ -5,7 +5,7 @@ Manage labels applied to endpoint agents using this API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/pagination_next_and_self_link.py b/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/pagination_next_and_self_link.py index 8a280eb8..fcd007f0 100644 --- a/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/pagination_next_and_self_link.py +++ b/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/pagination_next_and_self_link.py @@ -5,7 +5,7 @@ Manage labels applied to endpoint agents using this API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class PaginationNextAndSelfLink(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class PaginationNextAndSelfLink(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/self_links.py b/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/self_links.py index 2f925340..50199b3c 100644 --- a/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/self_links.py +++ b/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/self_links.py @@ -5,7 +5,7 @@ Manage labels applied to endpoint agents using this API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class SelfLinks(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class SelfLinks(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/unauthorized_error.py b/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/unauthorized_error.py index d6754e56..1be909b2 100644 --- a/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/unauthorized_error.py +++ b/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/unauthorized_error.py @@ -5,7 +5,7 @@ Manage labels applied to endpoint agents using this API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class UnauthorizedError(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class UnauthorizedError(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/validation_error.py b/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/validation_error.py index 92e5f74c..c4c57cdc 100644 --- a/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/validation_error.py +++ b/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/validation_error.py @@ -5,7 +5,7 @@ Manage labels applied to endpoint agents using this API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -39,6 +39,7 @@ class ValidationError(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -49,7 +50,7 @@ class ValidationError(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/validation_error_item.py b/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/validation_error_item.py index a82b4539..8ab8b1ce 100644 --- a/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/validation_error_item.py +++ b/thousandeyes-sdk-endpoint-labels/src/thousandeyes_sdk/endpoint_labels/models/validation_error_item.py @@ -5,7 +5,7 @@ Manage labels applied to endpoint agents using this API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,7 +17,7 @@ import pprint import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +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 @@ -27,7 +27,7 @@ class ValidationErrorItem(BaseModel): ValidationErrorItem """ # noqa: E501 code: Optional[StrictStr] = Field(default=None, description="(Optional) A unique error type/code that can be referenced in the documentation for further details.") - var_field: Optional[StrictInt] = Field(default=None, description="Identifies the field that triggered this particular error.", alias="field") + var_field: Optional[StrictStr] = Field(default=None, description="Identifies the field that triggered this particular error.", alias="field") message: Optional[StrictStr] = Field(default=None, description="A short, human-readable summary of the error.") __properties: ClassVar[List[str]] = ["code", "field", "message"] @@ -35,6 +35,7 @@ class ValidationErrorItem(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class ValidationErrorItem(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-labels/test/test_manage_labels_api.py b/thousandeyes-sdk-endpoint-labels/test/test_manage_labels_api.py new file mode 100644 index 00000000..33c3e472 --- /dev/null +++ b/thousandeyes-sdk-endpoint-labels/test/test_manage_labels_api.py @@ -0,0 +1,272 @@ +# coding: utf-8 + +""" + Endpoint Agent Labels API + + Manage labels applied to endpoint agents using this API. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.endpoint_labels.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.endpoint_labels.api.manage_labels_api import ManageLabelsApi + + +class TestManageLabelsApi(unittest.TestCase): + """ManageLabelsApi unit test stubs""" + + def setUp(self) -> None: + self.api = ManageLabelsApi() + + def tearDown(self) -> None: + pass + + def test_create_endpoint_label_models_validation(self) -> None: + """Test case for create_endpoint_label request and response models""" + request_body_json = """ + { + "color" : "#ff3333", + "matchType" : "and", + "name" : "Head office meeting rooms", + "id" : "abc-123-def", + "filters" : [ { + "mode" : "in", + "values" : [ "10.1.1.0/24", "192.168.1.0/24" ], + "key" : "vpn-client-network" + }, { + "mode" : "in", + "values" : [ "10.1.1.0/24", "192.168.1.0/24" ], + "key" : "vpn-client-network" + } ] + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.endpoint_labels.models.LabelRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "color" : "#ff3333", + "_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", + "name" : "Head office meeting rooms", + "id" : "abc-123-def", + "filters" : [ { + "mode" : "in", + "values" : [ "10.1.1.0/24", "192.168.1.0/24" ], + "key" : "vpn-client-network" + }, { + "mode" : "in", + "values" : [ "10.1.1.0/24", "192.168.1.0/24" ], + "key" : "vpn-client-network" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.endpoint_labels.models.LabelResponse.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_delete_endpoint_label_models_validation(self) -> None: + """Test case for delete_endpoint_label request and response models""" + + + def test_get_endpoint_label_models_validation(self) -> None: + """Test case for get_endpoint_label request and response models""" + + response_body_json = """ + { + "color" : "#ff3333", + "_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", + "name" : "Head office meeting rooms", + "id" : "abc-123-def", + "filters" : [ { + "mode" : "in", + "values" : [ "10.1.1.0/24", "192.168.1.0/24" ], + "key" : "vpn-client-network" + }, { + "mode" : "in", + "values" : [ "10.1.1.0/24", "192.168.1.0/24" ], + "key" : "vpn-client-network" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.endpoint_labels.models.LabelResponse.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_endpoint_labels_models_validation(self) -> None: + """Test case for get_endpoint_labels request and response models""" + + response_body_json = """ + { + "_links" : { + "next" : { + "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" + } + }, + "labels" : [ { + "color" : "#ff3333", + "_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", + "name" : "Head office meeting rooms", + "id" : "abc-123-def", + "filters" : [ { + "mode" : "in", + "values" : [ "10.1.1.0/24", "192.168.1.0/24" ], + "key" : "vpn-client-network" + }, { + "mode" : "in", + "values" : [ "10.1.1.0/24", "192.168.1.0/24" ], + "key" : "vpn-client-network" + } ] + }, { + "color" : "#ff3333", + "_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", + "name" : "Head office meeting rooms", + "id" : "abc-123-def", + "filters" : [ { + "mode" : "in", + "values" : [ "10.1.1.0/24", "192.168.1.0/24" ], + "key" : "vpn-client-network" + }, { + "mode" : "in", + "values" : [ "10.1.1.0/24", "192.168.1.0/24" ], + "key" : "vpn-client-network" + } ] + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.endpoint_labels.models.Labels.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_update_endpoint_label_models_validation(self) -> None: + """Test case for update_endpoint_label request and response models""" + request_body_json = """ + { + "color" : "#ff3333", + "matchType" : "and", + "name" : "Head office meeting rooms", + "id" : "abc-123-def", + "filters" : [ { + "mode" : "in", + "values" : [ "10.1.1.0/24", "192.168.1.0/24" ], + "key" : "vpn-client-network" + }, { + "mode" : "in", + "values" : [ "10.1.1.0/24", "192.168.1.0/24" ], + "key" : "vpn-client-network" + } ] + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.endpoint_labels.models.Label.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "color" : "#ff3333", + "_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", + "name" : "Head office meeting rooms", + "id" : "abc-123-def", + "filters" : [ { + "mode" : "in", + "values" : [ "10.1.1.0/24", "192.168.1.0/24" ], + "key" : "vpn-client-network" + }, { + "mode" : "in", + "values" : [ "10.1.1.0/24", "192.168.1.0/24" ], + "key" : "vpn-client-network" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.endpoint_labels.models.LabelResponse.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-endpoint-labels/test/test_utils.py b/thousandeyes-sdk-endpoint-labels/test/test_utils.py new file mode 100644 index 00000000..930528d9 --- /dev/null +++ b/thousandeyes-sdk-endpoint-labels/test/test_utils.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +import json +import unittest + +from pydantic import BaseModel + + +def assert_constructed_model_matches_example_json(model: BaseModel, loaded_json: dict): + test_case = unittest.TestCase() + test_case.maxDiff = None + test_case.assertIsNotNone(model) + constructed_json = json.loads(model.to_json()) + sorted_loaded_json = json.dumps(loaded_json, sort_keys=True) + sorted_constructed_json = json.dumps(constructed_json, sort_keys=True) + test_case.assertEqual(sorted_loaded_json, sorted_constructed_json) diff --git a/thousandeyes-sdk-endpoint-test-results/.openapi-generator/FILES b/thousandeyes-sdk-endpoint-test-results/.openapi-generator/FILES index 41e85558..100c9baa 100644 --- a/thousandeyes-sdk-endpoint-test-results/.openapi-generator/FILES +++ b/thousandeyes-sdk-endpoint-test-results/.openapi-generator/FILES @@ -128,6 +128,7 @@ docs/ThresholdFilterOperator.md docs/Traceroute.md docs/TracerouteHop.md docs/Trigger.md +docs/UdpProbeModeResponse.md docs/UnauthorizedError.md docs/ValidationError.md docs/ValidationErrorItem.md @@ -270,6 +271,7 @@ src/thousandeyes_sdk/endpoint_test_results/models/threshold_filter_operator.py src/thousandeyes_sdk/endpoint_test_results/models/traceroute.py src/thousandeyes_sdk/endpoint_test_results/models/traceroute_hop.py src/thousandeyes_sdk/endpoint_test_results/models/trigger.py +src/thousandeyes_sdk/endpoint_test_results/models/udp_probe_mode_response.py src/thousandeyes_sdk/endpoint_test_results/models/unauthorized_error.py src/thousandeyes_sdk/endpoint_test_results/models/validation_error.py src/thousandeyes_sdk/endpoint_test_results/models/validation_error_item.py @@ -279,134 +281,9 @@ src/thousandeyes_sdk/endpoint_test_results/models/vpn_traceroute.py src/thousandeyes_sdk/endpoint_test_results/models/vpn_type.py src/thousandeyes_sdk/endpoint_test_results/py.typed test/__init__.py -test/test_alert_direction.py -test/test_alert_rounds_violation_mode.py -test/test_alert_rule.py -test/test_alert_type.py -test/test_application_score_quality.py -test/test_asn_details.py -test/test_conditional_operator.py -test/test_cpu_utilization.py -test/test_dynamic_base_test_result.py -test/test_dynamic_test.py -test/test_dynamic_test_links.py -test/test_dynamic_test_self_link.py -test/test_dynamic_test_webex.py -test/test_dynamic_tests_data_round_search.py -test/test_dynamic_tests_data_search_filter.py -test/test_endpoint_agent_labels_selector_config.py -test/test_endpoint_agent_selector_config.py -test/test_endpoint_agent_to_server_test.py -test/test_endpoint_all_agents_selector_config.py -test/test_endpoint_browser.py -test/test_endpoint_http_data_point_score.py -test/test_endpoint_http_server_base_test.py -test/test_endpoint_http_server_test.py -test/test_endpoint_network_topology_result_request.py -test/test_endpoint_network_topology_result_request_filter.py -test/test_endpoint_ping_data_point_score.py -test/test_endpoint_real_user_test.py -test/test_endpoint_real_user_test_base.py -test/test_endpoint_real_user_test_detail.py -test/test_endpoint_real_user_test_detail_results.py -test/test_endpoint_real_user_test_result_request_filter.py -test/test_endpoint_real_user_test_results.py -test/test_endpoint_real_user_test_results_request.py -test/test_endpoint_result_request_filter.py -test/test_endpoint_scheduled_test.py -test/test_endpoint_scheduled_test_type.py -test/test_endpoint_specific_agents_selector_config.py -test/test_endpoint_test.py -test/test_endpoint_test_auth_type.py -test/test_endpoint_test_links.py -test/test_endpoint_test_protocol.py -test/test_endpoint_test_self_link.py -test/test_error.py -test/test_ethernet_profile.py -test/test_expand.py -test/test_gateway_network_ping.py -test/test_hop.py -test/test_http_error_type.py -test/test_http_test_result.py -test/test_http_test_result_headers.py -test/test_http_test_results.py -test/test_interface_hardware_type.py -test/test_link.py -test/test_local_network_result.py -test/test_local_network_results.py -test/test_local_network_topology_detail_results.py -test/test_local_network_topology_result.py -test/test_local_network_topology_result_base.py -test/test_local_network_topology_results.py -test/test_multi_test_id_network_test_results.py -test/test_multi_test_id_tests_data_rounds_search.py -test/test_multi_test_id_tests_data_search_filter.py -test/test_network_dynamic_test_result.py -test/test_network_dynamic_test_results.py -test/test_network_interface.py -test/test_network_metrics.py -test/test_network_ping.py -test/test_network_profile.py -test/test_network_proxy.py -test/test_network_proxy_profile.py -test/test_network_test_result.py -test/test_network_test_results.py -test/test_network_topology_type.py -test/test_network_wireless_profile.py -test/test_pagination_next_and_self_link.py -test/test_pagination_next_link.py -test/test_path_vis_base_test_result.py -test/test_path_vis_detail_dynamic_test_result.py -test/test_path_vis_detail_dynamic_test_results.py -test/test_path_vis_detail_test_result.py -test/test_path_vis_detail_test_results.py -test/test_path_vis_dynamic_test_result.py -test/test_path_vis_dynamic_test_results.py -test/test_path_vis_endpoint.py -test/test_path_vis_hop.py -test/test_path_vis_route.py -test/test_path_vis_test_result.py -test/test_path_vis_test_results.py -test/test_physical_memory_used_bytes.py -test/test_platform.py -test/test_real_user_test_coordinates.py -test/test_real_user_test_network.py -test/test_real_user_test_network_result.py -test/test_real_user_test_network_results.py -test/test_real_user_test_page.py -test/test_real_user_test_page_detail_result.py -test/test_real_user_test_page_result.py -test/test_real_user_test_page_results.py -test/test_real_user_test_page_timings.py -test/test_self_links.py -test/test_severity.py -test/test_sort_order.py -test/test_system_metrics.py -test/test_target_network_ping.py -test/test_target_profile.py -test/test_target_traceroute.py -test/test_tcp_connect.py -test/test_test_interval.py -test/test_test_label.py -test/test_test_probe_mode_response.py -test/test_test_protocol.py -test/test_test_result.py -test/test_test_ssl_version_id.py -test/test_tests_data_rounds_search.py -test/test_tests_data_search_filter.py -test/test_tests_data_search_sort.py -test/test_tests_data_search_sort_key.py -test/test_tests_data_threshold_filter.py -test/test_tests_data_threshold_filters.py -test/test_threshold_filter_name.py -test/test_threshold_filter_operator.py -test/test_traceroute.py -test/test_traceroute_hop.py -test/test_trigger.py -test/test_unauthorized_error.py -test/test_validation_error.py -test/test_validation_error_item.py -test/test_vpn_network_ping.py -test/test_vpn_profile.py -test/test_vpn_traceroute.py -test/test_vpn_type.py +test/test_local_network_tests_results_api.py +test/test_network_dynamic_tests_results_api.py +test/test_network_scheduled_tests_results_api.py +test/test_real_user_tests_results_api.py +test/test_utils.py +test/test_web_http_server_scheduled_test_results_api.py diff --git a/thousandeyes-sdk-endpoint-test-results/README.md b/thousandeyes-sdk-endpoint-test-results/README.md index f0a4ef99..53bf5eae 100644 --- a/thousandeyes-sdk-endpoint-test-results/README.md +++ b/thousandeyes-sdk-endpoint-test-results/README.md @@ -3,8 +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.4 -- Package version: 1.0.0 +- API version: 7.0.6 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator @@ -18,9 +17,9 @@ Python 3.7+ If the python package is hosted on a repository, you can install directly using: ```sh -pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +pip install -e git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git#egg=thousandeyes-sdk-endpoint-test-results\&subdirectory=thousandeyes-sdk-endpoint-test-results ``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) +(you may need to run `pip` with root permission: `sudo pip install -e git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git#egg=thousandeyes-sdk-endpoint-test-results\&subdirectory=thousandeyes-sdk-endpoint-test-results`) Then import the package: ```python @@ -77,16 +76,20 @@ configuration = thousandeyes_sdk.client.Configuration( with thousandeyes_sdk.client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = thousandeyes_sdk.endpoint_test_results.LocalNetworkTestsResultsApi(api_client) - network_topology_id = '00160:39c518560de9:1491651900:236e6f18' # str | The network topology ID. 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) + window = '12h' # str | 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`. (optional) + start_date = '2022-07-17T22:00:54Z' # datetime | 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`. (optional) + end_date = '2022-07-18T22:00:54Z' # datetime | Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. (optional) + cursor = 'cursor_example' # str | (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. (optional) + endpoint_network_topology_result_request = thousandeyes_sdk.endpoint_test_results.EndpointNetworkTopologyResultRequest() # EndpointNetworkTopologyResultRequest | (optional) try: - # Retrieve endpoint local network topology - api_response = api_instance.get_endpoint_local_network_topology_details(network_topology_id, aid=aid) - print("The response of LocalNetworkTestsResultsApi->get_endpoint_local_network_topology_details:\n") + # List endpoint network topologies probes + api_response = api_instance.filter_local_networks_test_results_topologies(aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor, endpoint_network_topology_result_request=endpoint_network_topology_result_request) + print("The response of LocalNetworkTestsResultsApi->filter_local_networks_test_results_topologies:\n") pprint(api_response) except ApiException as e: - print("Exception when calling LocalNetworkTestsResultsApi->get_endpoint_local_network_topology_details: %s\n" % e) + print("Exception when calling LocalNetworkTestsResultsApi->filter_local_networks_test_results_topologies: %s\n" % e) ``` @@ -96,22 +99,22 @@ All URIs are relative to *https://api.thousandeyes.com* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*LocalNetworkTestsResultsApi* | [**get_endpoint_local_network_topology_details**](docs/LocalNetworkTestsResultsApi.md#get_endpoint_local_network_topology_details) | **GET** /v7/endpoint/test-results/local-networks/topologies/{networkTopologyId} | Retrieve endpoint local network topology -*LocalNetworkTestsResultsApi* | [**get_endpoint_local_networks**](docs/LocalNetworkTestsResultsApi.md#get_endpoint_local_networks) | **GET** /v7/endpoint/test-results/local-networks | List local networks -*LocalNetworkTestsResultsApi* | [**get_endpoint_local_networks_topologies**](docs/LocalNetworkTestsResultsApi.md#get_endpoint_local_networks_topologies) | **POST** /v7/endpoint/test-results/local-networks/topologies/filter | List endpoint network topologies probes -*NetworkDynamicTestsResultsApi* | [**get_dynamic_test_result_network_pathvis**](docs/NetworkDynamicTestsResultsApi.md#get_dynamic_test_result_network_pathvis) | **GET** /v7/endpoint/test-results/dynamic-tests/{testId}/path-vis | Retrieve path visualization network dynamic test results -*NetworkDynamicTestsResultsApi* | [**get_dynamic_test_result_pathvis_agent_round**](docs/NetworkDynamicTestsResultsApi.md#get_dynamic_test_result_pathvis_agent_round) | **GET** /v7/endpoint/test-results/dynamic-tests/{testId}/path-vis/agent/{agentId}/round/{roundId} | Retrieve path visualization network dynamic test results details -*NetworkDynamicTestsResultsApi* | [**post_fetch_dynamic_test_result_metrics**](docs/NetworkDynamicTestsResultsApi.md#post_fetch_dynamic_test_result_metrics) | **POST** /v7/endpoint/test-results/dynamic-tests/{testId}/network/filter | Retrieve network dynamic test results -*NetworkScheduledTestsResultsApi* | [**get_test_result_network_pathvis**](docs/NetworkScheduledTestsResultsApi.md#get_test_result_network_pathvis) | **GET** /v7/endpoint/test-results/scheduled-tests/{testId}/path-vis | Retrieve path visualization network scheduled test results -*NetworkScheduledTestsResultsApi* | [**get_test_result_pathvis_agent_round**](docs/NetworkScheduledTestsResultsApi.md#get_test_result_pathvis_agent_round) | **GET** /v7/endpoint/test-results/scheduled-tests/{testId}/path-vis/agent/{agentId}/round/{roundId} | Retrieve path visualization network scheduled test results details -*NetworkScheduledTestsResultsApi* | [**post_fetch_test_result_metrics**](docs/NetworkScheduledTestsResultsApi.md#post_fetch_test_result_metrics) | **POST** /v7/endpoint/test-results/scheduled-tests/{testId}/network/filter | Retrieve network scheduled test results -*NetworkScheduledTestsResultsApi* | [**post_fetch_test_result_metrics_multi_test**](docs/NetworkScheduledTestsResultsApi.md#post_fetch_test_result_metrics_multi_test) | **POST** /v7/endpoint/test-results/scheduled-tests/network/filter | Retrieve network scheduled test results from multiple tests -*RealUserTestsResultsApi* | [**get_endpoint_real_user_test_details**](docs/RealUserTestsResultsApi.md#get_endpoint_real_user_test_details) | **GET** /v7/endpoint/test-results/real-user-tests/{id} | Retrieve endpoint real user test -*RealUserTestsResultsApi* | [**get_endpoint_real_user_test_pages_details**](docs/RealUserTestsResultsApi.md#get_endpoint_real_user_test_pages_details) | **GET** /v7/endpoint/test-results/real-user-tests/{id}/pages/{pageId} | Retrieve endpoint real user test page -*RealUserTestsResultsApi* | [**get_endpoint_real_user_tests**](docs/RealUserTestsResultsApi.md#get_endpoint_real_user_tests) | **POST** /v7/endpoint/test-results/real-user-tests/filter | List endpoint real user tests -*RealUserTestsResultsApi* | [**get_endpoint_real_user_tests_network**](docs/RealUserTestsResultsApi.md#get_endpoint_real_user_tests_network) | **POST** /v7/endpoint/test-results/real-user-tests/networks/filter | List endpoint real user tests -*RealUserTestsResultsApi* | [**get_endpoint_real_user_tests_pages**](docs/RealUserTestsResultsApi.md#get_endpoint_real_user_tests_pages) | **POST** /v7/endpoint/test-results/real-user-tests/pages/filter | List endpoint real user tests visited pages -*WebHTTPServerScheduledTestResultsApi* | [**get_test_result_http_server**](docs/WebHTTPServerScheduledTestResultsApi.md#get_test_result_http_server) | **GET** /v7/endpoint/test-results/scheduled-tests/{testId}/http-server | Retrieve HTTP server scheduled test results +*LocalNetworkTestsResultsApi* | [**filter_local_networks_test_results_topologies**](docs/LocalNetworkTestsResultsApi.md#filter_local_networks_test_results_topologies) | **POST** /v7/endpoint/test-results/local-networks/topologies/filter | List endpoint network topologies probes +*LocalNetworkTestsResultsApi* | [**get_local_networks_test_results**](docs/LocalNetworkTestsResultsApi.md#get_local_networks_test_results) | **GET** /v7/endpoint/test-results/local-networks | List local networks +*LocalNetworkTestsResultsApi* | [**get_local_networks_test_results_topology**](docs/LocalNetworkTestsResultsApi.md#get_local_networks_test_results_topology) | **GET** /v7/endpoint/test-results/local-networks/topologies/{networkTopologyId} | Retrieve endpoint local network topology +*NetworkDynamicTestsResultsApi* | [**filter_dynamic_test_network_results**](docs/NetworkDynamicTestsResultsApi.md#filter_dynamic_test_network_results) | **POST** /v7/endpoint/test-results/dynamic-tests/{testId}/network/filter | Retrieve network dynamic test results +*NetworkDynamicTestsResultsApi* | [**get_dynamic_test_path_vis_agent_round_results**](docs/NetworkDynamicTestsResultsApi.md#get_dynamic_test_path_vis_agent_round_results) | **GET** /v7/endpoint/test-results/dynamic-tests/{testId}/path-vis/agent/{agentId}/round/{roundId} | Retrieve path visualization network dynamic test results details +*NetworkDynamicTestsResultsApi* | [**get_dynamic_test_path_vis_results**](docs/NetworkDynamicTestsResultsApi.md#get_dynamic_test_path_vis_results) | **GET** /v7/endpoint/test-results/dynamic-tests/{testId}/path-vis | Retrieve path visualization network dynamic test results +*NetworkScheduledTestsResultsApi* | [**filter_scheduled_test_network_results**](docs/NetworkScheduledTestsResultsApi.md#filter_scheduled_test_network_results) | **POST** /v7/endpoint/test-results/scheduled-tests/{testId}/network/filter | Retrieve network scheduled test results +*NetworkScheduledTestsResultsApi* | [**filter_scheduled_tests_network_results**](docs/NetworkScheduledTestsResultsApi.md#filter_scheduled_tests_network_results) | **POST** /v7/endpoint/test-results/scheduled-tests/network/filter | Retrieve network scheduled test results from multiple tests +*NetworkScheduledTestsResultsApi* | [**get_scheduled_test_path_vis_agent_round_results**](docs/NetworkScheduledTestsResultsApi.md#get_scheduled_test_path_vis_agent_round_results) | **GET** /v7/endpoint/test-results/scheduled-tests/{testId}/path-vis/agent/{agentId}/round/{roundId} | Retrieve path visualization network scheduled test results details +*NetworkScheduledTestsResultsApi* | [**get_scheduled_test_path_vis_results**](docs/NetworkScheduledTestsResultsApi.md#get_scheduled_test_path_vis_results) | **GET** /v7/endpoint/test-results/scheduled-tests/{testId}/path-vis | Retrieve path visualization network scheduled test results +*RealUserTestsResultsApi* | [**filter_real_user_tests_network_results**](docs/RealUserTestsResultsApi.md#filter_real_user_tests_network_results) | **POST** /v7/endpoint/test-results/real-user-tests/networks/filter | List endpoint real user tests +*RealUserTestsResultsApi* | [**filter_real_user_tests_results**](docs/RealUserTestsResultsApi.md#filter_real_user_tests_results) | **POST** /v7/endpoint/test-results/real-user-tests/filter | List endpoint real user tests +*RealUserTestsResultsApi* | [**filter_real_user_tests_visited_pages_results**](docs/RealUserTestsResultsApi.md#filter_real_user_tests_visited_pages_results) | **POST** /v7/endpoint/test-results/real-user-tests/pages/filter | List endpoint real user tests visited pages +*RealUserTestsResultsApi* | [**get_real_user_test_page_results**](docs/RealUserTestsResultsApi.md#get_real_user_test_page_results) | **GET** /v7/endpoint/test-results/real-user-tests/{id}/pages/{pageId} | Retrieve endpoint real user test page +*RealUserTestsResultsApi* | [**get_real_user_test_results**](docs/RealUserTestsResultsApi.md#get_real_user_test_results) | **GET** /v7/endpoint/test-results/real-user-tests/{id} | Retrieve endpoint real user test +*WebHTTPServerScheduledTestResultsApi* | [**get_http_server_scheduled_test_results**](docs/WebHTTPServerScheduledTestResultsApi.md#get_http_server_scheduled_test_results) | **GET** /v7/endpoint/test-results/scheduled-tests/{testId}/http-server | Retrieve HTTP server scheduled test results ## Documentation For Models @@ -240,6 +243,7 @@ Class | Method | HTTP request | Description - [Traceroute](docs/Traceroute.md) - [TracerouteHop](docs/TracerouteHop.md) - [Trigger](docs/Trigger.md) + - [UdpProbeModeResponse](docs/UdpProbeModeResponse.md) - [UnauthorizedError](docs/UnauthorizedError.md) - [ValidationError](docs/ValidationError.md) - [ValidationErrorItem](docs/ValidationErrorItem.md) diff --git a/thousandeyes-sdk-endpoint-test-results/docs/AsnDetails.md b/thousandeyes-sdk-endpoint-test-results/docs/AsnDetails.md index 2e47f157..a404d51e 100644 --- a/thousandeyes-sdk-endpoint-test-results/docs/AsnDetails.md +++ b/thousandeyes-sdk-endpoint-test-results/docs/AsnDetails.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **as_name** | **str** | Name of the provider. | [optional] [readonly] -**as_number** | **float** | Unique number assigned to an organization (also referred to as service provider). | [optional] [readonly] +**as_number** | **int** | Unique number assigned to an organization (also referred to as service provider). | [optional] [readonly] ## Example diff --git a/thousandeyes-sdk-endpoint-test-results/docs/CpuUtilization.md b/thousandeyes-sdk-endpoint-test-results/docs/CpuUtilization.md index 92942a99..b39ec793 100644 --- a/thousandeyes-sdk-endpoint-test-results/docs/CpuUtilization.md +++ b/thousandeyes-sdk-endpoint-test-results/docs/CpuUtilization.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **mean** | **float** | The mean (average) sampled usage value recorded during the monitored period. | [optional] [readonly] **median** | **float** | The median sampled usage value recorded during the monitored period. | [optional] [readonly] **std_dev** | **float** | The standard deviation of sampled usage values recorded during the monitored period. | [optional] [readonly] -**count** | **float** | The total number of samples collected during the monitored period. | [optional] [readonly] +**count** | **int** | The total number of samples collected during the monitored period. | [optional] [readonly] ## Example diff --git a/thousandeyes-sdk-endpoint-test-results/docs/DynamicBaseTestResult.md b/thousandeyes-sdk-endpoint-test-results/docs/DynamicBaseTestResult.md index 64457e85..19a4e9a8 100644 --- a/thousandeyes-sdk-endpoint-test-results/docs/DynamicBaseTestResult.md +++ b/thousandeyes-sdk-endpoint-test-results/docs/DynamicBaseTestResult.md @@ -6,6 +6,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **application** | **str** | Which supported application to monitor, can be one of `webex`, `zoom`, `microsoft-teams`. | [optional] +**protocol** | [**EndpointTestProtocol**](EndpointTestProtocol.md) | | [optional] +**tcp_probe_mode** | [**TestProbeModeResponse**](TestProbeModeResponse.md) | | [optional] +**udp_probe_mode** | [**UdpProbeModeResponse**](UdpProbeModeResponse.md) | | [optional] **webex** | [**DynamicTestWebex**](DynamicTestWebex.md) | | [optional] ## Example diff --git a/thousandeyes-sdk-endpoint-test-results/docs/EndpointHttpServerTest.md b/thousandeyes-sdk-endpoint-test-results/docs/EndpointHttpServerTest.md index 81ecb625..ab04d912 100644 --- a/thousandeyes-sdk-endpoint-test-results/docs/EndpointHttpServerTest.md +++ b/thousandeyes-sdk-endpoint-test-results/docs/EndpointHttpServerTest.md @@ -30,7 +30,7 @@ Name | Type | Description | Notes **ssl_version_id** | [**TestSslVersionId**](TestSslVersionId.md) | | [optional] **verify_certificate** | **bool** | Flag indicating if a certificate should be verified. | [optional] **content_regex** | **str** | Content regex, this field does not require escaping. | [optional] -**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to false. | [optional] [default to True] +**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`. | [optional] [default to True] **http_target_time** | **int** | Target time for HTTP server completion, specified in milliseconds. | [optional] **http_version** | **int** | HTTP protocol version. Set to '2' to prefer HTTP/2, or '1' to use only HTTP/1.1. | [optional] [default to 2] **post_body** | **str** | Enter the body for the HTTP POST request in this field. No special escaping is necessary. If the post body is provided with content, the `requestMethod` is automatically set to POST. | [optional] diff --git a/thousandeyes-sdk-endpoint-test-results/docs/EndpointScheduledTest.md b/thousandeyes-sdk-endpoint-test-results/docs/EndpointScheduledTest.md index bc049a1f..06573c4e 100644 --- a/thousandeyes-sdk-endpoint-test-results/docs/EndpointScheduledTest.md +++ b/thousandeyes-sdk-endpoint-test-results/docs/EndpointScheduledTest.md @@ -31,7 +31,7 @@ Name | Type | Description | Notes **ssl_version_id** | [**TestSslVersionId**](TestSslVersionId.md) | | [optional] **verify_certificate** | **bool** | Flag indicating if a certificate should be verified. | [optional] **content_regex** | **str** | Content regex, this field does not require escaping. | [optional] -**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to false. | [optional] [default to True] +**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`. | [optional] [default to True] **http_target_time** | **int** | Target time for HTTP server completion, specified in milliseconds. | [optional] **http_version** | **int** | HTTP protocol version. Set to '2' to prefer HTTP/2, or '1' to use only HTTP/1.1. | [optional] [default to 2] **post_body** | **str** | Enter the body for the HTTP POST request in this field. No special escaping is necessary. If the post body is provided with content, the `requestMethod` is automatically set to POST. | [optional] diff --git a/thousandeyes-sdk-endpoint-test-results/docs/EthernetProfile.md b/thousandeyes-sdk-endpoint-test-results/docs/EthernetProfile.md index 083600e1..56a52785 100644 --- a/thousandeyes-sdk-endpoint-test-results/docs/EthernetProfile.md +++ b/thousandeyes-sdk-endpoint-test-results/docs/EthernetProfile.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**link_speed** | **float** | Ethernet profile link speed | [optional] [readonly] +**link_speed** | **int** | Ethernet profile link speed | [optional] [readonly] ## Example diff --git a/thousandeyes-sdk-endpoint-test-results/docs/LocalNetworkTestsResultsApi.md b/thousandeyes-sdk-endpoint-test-results/docs/LocalNetworkTestsResultsApi.md index 2af15835..cdf112b1 100644 --- a/thousandeyes-sdk-endpoint-test-results/docs/LocalNetworkTestsResultsApi.md +++ b/thousandeyes-sdk-endpoint-test-results/docs/LocalNetworkTestsResultsApi.md @@ -4,183 +4,13 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**get_endpoint_local_network_topology_details**](LocalNetworkTestsResultsApi.md#get_endpoint_local_network_topology_details) | **GET** /v7/endpoint/test-results/local-networks/topologies/{networkTopologyId} | Retrieve endpoint local network topology -[**get_endpoint_local_networks**](LocalNetworkTestsResultsApi.md#get_endpoint_local_networks) | **GET** /v7/endpoint/test-results/local-networks | List local networks -[**get_endpoint_local_networks_topologies**](LocalNetworkTestsResultsApi.md#get_endpoint_local_networks_topologies) | **POST** /v7/endpoint/test-results/local-networks/topologies/filter | List endpoint network topologies probes +[**filter_local_networks_test_results_topologies**](LocalNetworkTestsResultsApi.md#filter_local_networks_test_results_topologies) | **POST** /v7/endpoint/test-results/local-networks/topologies/filter | List endpoint network topologies probes +[**get_local_networks_test_results**](LocalNetworkTestsResultsApi.md#get_local_networks_test_results) | **GET** /v7/endpoint/test-results/local-networks | List local networks +[**get_local_networks_test_results_topology**](LocalNetworkTestsResultsApi.md#get_local_networks_test_results_topology) | **GET** /v7/endpoint/test-results/local-networks/topologies/{networkTopologyId} | Retrieve endpoint local network topology -# **get_endpoint_local_network_topology_details** -> LocalNetworkTopologyDetailResults get_endpoint_local_network_topology_details(network_topology_id, aid=aid) - -Retrieve endpoint local network topology - -Returns detailed data of a local network topology. - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import thousandeyes_sdk.endpoint_test_results -from thousandeyes_sdk.endpoint_test_results.models.local_network_topology_detail_results import LocalNetworkTopologyDetailResults -from thousandeyes_sdk.endpoint_test_results.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.thousandeyes.com -# See configuration.py for a list of all supported configuration parameters. -configuration = thousandeyes_sdk.client.Configuration( - host = "https://api.thousandeyes.com" -) - -# 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.client.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with thousandeyes_sdk.endpoint_test_results.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = thousandeyes_sdk.endpoint_test_results.LocalNetworkTestsResultsApi(api_client) - network_topology_id = '00160:39c518560de9:1491651900:236e6f18' # str | The network topology ID. - 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: - # Retrieve endpoint local network topology - api_response = api_instance.get_endpoint_local_network_topology_details(network_topology_id, aid=aid) - print("The response of LocalNetworkTestsResultsApi->get_endpoint_local_network_topology_details:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling LocalNetworkTestsResultsApi->get_endpoint_local_network_topology_details: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **network_topology_id** | **str**| The network topology ID. | - **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 - -[**LocalNetworkTopologyDetailResults**](LocalNetworkTopologyDetailResults.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**401** | Unauthorized | - | -**403** | Insufficient permissions to query endpoint | - | -**404** | Not found | - | -**429** | Exhausted rate limit for the organization | - | -**500** | Internal server error | - | -**502** | Bad Gateway | - | - -[[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_endpoint_local_networks** -> LocalNetworkResults get_endpoint_local_networks(aid=aid) - -List local networks - -Returns a list of all the networks used by endpoint agents. Sends back a `localNetworks` array. - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import thousandeyes_sdk.endpoint_test_results -from thousandeyes_sdk.endpoint_test_results.models.local_network_results import LocalNetworkResults -from thousandeyes_sdk.endpoint_test_results.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.thousandeyes.com -# See configuration.py for a list of all supported configuration parameters. -configuration = thousandeyes_sdk.client.Configuration( - host = "https://api.thousandeyes.com" -) - -# 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.client.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with thousandeyes_sdk.endpoint_test_results.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = thousandeyes_sdk.endpoint_test_results.LocalNetworkTestsResultsApi(api_client) - 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: - # List local networks - api_response = api_instance.get_endpoint_local_networks(aid=aid) - print("The response of LocalNetworkTestsResultsApi->get_endpoint_local_networks:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling LocalNetworkTestsResultsApi->get_endpoint_local_networks: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **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 - -[**LocalNetworkResults**](LocalNetworkResults.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**401** | Unauthorized | - | -**403** | Insufficient permissions to query endpoint | - | -**404** | Not found | - | -**429** | Exhausted rate limit for the organization | - | -**500** | Internal server error | - | -**502** | Bad Gateway | - | - -[[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_endpoint_local_networks_topologies** -> LocalNetworkTopologyResults get_endpoint_local_networks_topologies(aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor, endpoint_network_topology_result_request=endpoint_network_topology_result_request) +# **filter_local_networks_test_results_topologies** +> LocalNetworkTopologyResults filter_local_networks_test_results_topologies(aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor, endpoint_network_topology_result_request=endpoint_network_topology_result_request) List endpoint network topologies probes @@ -226,11 +56,11 @@ with thousandeyes_sdk.endpoint_test_results.ApiClient(configuration) as api_clie try: # List endpoint network topologies probes - api_response = api_instance.get_endpoint_local_networks_topologies(aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor, endpoint_network_topology_result_request=endpoint_network_topology_result_request) - print("The response of LocalNetworkTestsResultsApi->get_endpoint_local_networks_topologies:\n") + api_response = api_instance.filter_local_networks_test_results_topologies(aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor, endpoint_network_topology_result_request=endpoint_network_topology_result_request) + print("The response of LocalNetworkTestsResultsApi->filter_local_networks_test_results_topologies:\n") pprint(api_response) except Exception as e: - print("Exception when calling LocalNetworkTestsResultsApi->get_endpoint_local_networks_topologies: %s\n" % e) + print("Exception when calling LocalNetworkTestsResultsApi->filter_local_networks_test_results_topologies: %s\n" % e) ``` @@ -258,7 +88,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -275,3 +105,173 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **get_local_networks_test_results** +> LocalNetworkResults get_local_networks_test_results(aid=aid) + +List local networks + +Returns a list of all the networks used by endpoint agents. Sends back a `localNetworks` array. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.endpoint_test_results +from thousandeyes_sdk.endpoint_test_results.models.local_network_results import LocalNetworkResults +from thousandeyes_sdk.endpoint_test_results.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.endpoint_test_results.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.endpoint_test_results.LocalNetworkTestsResultsApi(api_client) + 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: + # List local networks + api_response = api_instance.get_local_networks_test_results(aid=aid) + print("The response of LocalNetworkTestsResultsApi->get_local_networks_test_results:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling LocalNetworkTestsResultsApi->get_local_networks_test_results: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **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 + +[**LocalNetworkResults**](LocalNetworkResults.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | +**404** | Not found | - | +**429** | Exhausted rate limit for the organization | - | +**500** | Internal server error | - | +**502** | Bad Gateway | - | + +[[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_local_networks_test_results_topology** +> LocalNetworkTopologyDetailResults get_local_networks_test_results_topology(network_topology_id, aid=aid) + +Retrieve endpoint local network topology + +Returns detailed data of a local network topology. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.endpoint_test_results +from thousandeyes_sdk.endpoint_test_results.models.local_network_topology_detail_results import LocalNetworkTopologyDetailResults +from thousandeyes_sdk.endpoint_test_results.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.endpoint_test_results.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.endpoint_test_results.LocalNetworkTestsResultsApi(api_client) + network_topology_id = '00160:39c518560de9:1491651900:236e6f18' # str | The network topology ID. + 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: + # Retrieve endpoint local network topology + api_response = api_instance.get_local_networks_test_results_topology(network_topology_id, aid=aid) + print("The response of LocalNetworkTestsResultsApi->get_local_networks_test_results_topology:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling LocalNetworkTestsResultsApi->get_local_networks_test_results_topology: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **network_topology_id** | **str**| The network topology ID. | + **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 + +[**LocalNetworkTopologyDetailResults**](LocalNetworkTopologyDetailResults.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | +**404** | Not found | - | +**429** | Exhausted rate limit for the organization | - | +**500** | Internal server error | - | +**502** | Bad Gateway | - | + +[[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-endpoint-test-results/docs/LocalNetworkTopologyResult.md b/thousandeyes-sdk-endpoint-test-results/docs/LocalNetworkTopologyResult.md index 740dfde4..9f5265fe 100644 --- a/thousandeyes-sdk-endpoint-test-results/docs/LocalNetworkTopologyResult.md +++ b/thousandeyes-sdk-endpoint-test-results/docs/LocalNetworkTopologyResult.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **network_topology_id** | **str** | Network topology ID. Each network topology occurrence has a unique ID. | [optional] [readonly] **round_id** | **int** | Epoch time (seconds) indicating the start time of the round. | [optional] [readonly] **target** | **str** | IP of the target the network topology was performed against. This is typically a default gateway, proxy or VPN endpoint. | [optional] [readonly] -**target_port** | **float** | Port of the target the network topology was performed against. | [optional] [readonly] +**target_port** | **int** | Port of the target the network topology was performed against. | [optional] [readonly] **type** | [**NetworkTopologyType**](NetworkTopologyType.md) | | [optional] **icmp_ping** | [**NetworkPing**](NetworkPing.md) | | [optional] **is_icmp_blocked** | **bool** | Set to `true` if network target is blocking ICMP echo (ping) queries. | [optional] [readonly] diff --git a/thousandeyes-sdk-endpoint-test-results/docs/LocalNetworkTopologyResultBase.md b/thousandeyes-sdk-endpoint-test-results/docs/LocalNetworkTopologyResultBase.md index e407feb9..73bde6cf 100644 --- a/thousandeyes-sdk-endpoint-test-results/docs/LocalNetworkTopologyResultBase.md +++ b/thousandeyes-sdk-endpoint-test-results/docs/LocalNetworkTopologyResultBase.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **network_topology_id** | **str** | Network topology ID. Each network topology occurrence has a unique ID. | [optional] [readonly] **round_id** | **int** | Epoch time (seconds) indicating the start time of the round. | [optional] [readonly] **target** | **str** | IP of the target the network topology was performed against. This is typically a default gateway, proxy or VPN endpoint. | [optional] [readonly] -**target_port** | **float** | Port of the target the network topology was performed against. | [optional] [readonly] +**target_port** | **int** | Port of the target the network topology was performed against. | [optional] [readonly] **type** | [**NetworkTopologyType**](NetworkTopologyType.md) | | [optional] **icmp_ping** | [**NetworkPing**](NetworkPing.md) | | [optional] **is_icmp_blocked** | **bool** | Set to `true` if network target is blocking ICMP echo (ping) queries. | [optional] [readonly] diff --git a/thousandeyes-sdk-endpoint-test-results/docs/MultiTestIdNetworkTestResults.md b/thousandeyes-sdk-endpoint-test-results/docs/MultiTestIdNetworkTestResults.md index 56782b4b..2776897c 100644 --- a/thousandeyes-sdk-endpoint-test-results/docs/MultiTestIdNetworkTestResults.md +++ b/thousandeyes-sdk-endpoint-test-results/docs/MultiTestIdNetworkTestResults.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **results** | [**List[NetworkTestResult]**](NetworkTestResult.md) | | [optional] -**total_hits** | **float** | Total number of measurements that match the search criteria | [optional] +**total_hits** | **int** | Total number of measurements that match the search criteria | [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/NetworkDynamicTestResult.md b/thousandeyes-sdk-endpoint-test-results/docs/NetworkDynamicTestResult.md index 524dc085..882874d3 100644 --- a/thousandeyes-sdk-endpoint-test-results/docs/NetworkDynamicTestResult.md +++ b/thousandeyes-sdk-endpoint-test-results/docs/NetworkDynamicTestResult.md @@ -21,6 +21,9 @@ Name | Type | Description | Notes **max_latency** | **float** | Maximum RTT for packets sent to destination. | [optional] [readonly] **min_latency** | **float** | Minimum RTT for packets sent to destination. | [optional] [readonly] **application** | **str** | Which supported application to monitor, can be one of `webex`, `zoom`, `microsoft-teams`. | [optional] +**protocol** | [**EndpointTestProtocol**](EndpointTestProtocol.md) | | [optional] +**tcp_probe_mode** | [**TestProbeModeResponse**](TestProbeModeResponse.md) | | [optional] +**udp_probe_mode** | [**UdpProbeModeResponse**](UdpProbeModeResponse.md) | | [optional] **webex** | [**DynamicTestWebex**](DynamicTestWebex.md) | | [optional] ## Example diff --git a/thousandeyes-sdk-endpoint-test-results/docs/NetworkDynamicTestResults.md b/thousandeyes-sdk-endpoint-test-results/docs/NetworkDynamicTestResults.md index d5ba0952..63b1dc08 100644 --- a/thousandeyes-sdk-endpoint-test-results/docs/NetworkDynamicTestResults.md +++ b/thousandeyes-sdk-endpoint-test-results/docs/NetworkDynamicTestResults.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **results** | [**List[NetworkDynamicTestResult]**](NetworkDynamicTestResult.md) | | [optional] **test** | [**DynamicTest**](DynamicTest.md) | | [optional] -**total_hits** | **float** | Total number of measurements that match the search criteria | [optional] +**total_hits** | **int** | Total number of measurements that match the search criteria | [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/NetworkDynamicTestsResultsApi.md b/thousandeyes-sdk-endpoint-test-results/docs/NetworkDynamicTestsResultsApi.md index b8244da6..8379c114 100644 --- a/thousandeyes-sdk-endpoint-test-results/docs/NetworkDynamicTestsResultsApi.md +++ b/thousandeyes-sdk-endpoint-test-results/docs/NetworkDynamicTestsResultsApi.md @@ -4,198 +4,13 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**get_dynamic_test_result_network_pathvis**](NetworkDynamicTestsResultsApi.md#get_dynamic_test_result_network_pathvis) | **GET** /v7/endpoint/test-results/dynamic-tests/{testId}/path-vis | Retrieve path visualization network dynamic test results -[**get_dynamic_test_result_pathvis_agent_round**](NetworkDynamicTestsResultsApi.md#get_dynamic_test_result_pathvis_agent_round) | **GET** /v7/endpoint/test-results/dynamic-tests/{testId}/path-vis/agent/{agentId}/round/{roundId} | Retrieve path visualization network dynamic test results details -[**post_fetch_dynamic_test_result_metrics**](NetworkDynamicTestsResultsApi.md#post_fetch_dynamic_test_result_metrics) | **POST** /v7/endpoint/test-results/dynamic-tests/{testId}/network/filter | Retrieve network dynamic test results +[**filter_dynamic_test_network_results**](NetworkDynamicTestsResultsApi.md#filter_dynamic_test_network_results) | **POST** /v7/endpoint/test-results/dynamic-tests/{testId}/network/filter | Retrieve network dynamic test results +[**get_dynamic_test_path_vis_agent_round_results**](NetworkDynamicTestsResultsApi.md#get_dynamic_test_path_vis_agent_round_results) | **GET** /v7/endpoint/test-results/dynamic-tests/{testId}/path-vis/agent/{agentId}/round/{roundId} | Retrieve path visualization network dynamic test results details +[**get_dynamic_test_path_vis_results**](NetworkDynamicTestsResultsApi.md#get_dynamic_test_path_vis_results) | **GET** /v7/endpoint/test-results/dynamic-tests/{testId}/path-vis | Retrieve path visualization network dynamic test results -# **get_dynamic_test_result_network_pathvis** -> PathVisDynamicTestResults get_dynamic_test_result_network_pathvis(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) - -Retrieve path visualization network dynamic test results - -Returns a summary of the path visualization data collected from each endpoint agent to the destination. In each path visualization attempt, one attempt is made to reach the destination. Each set of data is summarized, based on response time, number of hops, and response time to the target. A time frame must be specified, or the most recent round within last 2 hours will be returned. - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import thousandeyes_sdk.endpoint_test_results -from thousandeyes_sdk.endpoint_test_results.models.path_vis_dynamic_test_results import PathVisDynamicTestResults -from thousandeyes_sdk.endpoint_test_results.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.thousandeyes.com -# See configuration.py for a list of all supported configuration parameters. -configuration = thousandeyes_sdk.client.Configuration( - host = "https://api.thousandeyes.com" -) - -# 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.client.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with thousandeyes_sdk.endpoint_test_results.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = thousandeyes_sdk.endpoint_test_results.NetworkDynamicTestsResultsApi(api_client) - test_id = '202701' # str | Test ID - 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) - window = '12h' # str | 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`. (optional) - start_date = '2022-07-17T22:00:54Z' # datetime | 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`. (optional) - end_date = '2022-07-18T22:00:54Z' # datetime | Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. (optional) - cursor = 'cursor_example' # str | (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. (optional) - - try: - # Retrieve path visualization network dynamic test results - api_response = api_instance.get_dynamic_test_result_network_pathvis(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) - print("The response of NetworkDynamicTestsResultsApi->get_dynamic_test_result_network_pathvis:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling NetworkDynamicTestsResultsApi->get_dynamic_test_result_network_pathvis: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **test_id** | **str**| Test ID | - **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] - **window** | **str**| 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`. | [optional] - **start_date** | **datetime**| 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`. | [optional] - **end_date** | **datetime**| Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. | [optional] - **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. | [optional] - -### Return type - -[**PathVisDynamicTestResults**](PathVisDynamicTestResults.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**401** | Unauthorized | - | -**403** | Insufficient permissions to query endpoint | - | -**404** | Not found | - | -**429** | Exhausted rate limit for the organization | - | -**500** | Internal server error | - | -**502** | Bad Gateway | - | - -[[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_dynamic_test_result_pathvis_agent_round** -> PathVisDetailDynamicTestResults get_dynamic_test_result_pathvis_agent_round(test_id, agent_id, round_id, aid=aid) - -Retrieve path visualization network dynamic test results details - -Returns a hop-by-hop summary of the path trace data collected during path visualization. In each round, one path discovery attempt is made to reach the destination. The entire path is returned. A `roundId` must be specified. - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import thousandeyes_sdk.endpoint_test_results -from thousandeyes_sdk.endpoint_test_results.models.path_vis_detail_dynamic_test_results import PathVisDetailDynamicTestResults -from thousandeyes_sdk.endpoint_test_results.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.thousandeyes.com -# See configuration.py for a list of all supported configuration parameters. -configuration = thousandeyes_sdk.client.Configuration( - host = "https://api.thousandeyes.com" -) - -# 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.client.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with thousandeyes_sdk.endpoint_test_results.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = thousandeyes_sdk.endpoint_test_results.NetworkDynamicTestsResultsApi(api_client) - test_id = '202701' # str | Test ID - agent_id = '11' # str | Agent ID - round_id = '1384309800' # str | Round ID - 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: - # Retrieve path visualization network dynamic test results details - api_response = api_instance.get_dynamic_test_result_pathvis_agent_round(test_id, agent_id, round_id, aid=aid) - print("The response of NetworkDynamicTestsResultsApi->get_dynamic_test_result_pathvis_agent_round:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling NetworkDynamicTestsResultsApi->get_dynamic_test_result_pathvis_agent_round: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **test_id** | **str**| Test ID | - **agent_id** | **str**| Agent ID | - **round_id** | **str**| Round ID | - **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 - -[**PathVisDetailDynamicTestResults**](PathVisDetailDynamicTestResults.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/hal+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 | - | -**429** | Exhausted rate limit for the organization | - | -**500** | Internal server error | - | -**502** | Bad Gateway | - | - -[[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) - -# **post_fetch_dynamic_test_result_metrics** -> NetworkDynamicTestResults post_fetch_dynamic_test_result_metrics(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor, dynamic_tests_data_round_search=dynamic_tests_data_round_search) +# **filter_dynamic_test_network_results** +> NetworkDynamicTestResults filter_dynamic_test_network_results(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor, dynamic_tests_data_round_search=dynamic_tests_data_round_search) Retrieve network dynamic test results @@ -242,11 +57,11 @@ with thousandeyes_sdk.endpoint_test_results.ApiClient(configuration) as api_clie try: # Retrieve network dynamic test results - api_response = api_instance.post_fetch_dynamic_test_result_metrics(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor, dynamic_tests_data_round_search=dynamic_tests_data_round_search) - print("The response of NetworkDynamicTestsResultsApi->post_fetch_dynamic_test_result_metrics:\n") + api_response = api_instance.filter_dynamic_test_network_results(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor, dynamic_tests_data_round_search=dynamic_tests_data_round_search) + print("The response of NetworkDynamicTestsResultsApi->filter_dynamic_test_network_results:\n") pprint(api_response) except Exception as e: - print("Exception when calling NetworkDynamicTestsResultsApi->post_fetch_dynamic_test_result_metrics: %s\n" % e) + print("Exception when calling NetworkDynamicTestsResultsApi->filter_dynamic_test_network_results: %s\n" % e) ``` @@ -275,7 +90,192 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | +**404** | Not found | - | +**429** | Exhausted rate limit for the organization | - | +**500** | Internal server error | - | +**502** | Bad Gateway | - | + +[[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_dynamic_test_path_vis_agent_round_results** +> PathVisDetailDynamicTestResults get_dynamic_test_path_vis_agent_round_results(test_id, agent_id, round_id, aid=aid) + +Retrieve path visualization network dynamic test results details + +Returns a hop-by-hop summary of the path trace data collected during path visualization. In each round, one path discovery attempt is made to reach the destination. The entire path is returned. A `roundId` must be specified. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.endpoint_test_results +from thousandeyes_sdk.endpoint_test_results.models.path_vis_detail_dynamic_test_results import PathVisDetailDynamicTestResults +from thousandeyes_sdk.endpoint_test_results.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.endpoint_test_results.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.endpoint_test_results.NetworkDynamicTestsResultsApi(api_client) + test_id = '202701' # str | Test ID + agent_id = '11' # str | Agent ID + round_id = '1384309800' # str | Round ID + 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: + # Retrieve path visualization network dynamic test results details + api_response = api_instance.get_dynamic_test_path_vis_agent_round_results(test_id, agent_id, round_id, aid=aid) + print("The response of NetworkDynamicTestsResultsApi->get_dynamic_test_path_vis_agent_round_results:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling NetworkDynamicTestsResultsApi->get_dynamic_test_path_vis_agent_round_results: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **test_id** | **str**| Test ID | + **agent_id** | **str**| Agent ID | + **round_id** | **str**| Round ID | + **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 + +[**PathVisDetailDynamicTestResults**](PathVisDetailDynamicTestResults.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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 | - | +**429** | Exhausted rate limit for the organization | - | +**500** | Internal server error | - | +**502** | Bad Gateway | - | + +[[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_dynamic_test_path_vis_results** +> PathVisDynamicTestResults get_dynamic_test_path_vis_results(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) + +Retrieve path visualization network dynamic test results + +Returns a summary of the path visualization data collected from each endpoint agent to the destination. In each path visualization attempt, one attempt is made to reach the destination. Each set of data is summarized, based on response time, number of hops, and response time to the target. A time frame must be specified, or the most recent round within last 2 hours will be returned. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.endpoint_test_results +from thousandeyes_sdk.endpoint_test_results.models.path_vis_dynamic_test_results import PathVisDynamicTestResults +from thousandeyes_sdk.endpoint_test_results.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.endpoint_test_results.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.endpoint_test_results.NetworkDynamicTestsResultsApi(api_client) + test_id = '202701' # str | Test ID + 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) + window = '12h' # str | 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`. (optional) + start_date = '2022-07-17T22:00:54Z' # datetime | 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`. (optional) + end_date = '2022-07-18T22:00:54Z' # datetime | Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. (optional) + cursor = 'cursor_example' # str | (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. (optional) + + try: + # Retrieve path visualization network dynamic test results + api_response = api_instance.get_dynamic_test_path_vis_results(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) + print("The response of NetworkDynamicTestsResultsApi->get_dynamic_test_path_vis_results:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling NetworkDynamicTestsResultsApi->get_dynamic_test_path_vis_results: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **test_id** | **str**| Test ID | + **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] + **window** | **str**| 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`. | [optional] + **start_date** | **datetime**| 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`. | [optional] + **end_date** | **datetime**| Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. | [optional] + **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. | [optional] + +### Return type + +[**PathVisDynamicTestResults**](PathVisDynamicTestResults.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-endpoint-test-results/docs/NetworkScheduledTestsResultsApi.md b/thousandeyes-sdk-endpoint-test-results/docs/NetworkScheduledTestsResultsApi.md index 872b9abd..9d6843bc 100644 --- a/thousandeyes-sdk-endpoint-test-results/docs/NetworkScheduledTestsResultsApi.md +++ b/thousandeyes-sdk-endpoint-test-results/docs/NetworkScheduledTestsResultsApi.md @@ -4,198 +4,14 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**get_test_result_network_pathvis**](NetworkScheduledTestsResultsApi.md#get_test_result_network_pathvis) | **GET** /v7/endpoint/test-results/scheduled-tests/{testId}/path-vis | Retrieve path visualization network scheduled test results -[**get_test_result_pathvis_agent_round**](NetworkScheduledTestsResultsApi.md#get_test_result_pathvis_agent_round) | **GET** /v7/endpoint/test-results/scheduled-tests/{testId}/path-vis/agent/{agentId}/round/{roundId} | Retrieve path visualization network scheduled test results details -[**post_fetch_test_result_metrics**](NetworkScheduledTestsResultsApi.md#post_fetch_test_result_metrics) | **POST** /v7/endpoint/test-results/scheduled-tests/{testId}/network/filter | Retrieve network scheduled test results -[**post_fetch_test_result_metrics_multi_test**](NetworkScheduledTestsResultsApi.md#post_fetch_test_result_metrics_multi_test) | **POST** /v7/endpoint/test-results/scheduled-tests/network/filter | Retrieve network scheduled test results from multiple tests +[**filter_scheduled_test_network_results**](NetworkScheduledTestsResultsApi.md#filter_scheduled_test_network_results) | **POST** /v7/endpoint/test-results/scheduled-tests/{testId}/network/filter | Retrieve network scheduled test results +[**filter_scheduled_tests_network_results**](NetworkScheduledTestsResultsApi.md#filter_scheduled_tests_network_results) | **POST** /v7/endpoint/test-results/scheduled-tests/network/filter | Retrieve network scheduled test results from multiple tests +[**get_scheduled_test_path_vis_agent_round_results**](NetworkScheduledTestsResultsApi.md#get_scheduled_test_path_vis_agent_round_results) | **GET** /v7/endpoint/test-results/scheduled-tests/{testId}/path-vis/agent/{agentId}/round/{roundId} | Retrieve path visualization network scheduled test results details +[**get_scheduled_test_path_vis_results**](NetworkScheduledTestsResultsApi.md#get_scheduled_test_path_vis_results) | **GET** /v7/endpoint/test-results/scheduled-tests/{testId}/path-vis | Retrieve path visualization network scheduled test results -# **get_test_result_network_pathvis** -> PathVisTestResults get_test_result_network_pathvis(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) - -Retrieve path visualization network scheduled test results - -Returns a summary of the path visualization data collected from each endpoint agent to the destination. In each path visualization attempt, one attempt is made to reach the destination. Each set of data is summarized, based on response time, number of hops, and response time to the target. A time frame must be specified, or the most recent round within last 2 hours is returned. - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import thousandeyes_sdk.endpoint_test_results -from thousandeyes_sdk.endpoint_test_results.models.path_vis_test_results import PathVisTestResults -from thousandeyes_sdk.endpoint_test_results.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.thousandeyes.com -# See configuration.py for a list of all supported configuration parameters. -configuration = thousandeyes_sdk.client.Configuration( - host = "https://api.thousandeyes.com" -) - -# 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.client.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with thousandeyes_sdk.endpoint_test_results.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = thousandeyes_sdk.endpoint_test_results.NetworkScheduledTestsResultsApi(api_client) - test_id = '202701' # str | Test ID - 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) - window = '12h' # str | 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`. (optional) - start_date = '2022-07-17T22:00:54Z' # datetime | 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`. (optional) - end_date = '2022-07-18T22:00:54Z' # datetime | Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. (optional) - cursor = 'cursor_example' # str | (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. (optional) - - try: - # Retrieve path visualization network scheduled test results - api_response = api_instance.get_test_result_network_pathvis(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) - print("The response of NetworkScheduledTestsResultsApi->get_test_result_network_pathvis:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling NetworkScheduledTestsResultsApi->get_test_result_network_pathvis: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **test_id** | **str**| Test ID | - **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] - **window** | **str**| 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`. | [optional] - **start_date** | **datetime**| 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`. | [optional] - **end_date** | **datetime**| Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. | [optional] - **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. | [optional] - -### Return type - -[**PathVisTestResults**](PathVisTestResults.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**401** | Unauthorized | - | -**403** | Insufficient permissions to query endpoint | - | -**404** | Not found | - | -**429** | Exhausted rate limit for the organization | - | -**500** | Internal server error | - | -**502** | Bad Gateway | - | - -[[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_test_result_pathvis_agent_round** -> PathVisDetailTestResults get_test_result_pathvis_agent_round(test_id, agent_id, round_id, aid=aid) - -Retrieve path visualization network scheduled test results details - -Returns a hop-by-hop summary of the path trace data collected during path visualization. In each round, one path discovery attempt is made to reach the destination. The entire path is returned. A `roundId` must be specified. - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import thousandeyes_sdk.endpoint_test_results -from thousandeyes_sdk.endpoint_test_results.models.path_vis_detail_test_results import PathVisDetailTestResults -from thousandeyes_sdk.endpoint_test_results.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.thousandeyes.com -# See configuration.py for a list of all supported configuration parameters. -configuration = thousandeyes_sdk.client.Configuration( - host = "https://api.thousandeyes.com" -) - -# 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.client.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with thousandeyes_sdk.endpoint_test_results.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = thousandeyes_sdk.endpoint_test_results.NetworkScheduledTestsResultsApi(api_client) - test_id = '202701' # str | Test ID - agent_id = '11' # str | Agent ID - round_id = '1384309800' # str | Round ID - 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: - # Retrieve path visualization network scheduled test results details - api_response = api_instance.get_test_result_pathvis_agent_round(test_id, agent_id, round_id, aid=aid) - print("The response of NetworkScheduledTestsResultsApi->get_test_result_pathvis_agent_round:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling NetworkScheduledTestsResultsApi->get_test_result_pathvis_agent_round: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **test_id** | **str**| Test ID | - **agent_id** | **str**| Agent ID | - **round_id** | **str**| Round ID | - **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 - -[**PathVisDetailTestResults**](PathVisDetailTestResults.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**401** | Unauthorized | - | -**403** | Insufficient permissions to query endpoint | - | -**404** | Not found | - | -**429** | Exhausted rate limit for the organization | - | -**500** | Internal server error | - | -**502** | Bad Gateway | - | - -[[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) - -# **post_fetch_test_result_metrics** -> NetworkTestResults post_fetch_test_result_metrics(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor, tests_data_rounds_search=tests_data_rounds_search) +# **filter_scheduled_test_network_results** +> NetworkTestResults filter_scheduled_test_network_results(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor, tests_data_rounds_search=tests_data_rounds_search) Retrieve network scheduled test results @@ -242,11 +58,11 @@ with thousandeyes_sdk.endpoint_test_results.ApiClient(configuration) as api_clie try: # Retrieve network scheduled test results - api_response = api_instance.post_fetch_test_result_metrics(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor, tests_data_rounds_search=tests_data_rounds_search) - print("The response of NetworkScheduledTestsResultsApi->post_fetch_test_result_metrics:\n") + api_response = api_instance.filter_scheduled_test_network_results(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor, tests_data_rounds_search=tests_data_rounds_search) + print("The response of NetworkScheduledTestsResultsApi->filter_scheduled_test_network_results:\n") pprint(api_response) except Exception as e: - print("Exception when calling NetworkScheduledTestsResultsApi->post_fetch_test_result_metrics: %s\n" % e) + print("Exception when calling NetworkScheduledTestsResultsApi->filter_scheduled_test_network_results: %s\n" % e) ``` @@ -275,7 +91,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -291,8 +107,8 @@ 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) -# **post_fetch_test_result_metrics_multi_test** -> MultiTestIdNetworkTestResults post_fetch_test_result_metrics_multi_test(aid=aid, window=window, start_date=start_date, end_date=end_date, max=max, cursor=cursor, multi_test_id_tests_data_rounds_search=multi_test_id_tests_data_rounds_search) +# **filter_scheduled_tests_network_results** +> MultiTestIdNetworkTestResults filter_scheduled_tests_network_results(aid=aid, window=window, start_date=start_date, end_date=end_date, max=max, cursor=cursor, multi_test_id_tests_data_rounds_search=multi_test_id_tests_data_rounds_search) Retrieve network scheduled test results from multiple tests @@ -333,17 +149,17 @@ with thousandeyes_sdk.endpoint_test_results.ApiClient(configuration) as api_clie window = '12h' # str | 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`. (optional) start_date = '2022-07-17T22:00:54Z' # datetime | 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`. (optional) end_date = '2022-07-18T22:00:54Z' # datetime | Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. (optional) - max = 5 # float | (Optional) Maximum number of objects to return. (optional) + max = 5 # int | (Optional) Maximum number of objects to return. (optional) cursor = 'cursor_example' # str | (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. (optional) multi_test_id_tests_data_rounds_search = thousandeyes_sdk.endpoint_test_results.MultiTestIdTestsDataRoundsSearch() # MultiTestIdTestsDataRoundsSearch | Test data search filters. (optional) try: # Retrieve network scheduled test results from multiple tests - api_response = api_instance.post_fetch_test_result_metrics_multi_test(aid=aid, window=window, start_date=start_date, end_date=end_date, max=max, cursor=cursor, multi_test_id_tests_data_rounds_search=multi_test_id_tests_data_rounds_search) - print("The response of NetworkScheduledTestsResultsApi->post_fetch_test_result_metrics_multi_test:\n") + api_response = api_instance.filter_scheduled_tests_network_results(aid=aid, window=window, start_date=start_date, end_date=end_date, max=max, cursor=cursor, multi_test_id_tests_data_rounds_search=multi_test_id_tests_data_rounds_search) + print("The response of NetworkScheduledTestsResultsApi->filter_scheduled_tests_network_results:\n") pprint(api_response) except Exception as e: - print("Exception when calling NetworkScheduledTestsResultsApi->post_fetch_test_result_metrics_multi_test: %s\n" % e) + print("Exception when calling NetworkScheduledTestsResultsApi->filter_scheduled_tests_network_results: %s\n" % e) ``` @@ -357,7 +173,7 @@ Name | Type | Description | Notes **window** | **str**| 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`. | [optional] **start_date** | **datetime**| 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`. | [optional] **end_date** | **datetime**| Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. | [optional] - **max** | **float**| (Optional) Maximum number of objects to return. | [optional] + **max** | **int**| (Optional) Maximum number of objects to return. | [optional] **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. | [optional] **multi_test_id_tests_data_rounds_search** | [**MultiTestIdTestsDataRoundsSearch**](MultiTestIdTestsDataRoundsSearch.md)| Test data search filters. | [optional] @@ -372,7 +188,191 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | +**404** | Not found | - | +**429** | Exhausted rate limit for the organization | - | +**500** | Internal server error | - | +**502** | Bad Gateway | - | + +[[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_scheduled_test_path_vis_agent_round_results** +> PathVisDetailTestResults get_scheduled_test_path_vis_agent_round_results(test_id, agent_id, round_id, aid=aid) + +Retrieve path visualization network scheduled test results details + +Returns a hop-by-hop summary of the path trace data collected during path visualization. In each round, one path discovery attempt is made to reach the destination. The entire path is returned. A `roundId` must be specified. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.endpoint_test_results +from thousandeyes_sdk.endpoint_test_results.models.path_vis_detail_test_results import PathVisDetailTestResults +from thousandeyes_sdk.endpoint_test_results.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.endpoint_test_results.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.endpoint_test_results.NetworkScheduledTestsResultsApi(api_client) + test_id = '202701' # str | Test ID + agent_id = '11' # str | Agent ID + round_id = '1384309800' # str | Round ID + 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: + # Retrieve path visualization network scheduled test results details + api_response = api_instance.get_scheduled_test_path_vis_agent_round_results(test_id, agent_id, round_id, aid=aid) + print("The response of NetworkScheduledTestsResultsApi->get_scheduled_test_path_vis_agent_round_results:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling NetworkScheduledTestsResultsApi->get_scheduled_test_path_vis_agent_round_results: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **test_id** | **str**| Test ID | + **agent_id** | **str**| Agent ID | + **round_id** | **str**| Round ID | + **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 + +[**PathVisDetailTestResults**](PathVisDetailTestResults.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | +**404** | Not found | - | +**429** | Exhausted rate limit for the organization | - | +**500** | Internal server error | - | +**502** | Bad Gateway | - | + +[[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_scheduled_test_path_vis_results** +> PathVisTestResults get_scheduled_test_path_vis_results(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) + +Retrieve path visualization network scheduled test results + +Returns a summary of the path visualization data collected from each endpoint agent to the destination. In each path visualization attempt, one attempt is made to reach the destination. Each set of data is summarized, based on response time, number of hops, and response time to the target. A time frame must be specified, or the most recent round within last 2 hours is returned. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.endpoint_test_results +from thousandeyes_sdk.endpoint_test_results.models.path_vis_test_results import PathVisTestResults +from thousandeyes_sdk.endpoint_test_results.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.endpoint_test_results.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.endpoint_test_results.NetworkScheduledTestsResultsApi(api_client) + test_id = '202701' # str | Test ID + 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) + window = '12h' # str | 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`. (optional) + start_date = '2022-07-17T22:00:54Z' # datetime | 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`. (optional) + end_date = '2022-07-18T22:00:54Z' # datetime | Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. (optional) + cursor = 'cursor_example' # str | (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. (optional) + + try: + # Retrieve path visualization network scheduled test results + api_response = api_instance.get_scheduled_test_path_vis_results(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) + print("The response of NetworkScheduledTestsResultsApi->get_scheduled_test_path_vis_results:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling NetworkScheduledTestsResultsApi->get_scheduled_test_path_vis_results: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **test_id** | **str**| Test ID | + **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] + **window** | **str**| 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`. | [optional] + **start_date** | **datetime**| 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`. | [optional] + **end_date** | **datetime**| Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. | [optional] + **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. | [optional] + +### Return type + +[**PathVisTestResults**](PathVisTestResults.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-endpoint-test-results/docs/NetworkTestResults.md b/thousandeyes-sdk-endpoint-test-results/docs/NetworkTestResults.md index 78fa12ed..71de3bdb 100644 --- a/thousandeyes-sdk-endpoint-test-results/docs/NetworkTestResults.md +++ b/thousandeyes-sdk-endpoint-test-results/docs/NetworkTestResults.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **results** | [**List[NetworkTestResult]**](NetworkTestResult.md) | | [optional] -**total_hits** | **float** | Total number of measurements that match the search criteria | [optional] +**total_hits** | **int** | Total number of measurements that match the search criteria | [optional] **test** | [**EndpointScheduledTest**](EndpointScheduledTest.md) | | [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] diff --git a/thousandeyes-sdk-endpoint-test-results/docs/PathVisDetailDynamicTestResult.md b/thousandeyes-sdk-endpoint-test-results/docs/PathVisDetailDynamicTestResult.md index 23a5957f..b44f0068 100644 --- a/thousandeyes-sdk-endpoint-test-results/docs/PathVisDetailDynamicTestResult.md +++ b/thousandeyes-sdk-endpoint-test-results/docs/PathVisDetailDynamicTestResult.md @@ -20,6 +20,9 @@ Name | Type | Description | Notes **path_traces** | [**List[PathVisRoute]**](PathVisRoute.md) | Shows iterations of path trace, with each iteration specified by a pathId. | [optional] **vpn_path_traces** | [**List[PathVisRoute]**](PathVisRoute.md) | Shows iterations of the VPN path trace, with each iteration specified by a pathId. | [optional] **application** | **str** | Which supported application to monitor, can be one of `webex`, `zoom`, `microsoft-teams`. | [optional] +**protocol** | [**EndpointTestProtocol**](EndpointTestProtocol.md) | | [optional] +**tcp_probe_mode** | [**TestProbeModeResponse**](TestProbeModeResponse.md) | | [optional] +**udp_probe_mode** | [**UdpProbeModeResponse**](UdpProbeModeResponse.md) | | [optional] **webex** | [**DynamicTestWebex**](DynamicTestWebex.md) | | [optional] ## Example diff --git a/thousandeyes-sdk-endpoint-test-results/docs/PathVisDynamicTestResult.md b/thousandeyes-sdk-endpoint-test-results/docs/PathVisDynamicTestResult.md index 533d7920..cdccf77f 100644 --- a/thousandeyes-sdk-endpoint-test-results/docs/PathVisDynamicTestResult.md +++ b/thousandeyes-sdk-endpoint-test-results/docs/PathVisDynamicTestResult.md @@ -18,6 +18,9 @@ Name | Type | Description | Notes **source_ip** | **str** | IP address of source endpoint agent. | [optional] [readonly] **source_prefix** | **str** | IP prefix of source endpoint agent. | [optional] [readonly] **application** | **str** | Which supported application to monitor, can be one of `webex`, `zoom`, `microsoft-teams`. | [optional] +**protocol** | [**EndpointTestProtocol**](EndpointTestProtocol.md) | | [optional] +**tcp_probe_mode** | [**TestProbeModeResponse**](TestProbeModeResponse.md) | | [optional] +**udp_probe_mode** | [**UdpProbeModeResponse**](UdpProbeModeResponse.md) | | [optional] **webex** | [**DynamicTestWebex**](DynamicTestWebex.md) | | [optional] **location** | **str** | Geographic location of the path visualization. | [optional] [readonly] **path_traces** | [**List[PathVisEndpoint]**](PathVisEndpoint.md) | Shows an iteration of path trace, with each iteration specified by a pathId. | [optional] diff --git a/thousandeyes-sdk-endpoint-test-results/docs/PhysicalMemoryUsedBytes.md b/thousandeyes-sdk-endpoint-test-results/docs/PhysicalMemoryUsedBytes.md index 6537524c..b47e3146 100644 --- a/thousandeyes-sdk-endpoint-test-results/docs/PhysicalMemoryUsedBytes.md +++ b/thousandeyes-sdk-endpoint-test-results/docs/PhysicalMemoryUsedBytes.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **mean** | **float** | The mean (average) value of memory usage sampled over the monitored period. | [optional] [readonly] **median** | **float** | The median value of memory usage sampled over the monitored period. | [optional] [readonly] **std_dev** | **float** | The standard deviation of memory usage sampled during the monitored period. | [optional] [readonly] -**count** | **float** | The total number of samples collected during the monitored period.. | [optional] [readonly] +**count** | **int** | The total number of samples collected during the monitored period. | [optional] [readonly] ## Example diff --git a/thousandeyes-sdk-endpoint-test-results/docs/RealUserTestsResultsApi.md b/thousandeyes-sdk-endpoint-test-results/docs/RealUserTestsResultsApi.md index a8341229..e617c8c5 100644 --- a/thousandeyes-sdk-endpoint-test-results/docs/RealUserTestsResultsApi.md +++ b/thousandeyes-sdk-endpoint-test-results/docs/RealUserTestsResultsApi.md @@ -4,285 +4,15 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**get_endpoint_real_user_test_details**](RealUserTestsResultsApi.md#get_endpoint_real_user_test_details) | **GET** /v7/endpoint/test-results/real-user-tests/{id} | Retrieve endpoint real user test -[**get_endpoint_real_user_test_pages_details**](RealUserTestsResultsApi.md#get_endpoint_real_user_test_pages_details) | **GET** /v7/endpoint/test-results/real-user-tests/{id}/pages/{pageId} | Retrieve endpoint real user test page -[**get_endpoint_real_user_tests**](RealUserTestsResultsApi.md#get_endpoint_real_user_tests) | **POST** /v7/endpoint/test-results/real-user-tests/filter | List endpoint real user tests -[**get_endpoint_real_user_tests_network**](RealUserTestsResultsApi.md#get_endpoint_real_user_tests_network) | **POST** /v7/endpoint/test-results/real-user-tests/networks/filter | List endpoint real user tests -[**get_endpoint_real_user_tests_pages**](RealUserTestsResultsApi.md#get_endpoint_real_user_tests_pages) | **POST** /v7/endpoint/test-results/real-user-tests/pages/filter | List endpoint real user tests visited pages +[**filter_real_user_tests_network_results**](RealUserTestsResultsApi.md#filter_real_user_tests_network_results) | **POST** /v7/endpoint/test-results/real-user-tests/networks/filter | List endpoint real user tests +[**filter_real_user_tests_results**](RealUserTestsResultsApi.md#filter_real_user_tests_results) | **POST** /v7/endpoint/test-results/real-user-tests/filter | List endpoint real user tests +[**filter_real_user_tests_visited_pages_results**](RealUserTestsResultsApi.md#filter_real_user_tests_visited_pages_results) | **POST** /v7/endpoint/test-results/real-user-tests/pages/filter | List endpoint real user tests visited pages +[**get_real_user_test_page_results**](RealUserTestsResultsApi.md#get_real_user_test_page_results) | **GET** /v7/endpoint/test-results/real-user-tests/{id}/pages/{pageId} | Retrieve endpoint real user test page +[**get_real_user_test_results**](RealUserTestsResultsApi.md#get_real_user_test_results) | **GET** /v7/endpoint/test-results/real-user-tests/{id} | Retrieve endpoint real user test -# **get_endpoint_real_user_test_details** -> EndpointRealUserTestDetailResults get_endpoint_real_user_test_details(id, aid=aid) - -Retrieve endpoint real user test - -Provides details for an endpoint real user test. Returns a results array containing detailed information about endpoint real user tests.\" - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import thousandeyes_sdk.endpoint_test_results -from thousandeyes_sdk.endpoint_test_results.models.endpoint_real_user_test_detail_results import EndpointRealUserTestDetailResults -from thousandeyes_sdk.endpoint_test_results.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.thousandeyes.com -# See configuration.py for a list of all supported configuration parameters. -configuration = thousandeyes_sdk.client.Configuration( - host = "https://api.thousandeyes.com" -) - -# 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.client.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with thousandeyes_sdk.endpoint_test_results.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = thousandeyes_sdk.endpoint_test_results.RealUserTestsResultsApi(api_client) - id = '07625:1490529480:h3qJQTpl' # str | The real user test id. - 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: - # Retrieve endpoint real user test - api_response = api_instance.get_endpoint_real_user_test_details(id, aid=aid) - print("The response of RealUserTestsResultsApi->get_endpoint_real_user_test_details:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling RealUserTestsResultsApi->get_endpoint_real_user_test_details: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **str**| The real user test id. | - **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 - -[**EndpointRealUserTestDetailResults**](EndpointRealUserTestDetailResults.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**401** | Unauthorized | - | -**403** | Insufficient permissions to query endpoint | - | -**404** | Not found | - | -**429** | Exhausted rate limit for the organization | - | -**500** | Internal server error | - | -**502** | Bad Gateway | - | - -[[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_endpoint_real_user_test_pages_details** -> RealUserTestPageDetailResult get_endpoint_real_user_test_pages_details(id, page_id, aid=aid) - -Retrieve endpoint real user test page - -Returns details for endpoint real user test web page request. Provides complete waterfall information with all object requests. Sends back detailed endpoint real user test web page request. Returned object has a single field: `har` which is an HAR object according to the HTTP Archive 1.2 specifications. [You can read more about the specification](http://www.softwareishard.com/blog/har-12-spec/). In addition to standard fields, the object har includes a custom property `systemMetrics` which contain metrics about CPU and physical memory usage. Check `SystemMetrics` on schemas tab for more information. - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import thousandeyes_sdk.endpoint_test_results -from thousandeyes_sdk.endpoint_test_results.models.real_user_test_page_detail_result import RealUserTestPageDetailResult -from thousandeyes_sdk.endpoint_test_results.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.thousandeyes.com -# See configuration.py for a list of all supported configuration parameters. -configuration = thousandeyes_sdk.client.Configuration( - host = "https://api.thousandeyes.com" -) - -# 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.client.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with thousandeyes_sdk.endpoint_test_results.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = thousandeyes_sdk.endpoint_test_results.RealUserTestsResultsApi(api_client) - id = '07625:1490529480:h3qJQTpl' # str | The real user test id. - page_id = '281474976710706' # str | Web page ID - 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: - # Retrieve endpoint real user test page - api_response = api_instance.get_endpoint_real_user_test_pages_details(id, page_id, aid=aid) - print("The response of RealUserTestsResultsApi->get_endpoint_real_user_test_pages_details:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling RealUserTestsResultsApi->get_endpoint_real_user_test_pages_details: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **str**| The real user test id. | - **page_id** | **str**| Web page ID | - **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 - -[**RealUserTestPageDetailResult**](RealUserTestPageDetailResult.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**401** | Unauthorized | - | -**403** | Insufficient permissions to query endpoint | - | -**404** | Not found | - | -**429** | Exhausted rate limit for the organization | - | -**500** | Internal server error | - | -**502** | Bad Gateway | - | - -[[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_endpoint_real_user_tests** -> EndpointRealUserTestResults get_endpoint_real_user_tests(aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor, endpoint_real_user_test_results_request=endpoint_real_user_test_results_request) - -List endpoint real user tests - -Returns a list of all endpoint real user tests. Results from the last round are provided unless an explicit start and end is provided with `startDate`, `endDate` or `window` optional parameters. ## Request body filters This endpoint supports complex filtering using the request body. It is important these filters remain unaltered when making use of pagination, otherwise the results will not be coherent with the original request. ### Multiple filter fields When multiple filter fields are provided, a logical `AND` is applied between the filters. ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/real-user-tests/filter' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"platform\": [ \"mac\" ], \"domain\": [ \"thousandeyes.com\" ] }}' ``` ### Filter field with multiple values When a filter field contains multiple values, a logical `OR` is applied between the filter values. ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/real-user-tests/filter' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"networkId\": [ \"660b34109d12\", \"660b34109d15\" ] } }' ``` ### Combination of request parameters and body filters ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/real-user-tests/filter?window=1w' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"platform\": [ \"mac\" ], \"domain\": [ \"thousandeyes.com\" ], \"networkId\": [ \"660b34109d12\", \"660b34109d15\" ] } }' ``` Returns a `results` array of endpoint real user tests. Either the latest results, or based on the time range and body filters specified. - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import thousandeyes_sdk.endpoint_test_results -from thousandeyes_sdk.endpoint_test_results.models.endpoint_real_user_test_results import EndpointRealUserTestResults -from thousandeyes_sdk.endpoint_test_results.models.endpoint_real_user_test_results_request import EndpointRealUserTestResultsRequest -from thousandeyes_sdk.endpoint_test_results.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.thousandeyes.com -# See configuration.py for a list of all supported configuration parameters. -configuration = thousandeyes_sdk.client.Configuration( - host = "https://api.thousandeyes.com" -) - -# 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.client.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with thousandeyes_sdk.endpoint_test_results.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = thousandeyes_sdk.endpoint_test_results.RealUserTestsResultsApi(api_client) - 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) - window = '12h' # str | 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`. (optional) - start_date = '2022-07-17T22:00:54Z' # datetime | 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`. (optional) - end_date = '2022-07-18T22:00:54Z' # datetime | Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. (optional) - cursor = 'cursor_example' # str | (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. (optional) - endpoint_real_user_test_results_request = thousandeyes_sdk.endpoint_test_results.EndpointRealUserTestResultsRequest() # EndpointRealUserTestResultsRequest | (optional) - - try: - # List endpoint real user tests - api_response = api_instance.get_endpoint_real_user_tests(aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor, endpoint_real_user_test_results_request=endpoint_real_user_test_results_request) - print("The response of RealUserTestsResultsApi->get_endpoint_real_user_tests:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling RealUserTestsResultsApi->get_endpoint_real_user_tests: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **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] - **window** | **str**| 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`. | [optional] - **start_date** | **datetime**| 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`. | [optional] - **end_date** | **datetime**| Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. | [optional] - **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. | [optional] - **endpoint_real_user_test_results_request** | [**EndpointRealUserTestResultsRequest**](EndpointRealUserTestResultsRequest.md)| | [optional] - -### Return type - -[**EndpointRealUserTestResults**](EndpointRealUserTestResults.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/hal+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 | - | -**429** | Exhausted rate limit for the organization | - | -**500** | Internal server error | - | -**502** | Bad Gateway | - | - -[[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_endpoint_real_user_tests_network** -> RealUserTestNetworkResults get_endpoint_real_user_tests_network(aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor, endpoint_real_user_test_results_request=endpoint_real_user_test_results_request) +# **filter_real_user_tests_network_results** +> RealUserTestNetworkResults filter_real_user_tests_network_results(aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor, endpoint_real_user_test_results_request=endpoint_real_user_test_results_request) List endpoint real user tests @@ -328,11 +58,11 @@ with thousandeyes_sdk.endpoint_test_results.ApiClient(configuration) as api_clie try: # List endpoint real user tests - api_response = api_instance.get_endpoint_real_user_tests_network(aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor, endpoint_real_user_test_results_request=endpoint_real_user_test_results_request) - print("The response of RealUserTestsResultsApi->get_endpoint_real_user_tests_network:\n") + api_response = api_instance.filter_real_user_tests_network_results(aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor, endpoint_real_user_test_results_request=endpoint_real_user_test_results_request) + print("The response of RealUserTestsResultsApi->filter_real_user_tests_network_results:\n") pprint(api_response) except Exception as e: - print("Exception when calling RealUserTestsResultsApi->get_endpoint_real_user_tests_network: %s\n" % e) + print("Exception when calling RealUserTestsResultsApi->filter_real_user_tests_network_results: %s\n" % e) ``` @@ -360,7 +90,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -377,8 +107,104 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_endpoint_real_user_tests_pages** -> RealUserTestPageResults get_endpoint_real_user_tests_pages(aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor, endpoint_real_user_test_result_request_filter=endpoint_real_user_test_result_request_filter) +# **filter_real_user_tests_results** +> EndpointRealUserTestResults filter_real_user_tests_results(aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor, endpoint_real_user_test_results_request=endpoint_real_user_test_results_request) + +List endpoint real user tests + +Returns a list of all endpoint real user tests. Results from the last round are provided unless an explicit start and end is provided with `startDate`, `endDate` or `window` optional parameters. ## Request body filters This endpoint supports complex filtering using the request body. It is important these filters remain unaltered when making use of pagination, otherwise the results will not be coherent with the original request. ### Multiple filter fields When multiple filter fields are provided, a logical `AND` is applied between the filters. ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/real-user-tests/filter' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"platform\": [ \"mac\" ], \"domain\": [ \"thousandeyes.com\" ] }}' ``` ### Filter field with multiple values When a filter field contains multiple values, a logical `OR` is applied between the filter values. ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/real-user-tests/filter' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"networkId\": [ \"660b34109d12\", \"660b34109d15\" ] } }' ``` ### Combination of request parameters and body filters ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/real-user-tests/filter?window=1w' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"platform\": [ \"mac\" ], \"domain\": [ \"thousandeyes.com\" ], \"networkId\": [ \"660b34109d12\", \"660b34109d15\" ] } }' ``` Returns a `results` array of endpoint real user tests. Either the latest results, or based on the time range and body filters specified. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.endpoint_test_results +from thousandeyes_sdk.endpoint_test_results.models.endpoint_real_user_test_results import EndpointRealUserTestResults +from thousandeyes_sdk.endpoint_test_results.models.endpoint_real_user_test_results_request import EndpointRealUserTestResultsRequest +from thousandeyes_sdk.endpoint_test_results.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.endpoint_test_results.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.endpoint_test_results.RealUserTestsResultsApi(api_client) + 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) + window = '12h' # str | 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`. (optional) + start_date = '2022-07-17T22:00:54Z' # datetime | 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`. (optional) + end_date = '2022-07-18T22:00:54Z' # datetime | Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. (optional) + cursor = 'cursor_example' # str | (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. (optional) + endpoint_real_user_test_results_request = thousandeyes_sdk.endpoint_test_results.EndpointRealUserTestResultsRequest() # EndpointRealUserTestResultsRequest | (optional) + + try: + # List endpoint real user tests + api_response = api_instance.filter_real_user_tests_results(aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor, endpoint_real_user_test_results_request=endpoint_real_user_test_results_request) + print("The response of RealUserTestsResultsApi->filter_real_user_tests_results:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling RealUserTestsResultsApi->filter_real_user_tests_results: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **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] + **window** | **str**| 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`. | [optional] + **start_date** | **datetime**| 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`. | [optional] + **end_date** | **datetime**| Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. | [optional] + **cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. | [optional] + **endpoint_real_user_test_results_request** | [**EndpointRealUserTestResultsRequest**](EndpointRealUserTestResultsRequest.md)| | [optional] + +### Return type + +[**EndpointRealUserTestResults**](EndpointRealUserTestResults.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 | - | +**429** | Exhausted rate limit for the organization | - | +**500** | Internal server error | - | +**502** | Bad Gateway | - | + +[[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) + +# **filter_real_user_tests_visited_pages_results** +> RealUserTestPageResults filter_real_user_tests_visited_pages_results(aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor, endpoint_real_user_test_result_request_filter=endpoint_real_user_test_result_request_filter) List endpoint real user tests visited pages @@ -424,11 +250,11 @@ with thousandeyes_sdk.endpoint_test_results.ApiClient(configuration) as api_clie try: # List endpoint real user tests visited pages - api_response = api_instance.get_endpoint_real_user_tests_pages(aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor, endpoint_real_user_test_result_request_filter=endpoint_real_user_test_result_request_filter) - print("The response of RealUserTestsResultsApi->get_endpoint_real_user_tests_pages:\n") + api_response = api_instance.filter_real_user_tests_visited_pages_results(aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor, endpoint_real_user_test_result_request_filter=endpoint_real_user_test_result_request_filter) + print("The response of RealUserTestsResultsApi->filter_real_user_tests_visited_pages_results:\n") pprint(api_response) except Exception as e: - print("Exception when calling RealUserTestsResultsApi->get_endpoint_real_user_tests_pages: %s\n" % e) + print("Exception when calling RealUserTestsResultsApi->filter_real_user_tests_visited_pages_results: %s\n" % e) ``` @@ -456,7 +282,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -473,3 +299,177 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **get_real_user_test_page_results** +> RealUserTestPageDetailResult get_real_user_test_page_results(id, page_id, aid=aid) + +Retrieve endpoint real user test page + +Returns details for endpoint real user test web page request. Provides complete waterfall information with all object requests. Sends back detailed endpoint real user test web page request. Returned object has a single field: `har` which is an HAR object according to the HTTP Archive 1.2 specifications. [You can read more about the specification](http://www.softwareishard.com/blog/har-12-spec/). In addition to standard fields, the object har includes a custom property `systemMetrics` which contain metrics about CPU and physical memory usage. Check `SystemMetrics` on schemas tab for more information. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.endpoint_test_results +from thousandeyes_sdk.endpoint_test_results.models.real_user_test_page_detail_result import RealUserTestPageDetailResult +from thousandeyes_sdk.endpoint_test_results.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.endpoint_test_results.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.endpoint_test_results.RealUserTestsResultsApi(api_client) + id = '07625:1490529480:h3qJQTpl' # str | The real user test id. + page_id = '281474976710706' # str | Web page ID + 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: + # Retrieve endpoint real user test page + api_response = api_instance.get_real_user_test_page_results(id, page_id, aid=aid) + print("The response of RealUserTestsResultsApi->get_real_user_test_page_results:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling RealUserTestsResultsApi->get_real_user_test_page_results: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| The real user test id. | + **page_id** | **str**| Web page ID | + **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 + +[**RealUserTestPageDetailResult**](RealUserTestPageDetailResult.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | +**404** | Not found | - | +**429** | Exhausted rate limit for the organization | - | +**500** | Internal server error | - | +**502** | Bad Gateway | - | + +[[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_real_user_test_results** +> EndpointRealUserTestDetailResults get_real_user_test_results(id, aid=aid) + +Retrieve endpoint real user test + +Provides details for an endpoint real user test. Returns a results array containing detailed information about endpoint real user tests.\" + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.endpoint_test_results +from thousandeyes_sdk.endpoint_test_results.models.endpoint_real_user_test_detail_results import EndpointRealUserTestDetailResults +from thousandeyes_sdk.endpoint_test_results.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.endpoint_test_results.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.endpoint_test_results.RealUserTestsResultsApi(api_client) + id = '07625:1490529480:h3qJQTpl' # str | The real user test id. + 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: + # Retrieve endpoint real user test + api_response = api_instance.get_real_user_test_results(id, aid=aid) + print("The response of RealUserTestsResultsApi->get_real_user_test_results:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling RealUserTestsResultsApi->get_real_user_test_results: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| The real user test id. | + **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 + +[**EndpointRealUserTestDetailResults**](EndpointRealUserTestDetailResults.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | +**404** | Not found | - | +**429** | Exhausted rate limit for the organization | - | +**500** | Internal server error | - | +**502** | Bad Gateway | - | + +[[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-endpoint-test-results/docs/SystemMetrics.md b/thousandeyes-sdk-endpoint-test-results/docs/SystemMetrics.md index b1b40e9f..24fac1ef 100644 --- a/thousandeyes-sdk-endpoint-test-results/docs/SystemMetrics.md +++ b/thousandeyes-sdk-endpoint-test-results/docs/SystemMetrics.md @@ -5,11 +5,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**start_time_ms** | **float** | The start time of metrics collection, expressed in milliseconds since the Epoch. | [optional] [readonly] -**end_time_ms** | **float** | The end time of metrics collection, expressed in milliseconds since the Epoch. | [optional] [readonly] +**start_time_ms** | **int** | The start time of metrics collection, expressed in milliseconds since the Epoch. | [optional] [readonly] +**end_time_ms** | **int** | The end time of metrics collection, expressed in milliseconds since the Epoch. | [optional] [readonly] **cpu_utilization** | [**CpuUtilization**](CpuUtilization.md) | | [optional] **physical_memory_used_bytes** | [**PhysicalMemoryUsedBytes**](PhysicalMemoryUsedBytes.md) | | [optional] -**physical_memory_total_bytes** | **float** | Total physical memory of the system. | [optional] [readonly] +**physical_memory_total_bytes** | **int** | Total physical memory of the system. | [optional] [readonly] ## Example diff --git a/thousandeyes-sdk-endpoint-test-results/docs/TargetProfile.md b/thousandeyes-sdk-endpoint-test-results/docs/TargetProfile.md index 67cadd42..6bf40d98 100644 --- a/thousandeyes-sdk-endpoint-test-results/docs/TargetProfile.md +++ b/thousandeyes-sdk-endpoint-test-results/docs/TargetProfile.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**remote_port** | **float** | The remote port of a network flow towards the target. | [optional] [readonly] +**remote_port** | **int** | The remote port of a network flow towards the target. | [optional] [readonly] **remote_ip_address** | **str** | The remote IP address of a network flow towards the target. | [optional] [readonly] **protocol** | [**TestProtocol**](TestProtocol.md) | | [optional] diff --git a/thousandeyes-sdk-endpoint-test-results/docs/UdpProbeModeResponse.md b/thousandeyes-sdk-endpoint-test-results/docs/UdpProbeModeResponse.md new file mode 100644 index 00000000..8b5c8c5a --- /dev/null +++ b/thousandeyes-sdk-endpoint-test-results/docs/UdpProbeModeResponse.md @@ -0,0 +1,12 @@ +# UdpProbeModeResponse + +Probe mode used by network test, only valid when the protocol is set to UDP. + +## 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-endpoint-test-results/docs/ValidationErrorItem.md b/thousandeyes-sdk-endpoint-test-results/docs/ValidationErrorItem.md index 54f6990b..ef25aa2b 100644 --- a/thousandeyes-sdk-endpoint-test-results/docs/ValidationErrorItem.md +++ b/thousandeyes-sdk-endpoint-test-results/docs/ValidationErrorItem.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **code** | **str** | (Optional) A unique error type/code that can be referenced in the documentation for further details. | [optional] -**var_field** | **int** | Identifies the field that triggered this particular error. | [optional] +**var_field** | **str** | Identifies the field that triggered this particular error. | [optional] **message** | **str** | A short, human-readable summary of the error. | [optional] ## Example diff --git a/thousandeyes-sdk-endpoint-test-results/docs/WebHTTPServerScheduledTestResultsApi.md b/thousandeyes-sdk-endpoint-test-results/docs/WebHTTPServerScheduledTestResultsApi.md index 4f847573..fe4d0cd5 100644 --- a/thousandeyes-sdk-endpoint-test-results/docs/WebHTTPServerScheduledTestResultsApi.md +++ b/thousandeyes-sdk-endpoint-test-results/docs/WebHTTPServerScheduledTestResultsApi.md @@ -4,11 +4,11 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**get_test_result_http_server**](WebHTTPServerScheduledTestResultsApi.md#get_test_result_http_server) | **GET** /v7/endpoint/test-results/scheduled-tests/{testId}/http-server | Retrieve HTTP server scheduled test results +[**get_http_server_scheduled_test_results**](WebHTTPServerScheduledTestResultsApi.md#get_http_server_scheduled_test_results) | **GET** /v7/endpoint/test-results/scheduled-tests/{testId}/http-server | Retrieve HTTP server scheduled test results -# **get_test_result_http_server** -> HttpTestResults get_test_result_http_server(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor, expand=expand) +# **get_http_server_scheduled_test_results** +> HttpTestResults get_http_server_scheduled_test_results(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor, expand=expand) Retrieve HTTP server scheduled test results @@ -55,11 +55,11 @@ with thousandeyes_sdk.endpoint_test_results.ApiClient(configuration) as api_clie try: # Retrieve HTTP server scheduled test results - api_response = api_instance.get_test_result_http_server(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor, expand=expand) - print("The response of WebHTTPServerScheduledTestResultsApi->get_test_result_http_server:\n") + api_response = api_instance.get_http_server_scheduled_test_results(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor, expand=expand) + print("The response of WebHTTPServerScheduledTestResultsApi->get_http_server_scheduled_test_results:\n") pprint(api_response) except Exception as e: - print("Exception when calling WebHTTPServerScheduledTestResultsApi->get_test_result_http_server: %s\n" % e) + print("Exception when calling WebHTTPServerScheduledTestResultsApi->get_http_server_scheduled_test_results: %s\n" % e) ``` @@ -88,7 +88,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-endpoint-test-results/pyproject.toml b/thousandeyes-sdk-endpoint-test-results/pyproject.toml index 10374bbb..d491f6f9 100644 --- a/thousandeyes-sdk-endpoint-test-results/pyproject.toml +++ b/thousandeyes-sdk-endpoint-test-results/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "thousandeyes-sdk-endpoint-test-results" -version = "1.0.0" +dynamic = ["version"] authors = [ { name = "ThousandEyes API Team", email = "api-team@thousandeyes.com" } ] @@ -11,9 +11,12 @@ dependencies = [ "python-dateutil >=2.8.2", "pydantic >=2", "typing-extensions >=4.7.1", - "thousandeyes-sdk-client==1.0.0", + "thousandeyes-sdk-core", ] +[tool.setuptools.dynamic] +version = {attr = "thousandeyes_sdk.client.__version__"} + [project.optional-dependencies] test = [ "pytest~=7.1.3", diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/__init__.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/__init__.py index 88df2bc0..538c17f8 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/__init__.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/__init__.py @@ -7,15 +7,13 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 -__version__ = "1.0.0" - # import apis into sdk package from thousandeyes_sdk.endpoint_test_results.api.local_network_tests_results_api import LocalNetworkTestsResultsApi from thousandeyes_sdk.endpoint_test_results.api.network_dynamic_tests_results_api import NetworkDynamicTestsResultsApi @@ -149,6 +147,7 @@ from thousandeyes_sdk.endpoint_test_results.models.threshold_filter_operator imp from thousandeyes_sdk.endpoint_test_results.models.traceroute import Traceroute from thousandeyes_sdk.endpoint_test_results.models.traceroute_hop import TracerouteHop from thousandeyes_sdk.endpoint_test_results.models.trigger import Trigger +from thousandeyes_sdk.endpoint_test_results.models.udp_probe_mode_response import UdpProbeModeResponse from thousandeyes_sdk.endpoint_test_results.models.unauthorized_error import UnauthorizedError from thousandeyes_sdk.endpoint_test_results.models.validation_error import ValidationError from thousandeyes_sdk.endpoint_test_results.models.validation_error_item import ValidationErrorItem diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/api/local_network_tests_results_api.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/api/local_network_tests_results_api.py index 58da9984..5f7305dc 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/api/local_network_tests_results_api.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/api/local_network_tests_results_api.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -30,6 +30,7 @@ from thousandeyes_sdk.endpoint_test_results.models.local_network_topology_result from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class LocalNetworkTestsResultsApi: @@ -42,588 +43,12 @@ class LocalNetworkTestsResultsApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @validate_call - def get_endpoint_local_network_topology_details( - self, - network_topology_id: Annotated[StrictStr, Field(description="The network topology ID.")], - 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, - ) -> LocalNetworkTopologyDetailResults: - """Retrieve endpoint local network topology - - Returns detailed data of a local network topology. - - :param network_topology_id: The network topology ID. (required) - :type network_topology_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 - 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_endpoint_local_network_topology_details_serialize( - network_topology_id=network_topology_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "LocalNetworkTopologyDetailResults", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "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.endpoint_test_results.models, - ).data - - - @validate_call - def get_endpoint_local_network_topology_details_with_http_info( - self, - network_topology_id: Annotated[StrictStr, Field(description="The network topology ID.")], - 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[LocalNetworkTopologyDetailResults]: - """Retrieve endpoint local network topology - - Returns detailed data of a local network topology. - - :param network_topology_id: The network topology ID. (required) - :type network_topology_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 - 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_endpoint_local_network_topology_details_serialize( - network_topology_id=network_topology_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "LocalNetworkTopologyDetailResults", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "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.endpoint_test_results.models, - ) - - - @validate_call - def get_endpoint_local_network_topology_details_without_preload_content( - self, - network_topology_id: Annotated[StrictStr, Field(description="The network topology ID.")], - 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: - """Retrieve endpoint local network topology - - Returns detailed data of a local network topology. - - :param network_topology_id: The network topology ID. (required) - :type network_topology_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 - 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_endpoint_local_network_topology_details_serialize( - network_topology_id=network_topology_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "LocalNetworkTopologyDetailResults", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_endpoint_local_network_topology_details_serialize( - self, - network_topology_id, - 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 - if network_topology_id is not None: - _path_params['networkTopologyId'] = network_topology_id - # 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/problem+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v7/endpoint/test-results/local-networks/topologies/{networkTopologyId}', - 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_endpoint_local_networks( - 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, - ) -> LocalNetworkResults: - """List local networks - - Returns a list of all the networks used by endpoint agents. Sends back a `localNetworks` array. - - :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_endpoint_local_networks_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': "LocalNetworkResults", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "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.endpoint_test_results.models, - ).data - - - @validate_call - def get_endpoint_local_networks_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[LocalNetworkResults]: - """List local networks - - Returns a list of all the networks used by endpoint agents. Sends back a `localNetworks` array. - - :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_endpoint_local_networks_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': "LocalNetworkResults", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "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.endpoint_test_results.models, - ) - - - @validate_call - def get_endpoint_local_networks_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 local networks - - Returns a list of all the networks used by endpoint agents. Sends back a `localNetworks` array. - - :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_endpoint_local_networks_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': "LocalNetworkResults", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_endpoint_local_networks_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/problem+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v7/endpoint/test-results/local-networks', - 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_endpoint_local_networks_topologies( + def filter_local_networks_test_results_topologies( 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, 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, @@ -682,7 +107,7 @@ class LocalNetworkTestsResultsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_endpoint_local_networks_topologies_serialize( + _param = self._filter_local_networks_test_results_topologies_serialize( aid=aid, window=window, start_date=start_date, @@ -718,7 +143,7 @@ class LocalNetworkTestsResultsApi: @validate_call - def get_endpoint_local_networks_topologies_with_http_info( + def filter_local_networks_test_results_topologies_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, 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, @@ -777,7 +202,7 @@ class LocalNetworkTestsResultsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_endpoint_local_networks_topologies_serialize( + _param = self._filter_local_networks_test_results_topologies_serialize( aid=aid, window=window, start_date=start_date, @@ -813,7 +238,7 @@ class LocalNetworkTestsResultsApi: @validate_call - def get_endpoint_local_networks_topologies_without_preload_content( + def filter_local_networks_test_results_topologies_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, 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, @@ -872,7 +297,7 @@ class LocalNetworkTestsResultsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_endpoint_local_networks_topologies_serialize( + _param = self._filter_local_networks_test_results_topologies_serialize( aid=aid, window=window, start_date=start_date, @@ -902,7 +327,7 @@ class LocalNetworkTestsResultsApi: return response_data.response - def _get_endpoint_local_networks_topologies_serialize( + def _filter_local_networks_test_results_topologies_serialize( self, aid, window, @@ -979,6 +404,7 @@ class LocalNetworkTestsResultsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1018,3 +444,582 @@ class LocalNetworkTestsResultsApi: ) + + + @validate_call + def get_local_networks_test_results( + 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, + ) -> LocalNetworkResults: + """List local networks + + Returns a list of all the networks used by endpoint agents. Sends back a `localNetworks` array. + + :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_local_networks_test_results_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': "LocalNetworkResults", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "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.endpoint_test_results.models, + ).data + + + @validate_call + def get_local_networks_test_results_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[LocalNetworkResults]: + """List local networks + + Returns a list of all the networks used by endpoint agents. Sends back a `localNetworks` array. + + :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_local_networks_test_results_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': "LocalNetworkResults", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "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.endpoint_test_results.models, + ) + + + @validate_call + def get_local_networks_test_results_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 local networks + + Returns a list of all the networks used by endpoint agents. Sends back a `localNetworks` array. + + :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_local_networks_test_results_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': "LocalNetworkResults", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_local_networks_test_results_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='/v7/endpoint/test-results/local-networks', + 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_local_networks_test_results_topology( + self, + network_topology_id: Annotated[StrictStr, Field(description="The network topology ID.")], + 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, + ) -> LocalNetworkTopologyDetailResults: + """Retrieve endpoint local network topology + + Returns detailed data of a local network topology. + + :param network_topology_id: The network topology ID. (required) + :type network_topology_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 + 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_local_networks_test_results_topology_serialize( + network_topology_id=network_topology_id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "LocalNetworkTopologyDetailResults", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "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.endpoint_test_results.models, + ).data + + + @validate_call + def get_local_networks_test_results_topology_with_http_info( + self, + network_topology_id: Annotated[StrictStr, Field(description="The network topology ID.")], + 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[LocalNetworkTopologyDetailResults]: + """Retrieve endpoint local network topology + + Returns detailed data of a local network topology. + + :param network_topology_id: The network topology ID. (required) + :type network_topology_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 + 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_local_networks_test_results_topology_serialize( + network_topology_id=network_topology_id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "LocalNetworkTopologyDetailResults", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "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.endpoint_test_results.models, + ) + + + @validate_call + def get_local_networks_test_results_topology_without_preload_content( + self, + network_topology_id: Annotated[StrictStr, Field(description="The network topology ID.")], + 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: + """Retrieve endpoint local network topology + + Returns detailed data of a local network topology. + + :param network_topology_id: The network topology ID. (required) + :type network_topology_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 + 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_local_networks_test_results_topology_serialize( + network_topology_id=network_topology_id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "LocalNetworkTopologyDetailResults", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_local_networks_test_results_topology_serialize( + self, + network_topology_id, + 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 + if network_topology_id is not None: + _path_params['networkTopologyId'] = network_topology_id + # 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='/v7/endpoint/test-results/local-networks/topologies/{networkTopologyId}', + 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 + ) + + diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/api/network_dynamic_tests_results_api.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/api/network_dynamic_tests_results_api.py index b6117046..fe52e36b 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/api/network_dynamic_tests_results_api.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/api/network_dynamic_tests_results_api.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -30,6 +30,7 @@ from thousandeyes_sdk.endpoint_test_results.models.path_vis_dynamic_test_results from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class NetworkDynamicTestsResultsApi: @@ -42,722 +43,12 @@ class NetworkDynamicTestsResultsApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @validate_call - def get_dynamic_test_result_network_pathvis( - self, - test_id: Annotated[StrictStr, Field(description="Test ID")], - 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, - cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = 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, - ) -> PathVisDynamicTestResults: - """Retrieve path visualization network dynamic test results - - Returns a summary of the path visualization data collected from each endpoint agent to the destination. In each path visualization attempt, one attempt is made to reach the destination. Each set of data is summarized, based on response time, number of hops, and response time to the target. A time frame must be specified, or the most recent round within last 2 hours will be returned. - - :param test_id: Test ID (required) - :type test_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 cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. - :type cursor: 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_dynamic_test_result_network_pathvis_serialize( - test_id=test_id, - aid=aid, - window=window, - start_date=start_date, - end_date=end_date, - cursor=cursor, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "PathVisDynamicTestResults", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "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.endpoint_test_results.models, - ).data - - - @validate_call - def get_dynamic_test_result_network_pathvis_with_http_info( - self, - test_id: Annotated[StrictStr, Field(description="Test ID")], - 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, - cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = 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[PathVisDynamicTestResults]: - """Retrieve path visualization network dynamic test results - - Returns a summary of the path visualization data collected from each endpoint agent to the destination. In each path visualization attempt, one attempt is made to reach the destination. Each set of data is summarized, based on response time, number of hops, and response time to the target. A time frame must be specified, or the most recent round within last 2 hours will be returned. - - :param test_id: Test ID (required) - :type test_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 cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. - :type cursor: 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_dynamic_test_result_network_pathvis_serialize( - test_id=test_id, - aid=aid, - window=window, - start_date=start_date, - end_date=end_date, - cursor=cursor, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "PathVisDynamicTestResults", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "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.endpoint_test_results.models, - ) - - - @validate_call - def get_dynamic_test_result_network_pathvis_without_preload_content( - self, - test_id: Annotated[StrictStr, Field(description="Test ID")], - 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, - cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = 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 path visualization network dynamic test results - - Returns a summary of the path visualization data collected from each endpoint agent to the destination. In each path visualization attempt, one attempt is made to reach the destination. Each set of data is summarized, based on response time, number of hops, and response time to the target. A time frame must be specified, or the most recent round within last 2 hours will be returned. - - :param test_id: Test ID (required) - :type test_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 cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. - :type cursor: 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_dynamic_test_result_network_pathvis_serialize( - test_id=test_id, - aid=aid, - window=window, - start_date=start_date, - end_date=end_date, - cursor=cursor, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "PathVisDynamicTestResults", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_dynamic_test_result_network_pathvis_serialize( - self, - test_id, - aid, - window, - start_date, - end_date, - cursor, - _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 test_id is not None: - _path_params['testId'] = test_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 cursor is not None: - - _query_params.append(('cursor', cursor)) - - # 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/problem+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v7/endpoint/test-results/dynamic-tests/{testId}/path-vis', - 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_dynamic_test_result_pathvis_agent_round( - self, - test_id: Annotated[StrictStr, Field(description="Test ID")], - agent_id: Annotated[StrictStr, Field(description="Agent ID")], - round_id: Annotated[StrictStr, Field(description="Round ID")], - 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, - ) -> PathVisDetailDynamicTestResults: - """Retrieve path visualization network dynamic test results details - - Returns a hop-by-hop summary of the path trace data collected during path visualization. In each round, one path discovery attempt is made to reach the destination. The entire path is returned. A `roundId` must be specified. - - :param test_id: Test ID (required) - :type test_id: str - :param agent_id: Agent ID (required) - :type agent_id: str - :param round_id: Round ID (required) - :type round_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 - 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_dynamic_test_result_pathvis_agent_round_serialize( - test_id=test_id, - agent_id=agent_id, - round_id=round_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "PathVisDetailDynamicTestResults", - '400': "ValidationError", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "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.endpoint_test_results.models, - ).data - - - @validate_call - def get_dynamic_test_result_pathvis_agent_round_with_http_info( - self, - test_id: Annotated[StrictStr, Field(description="Test ID")], - agent_id: Annotated[StrictStr, Field(description="Agent ID")], - round_id: Annotated[StrictStr, Field(description="Round ID")], - 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[PathVisDetailDynamicTestResults]: - """Retrieve path visualization network dynamic test results details - - Returns a hop-by-hop summary of the path trace data collected during path visualization. In each round, one path discovery attempt is made to reach the destination. The entire path is returned. A `roundId` must be specified. - - :param test_id: Test ID (required) - :type test_id: str - :param agent_id: Agent ID (required) - :type agent_id: str - :param round_id: Round ID (required) - :type round_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 - 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_dynamic_test_result_pathvis_agent_round_serialize( - test_id=test_id, - agent_id=agent_id, - round_id=round_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "PathVisDetailDynamicTestResults", - '400': "ValidationError", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "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.endpoint_test_results.models, - ) - - - @validate_call - def get_dynamic_test_result_pathvis_agent_round_without_preload_content( - self, - test_id: Annotated[StrictStr, Field(description="Test ID")], - agent_id: Annotated[StrictStr, Field(description="Agent ID")], - round_id: Annotated[StrictStr, Field(description="Round ID")], - 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: - """Retrieve path visualization network dynamic test results details - - Returns a hop-by-hop summary of the path trace data collected during path visualization. In each round, one path discovery attempt is made to reach the destination. The entire path is returned. A `roundId` must be specified. - - :param test_id: Test ID (required) - :type test_id: str - :param agent_id: Agent ID (required) - :type agent_id: str - :param round_id: Round ID (required) - :type round_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 - 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_dynamic_test_result_pathvis_agent_round_serialize( - test_id=test_id, - agent_id=agent_id, - round_id=round_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "PathVisDetailDynamicTestResults", - '400': "ValidationError", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_dynamic_test_result_pathvis_agent_round_serialize( - self, - test_id, - agent_id, - round_id, - 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 - if test_id is not None: - _path_params['testId'] = test_id - if agent_id is not None: - _path_params['agentId'] = agent_id - if round_id is not None: - _path_params['roundId'] = round_id - # 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/problem+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v7/endpoint/test-results/dynamic-tests/{testId}/path-vis/agent/{agentId}/round/{roundId}', - 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 post_fetch_dynamic_test_result_metrics( + def filter_dynamic_test_network_results( self, test_id: Annotated[StrictStr, Field(description="Test ID")], 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, @@ -819,7 +110,7 @@ class NetworkDynamicTestsResultsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_fetch_dynamic_test_result_metrics_serialize( + _param = self._filter_dynamic_test_network_results_serialize( test_id=test_id, aid=aid, window=window, @@ -855,7 +146,7 @@ class NetworkDynamicTestsResultsApi: @validate_call - def post_fetch_dynamic_test_result_metrics_with_http_info( + def filter_dynamic_test_network_results_with_http_info( self, test_id: Annotated[StrictStr, Field(description="Test ID")], 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, @@ -917,7 +208,7 @@ class NetworkDynamicTestsResultsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_fetch_dynamic_test_result_metrics_serialize( + _param = self._filter_dynamic_test_network_results_serialize( test_id=test_id, aid=aid, window=window, @@ -953,7 +244,7 @@ class NetworkDynamicTestsResultsApi: @validate_call - def post_fetch_dynamic_test_result_metrics_without_preload_content( + def filter_dynamic_test_network_results_without_preload_content( self, test_id: Annotated[StrictStr, Field(description="Test ID")], 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, @@ -1015,7 +306,7 @@ class NetworkDynamicTestsResultsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_fetch_dynamic_test_result_metrics_serialize( + _param = self._filter_dynamic_test_network_results_serialize( test_id=test_id, aid=aid, window=window, @@ -1045,7 +336,7 @@ class NetworkDynamicTestsResultsApi: return response_data.response - def _post_fetch_dynamic_test_result_metrics_serialize( + def _filter_dynamic_test_network_results_serialize( self, test_id, aid, @@ -1125,6 +416,7 @@ class NetworkDynamicTestsResultsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1164,3 +456,716 @@ class NetworkDynamicTestsResultsApi: ) + + + @validate_call + def get_dynamic_test_path_vis_agent_round_results( + self, + test_id: Annotated[StrictStr, Field(description="Test ID")], + agent_id: Annotated[StrictStr, Field(description="Agent ID")], + round_id: Annotated[StrictStr, Field(description="Round ID")], + 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, + ) -> PathVisDetailDynamicTestResults: + """Retrieve path visualization network dynamic test results details + + Returns a hop-by-hop summary of the path trace data collected during path visualization. In each round, one path discovery attempt is made to reach the destination. The entire path is returned. A `roundId` must be specified. + + :param test_id: Test ID (required) + :type test_id: str + :param agent_id: Agent ID (required) + :type agent_id: str + :param round_id: Round ID (required) + :type round_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 + 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_dynamic_test_path_vis_agent_round_results_serialize( + test_id=test_id, + agent_id=agent_id, + round_id=round_id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PathVisDetailDynamicTestResults", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "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.endpoint_test_results.models, + ).data + + + @validate_call + def get_dynamic_test_path_vis_agent_round_results_with_http_info( + self, + test_id: Annotated[StrictStr, Field(description="Test ID")], + agent_id: Annotated[StrictStr, Field(description="Agent ID")], + round_id: Annotated[StrictStr, Field(description="Round ID")], + 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[PathVisDetailDynamicTestResults]: + """Retrieve path visualization network dynamic test results details + + Returns a hop-by-hop summary of the path trace data collected during path visualization. In each round, one path discovery attempt is made to reach the destination. The entire path is returned. A `roundId` must be specified. + + :param test_id: Test ID (required) + :type test_id: str + :param agent_id: Agent ID (required) + :type agent_id: str + :param round_id: Round ID (required) + :type round_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 + 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_dynamic_test_path_vis_agent_round_results_serialize( + test_id=test_id, + agent_id=agent_id, + round_id=round_id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PathVisDetailDynamicTestResults", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "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.endpoint_test_results.models, + ) + + + @validate_call + def get_dynamic_test_path_vis_agent_round_results_without_preload_content( + self, + test_id: Annotated[StrictStr, Field(description="Test ID")], + agent_id: Annotated[StrictStr, Field(description="Agent ID")], + round_id: Annotated[StrictStr, Field(description="Round ID")], + 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: + """Retrieve path visualization network dynamic test results details + + Returns a hop-by-hop summary of the path trace data collected during path visualization. In each round, one path discovery attempt is made to reach the destination. The entire path is returned. A `roundId` must be specified. + + :param test_id: Test ID (required) + :type test_id: str + :param agent_id: Agent ID (required) + :type agent_id: str + :param round_id: Round ID (required) + :type round_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 + 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_dynamic_test_path_vis_agent_round_results_serialize( + test_id=test_id, + agent_id=agent_id, + round_id=round_id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PathVisDetailDynamicTestResults", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_dynamic_test_path_vis_agent_round_results_serialize( + self, + test_id, + agent_id, + round_id, + 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 + if test_id is not None: + _path_params['testId'] = test_id + if agent_id is not None: + _path_params['agentId'] = agent_id + if round_id is not None: + _path_params['roundId'] = round_id + # 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='/v7/endpoint/test-results/dynamic-tests/{testId}/path-vis/agent/{agentId}/round/{roundId}', + 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_dynamic_test_path_vis_results( + self, + test_id: Annotated[StrictStr, Field(description="Test ID")], + 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, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = 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, + ) -> PathVisDynamicTestResults: + """Retrieve path visualization network dynamic test results + + Returns a summary of the path visualization data collected from each endpoint agent to the destination. In each path visualization attempt, one attempt is made to reach the destination. Each set of data is summarized, based on response time, number of hops, and response time to the target. A time frame must be specified, or the most recent round within last 2 hours will be returned. + + :param test_id: Test ID (required) + :type test_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 cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: 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_dynamic_test_path_vis_results_serialize( + test_id=test_id, + aid=aid, + window=window, + start_date=start_date, + end_date=end_date, + cursor=cursor, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PathVisDynamicTestResults", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "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.endpoint_test_results.models, + ).data + + + @validate_call + def get_dynamic_test_path_vis_results_with_http_info( + self, + test_id: Annotated[StrictStr, Field(description="Test ID")], + 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, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = 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[PathVisDynamicTestResults]: + """Retrieve path visualization network dynamic test results + + Returns a summary of the path visualization data collected from each endpoint agent to the destination. In each path visualization attempt, one attempt is made to reach the destination. Each set of data is summarized, based on response time, number of hops, and response time to the target. A time frame must be specified, or the most recent round within last 2 hours will be returned. + + :param test_id: Test ID (required) + :type test_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 cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: 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_dynamic_test_path_vis_results_serialize( + test_id=test_id, + aid=aid, + window=window, + start_date=start_date, + end_date=end_date, + cursor=cursor, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PathVisDynamicTestResults", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "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.endpoint_test_results.models, + ) + + + @validate_call + def get_dynamic_test_path_vis_results_without_preload_content( + self, + test_id: Annotated[StrictStr, Field(description="Test ID")], + 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, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = 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 path visualization network dynamic test results + + Returns a summary of the path visualization data collected from each endpoint agent to the destination. In each path visualization attempt, one attempt is made to reach the destination. Each set of data is summarized, based on response time, number of hops, and response time to the target. A time frame must be specified, or the most recent round within last 2 hours will be returned. + + :param test_id: Test ID (required) + :type test_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 cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: 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_dynamic_test_path_vis_results_serialize( + test_id=test_id, + aid=aid, + window=window, + start_date=start_date, + end_date=end_date, + cursor=cursor, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PathVisDynamicTestResults", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_dynamic_test_path_vis_results_serialize( + self, + test_id, + aid, + window, + start_date, + end_date, + cursor, + _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 test_id is not None: + _path_params['testId'] = test_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 cursor is not None: + + _query_params.append(('cursor', cursor)) + + # 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='/v7/endpoint/test-results/dynamic-tests/{testId}/path-vis', + 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 + ) + + diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/api/network_scheduled_tests_results_api.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/api/network_scheduled_tests_results_api.py index 25925155..a0ca887c 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/api/network_scheduled_tests_results_api.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/api/network_scheduled_tests_results_api.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -19,8 +19,8 @@ from typing_extensions import Annotated import thousandeyes_sdk.endpoint_test_results.models from datetime import datetime -from pydantic import Field, StrictFloat, StrictInt, StrictStr, field_validator -from typing import Optional, Union +from pydantic import Field, StrictInt, StrictStr, field_validator +from typing import Optional from typing_extensions import Annotated from thousandeyes_sdk.endpoint_test_results.models.multi_test_id_network_test_results import MultiTestIdNetworkTestResults from thousandeyes_sdk.endpoint_test_results.models.multi_test_id_tests_data_rounds_search import MultiTestIdTestsDataRoundsSearch @@ -32,6 +32,7 @@ from thousandeyes_sdk.endpoint_test_results.models.tests_data_rounds_search impo from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class NetworkScheduledTestsResultsApi: @@ -44,719 +45,12 @@ class NetworkScheduledTestsResultsApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @validate_call - def get_test_result_network_pathvis( - self, - test_id: Annotated[StrictStr, Field(description="Test ID")], - 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, - cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = 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, - ) -> PathVisTestResults: - """Retrieve path visualization network scheduled test results - - Returns a summary of the path visualization data collected from each endpoint agent to the destination. In each path visualization attempt, one attempt is made to reach the destination. Each set of data is summarized, based on response time, number of hops, and response time to the target. A time frame must be specified, or the most recent round within last 2 hours is returned. - - :param test_id: Test ID (required) - :type test_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 cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. - :type cursor: 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_test_result_network_pathvis_serialize( - test_id=test_id, - aid=aid, - window=window, - start_date=start_date, - end_date=end_date, - cursor=cursor, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "PathVisTestResults", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "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.endpoint_test_results.models, - ).data - - - @validate_call - def get_test_result_network_pathvis_with_http_info( - self, - test_id: Annotated[StrictStr, Field(description="Test ID")], - 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, - cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = 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[PathVisTestResults]: - """Retrieve path visualization network scheduled test results - - Returns a summary of the path visualization data collected from each endpoint agent to the destination. In each path visualization attempt, one attempt is made to reach the destination. Each set of data is summarized, based on response time, number of hops, and response time to the target. A time frame must be specified, or the most recent round within last 2 hours is returned. - - :param test_id: Test ID (required) - :type test_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 cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. - :type cursor: 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_test_result_network_pathvis_serialize( - test_id=test_id, - aid=aid, - window=window, - start_date=start_date, - end_date=end_date, - cursor=cursor, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "PathVisTestResults", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "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.endpoint_test_results.models, - ) - - - @validate_call - def get_test_result_network_pathvis_without_preload_content( - self, - test_id: Annotated[StrictStr, Field(description="Test ID")], - 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, - cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = 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 path visualization network scheduled test results - - Returns a summary of the path visualization data collected from each endpoint agent to the destination. In each path visualization attempt, one attempt is made to reach the destination. Each set of data is summarized, based on response time, number of hops, and response time to the target. A time frame must be specified, or the most recent round within last 2 hours is returned. - - :param test_id: Test ID (required) - :type test_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 cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. - :type cursor: 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_test_result_network_pathvis_serialize( - test_id=test_id, - aid=aid, - window=window, - start_date=start_date, - end_date=end_date, - cursor=cursor, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "PathVisTestResults", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_test_result_network_pathvis_serialize( - self, - test_id, - aid, - window, - start_date, - end_date, - cursor, - _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 test_id is not None: - _path_params['testId'] = test_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 cursor is not None: - - _query_params.append(('cursor', cursor)) - - # 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/problem+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v7/endpoint/test-results/scheduled-tests/{testId}/path-vis', - 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_test_result_pathvis_agent_round( - self, - test_id: Annotated[StrictStr, Field(description="Test ID")], - agent_id: Annotated[StrictStr, Field(description="Agent ID")], - round_id: Annotated[StrictStr, Field(description="Round ID")], - 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, - ) -> PathVisDetailTestResults: - """Retrieve path visualization network scheduled test results details - - Returns a hop-by-hop summary of the path trace data collected during path visualization. In each round, one path discovery attempt is made to reach the destination. The entire path is returned. A `roundId` must be specified. - - :param test_id: Test ID (required) - :type test_id: str - :param agent_id: Agent ID (required) - :type agent_id: str - :param round_id: Round ID (required) - :type round_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 - 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_test_result_pathvis_agent_round_serialize( - test_id=test_id, - agent_id=agent_id, - round_id=round_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "PathVisDetailTestResults", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "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.endpoint_test_results.models, - ).data - - - @validate_call - def get_test_result_pathvis_agent_round_with_http_info( - self, - test_id: Annotated[StrictStr, Field(description="Test ID")], - agent_id: Annotated[StrictStr, Field(description="Agent ID")], - round_id: Annotated[StrictStr, Field(description="Round ID")], - 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[PathVisDetailTestResults]: - """Retrieve path visualization network scheduled test results details - - Returns a hop-by-hop summary of the path trace data collected during path visualization. In each round, one path discovery attempt is made to reach the destination. The entire path is returned. A `roundId` must be specified. - - :param test_id: Test ID (required) - :type test_id: str - :param agent_id: Agent ID (required) - :type agent_id: str - :param round_id: Round ID (required) - :type round_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 - 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_test_result_pathvis_agent_round_serialize( - test_id=test_id, - agent_id=agent_id, - round_id=round_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "PathVisDetailTestResults", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "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.endpoint_test_results.models, - ) - - - @validate_call - def get_test_result_pathvis_agent_round_without_preload_content( - self, - test_id: Annotated[StrictStr, Field(description="Test ID")], - agent_id: Annotated[StrictStr, Field(description="Agent ID")], - round_id: Annotated[StrictStr, Field(description="Round ID")], - 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: - """Retrieve path visualization network scheduled test results details - - Returns a hop-by-hop summary of the path trace data collected during path visualization. In each round, one path discovery attempt is made to reach the destination. The entire path is returned. A `roundId` must be specified. - - :param test_id: Test ID (required) - :type test_id: str - :param agent_id: Agent ID (required) - :type agent_id: str - :param round_id: Round ID (required) - :type round_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 - 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_test_result_pathvis_agent_round_serialize( - test_id=test_id, - agent_id=agent_id, - round_id=round_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "PathVisDetailTestResults", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_test_result_pathvis_agent_round_serialize( - self, - test_id, - agent_id, - round_id, - 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 - if test_id is not None: - _path_params['testId'] = test_id - if agent_id is not None: - _path_params['agentId'] = agent_id - if round_id is not None: - _path_params['roundId'] = round_id - # 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/problem+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v7/endpoint/test-results/scheduled-tests/{testId}/path-vis/agent/{agentId}/round/{roundId}', - 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 post_fetch_test_result_metrics( + def filter_scheduled_test_network_results( self, test_id: Annotated[StrictStr, Field(description="Test ID")], 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, @@ -818,7 +112,7 @@ class NetworkScheduledTestsResultsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_fetch_test_result_metrics_serialize( + _param = self._filter_scheduled_test_network_results_serialize( test_id=test_id, aid=aid, window=window, @@ -854,7 +148,7 @@ class NetworkScheduledTestsResultsApi: @validate_call - def post_fetch_test_result_metrics_with_http_info( + def filter_scheduled_test_network_results_with_http_info( self, test_id: Annotated[StrictStr, Field(description="Test ID")], 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, @@ -916,7 +210,7 @@ class NetworkScheduledTestsResultsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_fetch_test_result_metrics_serialize( + _param = self._filter_scheduled_test_network_results_serialize( test_id=test_id, aid=aid, window=window, @@ -952,7 +246,7 @@ class NetworkScheduledTestsResultsApi: @validate_call - def post_fetch_test_result_metrics_without_preload_content( + def filter_scheduled_test_network_results_without_preload_content( self, test_id: Annotated[StrictStr, Field(description="Test ID")], 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, @@ -1014,7 +308,7 @@ class NetworkScheduledTestsResultsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_fetch_test_result_metrics_serialize( + _param = self._filter_scheduled_test_network_results_serialize( test_id=test_id, aid=aid, window=window, @@ -1044,7 +338,7 @@ class NetworkScheduledTestsResultsApi: return response_data.response - def _post_fetch_test_result_metrics_serialize( + def _filter_scheduled_test_network_results_serialize( self, test_id, aid, @@ -1124,6 +418,7 @@ class NetworkScheduledTestsResultsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1166,13 +461,13 @@ class NetworkScheduledTestsResultsApi: @validate_call - def post_fetch_test_result_metrics_multi_test( + def filter_scheduled_tests_network_results( 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, 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="(Optional) Maximum number of objects to return.")] = None, + max: Annotated[Optional[StrictInt], Field(description="(Optional) Maximum number of objects to return.")] = None, cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, multi_test_id_tests_data_rounds_search: Annotated[Optional[MultiTestIdTestsDataRoundsSearch], Field(description="Test data search filters.")] = None, _request_timeout: Union[ @@ -1201,7 +496,7 @@ class NetworkScheduledTestsResultsApi: :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: (Optional) Maximum number of objects to return. - :type max: float + :type max: int :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. :type cursor: str :param multi_test_id_tests_data_rounds_search: Test data search filters. @@ -1228,7 +523,7 @@ class NetworkScheduledTestsResultsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_fetch_test_result_metrics_multi_test_serialize( + _param = self._filter_scheduled_tests_network_results_serialize( aid=aid, window=window, start_date=start_date, @@ -1264,13 +559,13 @@ class NetworkScheduledTestsResultsApi: @validate_call - def post_fetch_test_result_metrics_multi_test_with_http_info( + def filter_scheduled_tests_network_results_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, 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="(Optional) Maximum number of objects to return.")] = None, + max: Annotated[Optional[StrictInt], Field(description="(Optional) Maximum number of objects to return.")] = None, cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, multi_test_id_tests_data_rounds_search: Annotated[Optional[MultiTestIdTestsDataRoundsSearch], Field(description="Test data search filters.")] = None, _request_timeout: Union[ @@ -1299,7 +594,7 @@ class NetworkScheduledTestsResultsApi: :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: (Optional) Maximum number of objects to return. - :type max: float + :type max: int :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. :type cursor: str :param multi_test_id_tests_data_rounds_search: Test data search filters. @@ -1326,7 +621,7 @@ class NetworkScheduledTestsResultsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_fetch_test_result_metrics_multi_test_serialize( + _param = self._filter_scheduled_tests_network_results_serialize( aid=aid, window=window, start_date=start_date, @@ -1362,13 +657,13 @@ class NetworkScheduledTestsResultsApi: @validate_call - def post_fetch_test_result_metrics_multi_test_without_preload_content( + def filter_scheduled_tests_network_results_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, 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="(Optional) Maximum number of objects to return.")] = None, + max: Annotated[Optional[StrictInt], Field(description="(Optional) Maximum number of objects to return.")] = None, cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, multi_test_id_tests_data_rounds_search: Annotated[Optional[MultiTestIdTestsDataRoundsSearch], Field(description="Test data search filters.")] = None, _request_timeout: Union[ @@ -1397,7 +692,7 @@ class NetworkScheduledTestsResultsApi: :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: (Optional) Maximum number of objects to return. - :type max: float + :type max: int :param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. :type cursor: str :param multi_test_id_tests_data_rounds_search: Test data search filters. @@ -1424,7 +719,7 @@ class NetworkScheduledTestsResultsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_fetch_test_result_metrics_multi_test_serialize( + _param = self._filter_scheduled_tests_network_results_serialize( aid=aid, window=window, start_date=start_date, @@ -1454,7 +749,7 @@ class NetworkScheduledTestsResultsApi: return response_data.response - def _post_fetch_test_result_metrics_multi_test_serialize( + def _filter_scheduled_tests_network_results_serialize( self, aid, window, @@ -1536,6 +831,7 @@ class NetworkScheduledTestsResultsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1575,3 +871,713 @@ class NetworkScheduledTestsResultsApi: ) + + + @validate_call + def get_scheduled_test_path_vis_agent_round_results( + self, + test_id: Annotated[StrictStr, Field(description="Test ID")], + agent_id: Annotated[StrictStr, Field(description="Agent ID")], + round_id: Annotated[StrictStr, Field(description="Round ID")], + 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, + ) -> PathVisDetailTestResults: + """Retrieve path visualization network scheduled test results details + + Returns a hop-by-hop summary of the path trace data collected during path visualization. In each round, one path discovery attempt is made to reach the destination. The entire path is returned. A `roundId` must be specified. + + :param test_id: Test ID (required) + :type test_id: str + :param agent_id: Agent ID (required) + :type agent_id: str + :param round_id: Round ID (required) + :type round_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 + 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_scheduled_test_path_vis_agent_round_results_serialize( + test_id=test_id, + agent_id=agent_id, + round_id=round_id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PathVisDetailTestResults", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "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.endpoint_test_results.models, + ).data + + + @validate_call + def get_scheduled_test_path_vis_agent_round_results_with_http_info( + self, + test_id: Annotated[StrictStr, Field(description="Test ID")], + agent_id: Annotated[StrictStr, Field(description="Agent ID")], + round_id: Annotated[StrictStr, Field(description="Round ID")], + 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[PathVisDetailTestResults]: + """Retrieve path visualization network scheduled test results details + + Returns a hop-by-hop summary of the path trace data collected during path visualization. In each round, one path discovery attempt is made to reach the destination. The entire path is returned. A `roundId` must be specified. + + :param test_id: Test ID (required) + :type test_id: str + :param agent_id: Agent ID (required) + :type agent_id: str + :param round_id: Round ID (required) + :type round_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 + 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_scheduled_test_path_vis_agent_round_results_serialize( + test_id=test_id, + agent_id=agent_id, + round_id=round_id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PathVisDetailTestResults", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "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.endpoint_test_results.models, + ) + + + @validate_call + def get_scheduled_test_path_vis_agent_round_results_without_preload_content( + self, + test_id: Annotated[StrictStr, Field(description="Test ID")], + agent_id: Annotated[StrictStr, Field(description="Agent ID")], + round_id: Annotated[StrictStr, Field(description="Round ID")], + 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: + """Retrieve path visualization network scheduled test results details + + Returns a hop-by-hop summary of the path trace data collected during path visualization. In each round, one path discovery attempt is made to reach the destination. The entire path is returned. A `roundId` must be specified. + + :param test_id: Test ID (required) + :type test_id: str + :param agent_id: Agent ID (required) + :type agent_id: str + :param round_id: Round ID (required) + :type round_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 + 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_scheduled_test_path_vis_agent_round_results_serialize( + test_id=test_id, + agent_id=agent_id, + round_id=round_id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PathVisDetailTestResults", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_scheduled_test_path_vis_agent_round_results_serialize( + self, + test_id, + agent_id, + round_id, + 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 + if test_id is not None: + _path_params['testId'] = test_id + if agent_id is not None: + _path_params['agentId'] = agent_id + if round_id is not None: + _path_params['roundId'] = round_id + # 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='/v7/endpoint/test-results/scheduled-tests/{testId}/path-vis/agent/{agentId}/round/{roundId}', + 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_scheduled_test_path_vis_results( + self, + test_id: Annotated[StrictStr, Field(description="Test ID")], + 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, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = 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, + ) -> PathVisTestResults: + """Retrieve path visualization network scheduled test results + + Returns a summary of the path visualization data collected from each endpoint agent to the destination. In each path visualization attempt, one attempt is made to reach the destination. Each set of data is summarized, based on response time, number of hops, and response time to the target. A time frame must be specified, or the most recent round within last 2 hours is returned. + + :param test_id: Test ID (required) + :type test_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 cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: 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_scheduled_test_path_vis_results_serialize( + test_id=test_id, + aid=aid, + window=window, + start_date=start_date, + end_date=end_date, + cursor=cursor, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PathVisTestResults", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "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.endpoint_test_results.models, + ).data + + + @validate_call + def get_scheduled_test_path_vis_results_with_http_info( + self, + test_id: Annotated[StrictStr, Field(description="Test ID")], + 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, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = 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[PathVisTestResults]: + """Retrieve path visualization network scheduled test results + + Returns a summary of the path visualization data collected from each endpoint agent to the destination. In each path visualization attempt, one attempt is made to reach the destination. Each set of data is summarized, based on response time, number of hops, and response time to the target. A time frame must be specified, or the most recent round within last 2 hours is returned. + + :param test_id: Test ID (required) + :type test_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 cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: 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_scheduled_test_path_vis_results_serialize( + test_id=test_id, + aid=aid, + window=window, + start_date=start_date, + end_date=end_date, + cursor=cursor, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PathVisTestResults", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "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.endpoint_test_results.models, + ) + + + @validate_call + def get_scheduled_test_path_vis_results_without_preload_content( + self, + test_id: Annotated[StrictStr, Field(description="Test ID")], + 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, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = 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 path visualization network scheduled test results + + Returns a summary of the path visualization data collected from each endpoint agent to the destination. In each path visualization attempt, one attempt is made to reach the destination. Each set of data is summarized, based on response time, number of hops, and response time to the target. A time frame must be specified, or the most recent round within last 2 hours is returned. + + :param test_id: Test ID (required) + :type test_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 cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: 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_scheduled_test_path_vis_results_serialize( + test_id=test_id, + aid=aid, + window=window, + start_date=start_date, + end_date=end_date, + cursor=cursor, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PathVisTestResults", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_scheduled_test_path_vis_results_serialize( + self, + test_id, + aid, + window, + start_date, + end_date, + cursor, + _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 test_id is not None: + _path_params['testId'] = test_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 cursor is not None: + + _query_params.append(('cursor', cursor)) + + # 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='/v7/endpoint/test-results/scheduled-tests/{testId}/path-vis', + 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 + ) + + diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/api/real_user_tests_results_api.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/api/real_user_tests_results_api.py index 4db5badb..3b6f07e8 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/api/real_user_tests_results_api.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/api/real_user_tests_results_api.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -33,6 +33,7 @@ from thousandeyes_sdk.endpoint_test_results.models.real_user_test_page_results i from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class RealUserTestsResultsApi: @@ -45,1016 +46,12 @@ class RealUserTestsResultsApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @validate_call - def get_endpoint_real_user_test_details( - self, - id: Annotated[StrictStr, Field(description="The real user test id.")], - 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, - ) -> EndpointRealUserTestDetailResults: - """Retrieve endpoint real user test - - Provides details for an endpoint real user test. Returns a results array containing detailed information about endpoint real user tests.\" - - :param id: The real user test id. (required) - :type 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 - 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_endpoint_real_user_test_details_serialize( - id=id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "EndpointRealUserTestDetailResults", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "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.endpoint_test_results.models, - ).data - - - @validate_call - def get_endpoint_real_user_test_details_with_http_info( - self, - id: Annotated[StrictStr, Field(description="The real user test id.")], - 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[EndpointRealUserTestDetailResults]: - """Retrieve endpoint real user test - - Provides details for an endpoint real user test. Returns a results array containing detailed information about endpoint real user tests.\" - - :param id: The real user test id. (required) - :type 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 - 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_endpoint_real_user_test_details_serialize( - id=id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "EndpointRealUserTestDetailResults", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "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.endpoint_test_results.models, - ) - - - @validate_call - def get_endpoint_real_user_test_details_without_preload_content( - self, - id: Annotated[StrictStr, Field(description="The real user test id.")], - 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: - """Retrieve endpoint real user test - - Provides details for an endpoint real user test. Returns a results array containing detailed information about endpoint real user tests.\" - - :param id: The real user test id. (required) - :type 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 - 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_endpoint_real_user_test_details_serialize( - id=id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "EndpointRealUserTestDetailResults", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_endpoint_real_user_test_details_serialize( - self, - id, - 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 - if id is not None: - _path_params['id'] = id - # 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/problem+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v7/endpoint/test-results/real-user-tests/{id}', - 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_endpoint_real_user_test_pages_details( - self, - id: Annotated[StrictStr, Field(description="The real user test id.")], - page_id: Annotated[StrictStr, Field(description="Web page ID")], - 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, - ) -> RealUserTestPageDetailResult: - """Retrieve endpoint real user test page - - Returns details for endpoint real user test web page request. Provides complete waterfall information with all object requests. Sends back detailed endpoint real user test web page request. Returned object has a single field: `har` which is an HAR object according to the HTTP Archive 1.2 specifications. [You can read more about the specification](http://www.softwareishard.com/blog/har-12-spec/). In addition to standard fields, the object har includes a custom property `systemMetrics` which contain metrics about CPU and physical memory usage. Check `SystemMetrics` on schemas tab for more information. - - :param id: The real user test id. (required) - :type id: str - :param page_id: Web page ID (required) - :type page_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 - 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_endpoint_real_user_test_pages_details_serialize( - id=id, - page_id=page_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "RealUserTestPageDetailResult", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "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.endpoint_test_results.models, - ).data - - - @validate_call - def get_endpoint_real_user_test_pages_details_with_http_info( - self, - id: Annotated[StrictStr, Field(description="The real user test id.")], - page_id: Annotated[StrictStr, Field(description="Web page ID")], - 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[RealUserTestPageDetailResult]: - """Retrieve endpoint real user test page - - Returns details for endpoint real user test web page request. Provides complete waterfall information with all object requests. Sends back detailed endpoint real user test web page request. Returned object has a single field: `har` which is an HAR object according to the HTTP Archive 1.2 specifications. [You can read more about the specification](http://www.softwareishard.com/blog/har-12-spec/). In addition to standard fields, the object har includes a custom property `systemMetrics` which contain metrics about CPU and physical memory usage. Check `SystemMetrics` on schemas tab for more information. - - :param id: The real user test id. (required) - :type id: str - :param page_id: Web page ID (required) - :type page_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 - 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_endpoint_real_user_test_pages_details_serialize( - id=id, - page_id=page_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "RealUserTestPageDetailResult", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "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.endpoint_test_results.models, - ) - - - @validate_call - def get_endpoint_real_user_test_pages_details_without_preload_content( - self, - id: Annotated[StrictStr, Field(description="The real user test id.")], - page_id: Annotated[StrictStr, Field(description="Web page ID")], - 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: - """Retrieve endpoint real user test page - - Returns details for endpoint real user test web page request. Provides complete waterfall information with all object requests. Sends back detailed endpoint real user test web page request. Returned object has a single field: `har` which is an HAR object according to the HTTP Archive 1.2 specifications. [You can read more about the specification](http://www.softwareishard.com/blog/har-12-spec/). In addition to standard fields, the object har includes a custom property `systemMetrics` which contain metrics about CPU and physical memory usage. Check `SystemMetrics` on schemas tab for more information. - - :param id: The real user test id. (required) - :type id: str - :param page_id: Web page ID (required) - :type page_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 - 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_endpoint_real_user_test_pages_details_serialize( - id=id, - page_id=page_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "RealUserTestPageDetailResult", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_endpoint_real_user_test_pages_details_serialize( - self, - id, - page_id, - 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 - if id is not None: - _path_params['id'] = id - if page_id is not None: - _path_params['pageId'] = page_id - # 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/problem+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v7/endpoint/test-results/real-user-tests/{id}/pages/{pageId}', - 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_endpoint_real_user_tests( - 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, - 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, - cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, - endpoint_real_user_test_results_request: Optional[EndpointRealUserTestResultsRequest] = 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, - ) -> EndpointRealUserTestResults: - """List endpoint real user tests - - Returns a list of all endpoint real user tests. Results from the last round are provided unless an explicit start and end is provided with `startDate`, `endDate` or `window` optional parameters. ## Request body filters This endpoint supports complex filtering using the request body. It is important these filters remain unaltered when making use of pagination, otherwise the results will not be coherent with the original request. ### Multiple filter fields When multiple filter fields are provided, a logical `AND` is applied between the filters. ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/real-user-tests/filter' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"platform\": [ \"mac\" ], \"domain\": [ \"thousandeyes.com\" ] }}' ``` ### Filter field with multiple values When a filter field contains multiple values, a logical `OR` is applied between the filter values. ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/real-user-tests/filter' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"networkId\": [ \"660b34109d12\", \"660b34109d15\" ] } }' ``` ### Combination of request parameters and body filters ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/real-user-tests/filter?window=1w' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"platform\": [ \"mac\" ], \"domain\": [ \"thousandeyes.com\" ], \"networkId\": [ \"660b34109d12\", \"660b34109d15\" ] } }' ``` Returns a `results` array of endpoint real user tests. Either the latest results, or based on the time range and body filters specified. - - :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 cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. - :type cursor: str - :param endpoint_real_user_test_results_request: - :type endpoint_real_user_test_results_request: EndpointRealUserTestResultsRequest - :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_endpoint_real_user_tests_serialize( - aid=aid, - window=window, - start_date=start_date, - end_date=end_date, - cursor=cursor, - endpoint_real_user_test_results_request=endpoint_real_user_test_results_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "EndpointRealUserTestResults", - '400': "ValidationError", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "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.endpoint_test_results.models, - ).data - - - @validate_call - def get_endpoint_real_user_tests_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, - 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, - cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, - endpoint_real_user_test_results_request: Optional[EndpointRealUserTestResultsRequest] = 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[EndpointRealUserTestResults]: - """List endpoint real user tests - - Returns a list of all endpoint real user tests. Results from the last round are provided unless an explicit start and end is provided with `startDate`, `endDate` or `window` optional parameters. ## Request body filters This endpoint supports complex filtering using the request body. It is important these filters remain unaltered when making use of pagination, otherwise the results will not be coherent with the original request. ### Multiple filter fields When multiple filter fields are provided, a logical `AND` is applied between the filters. ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/real-user-tests/filter' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"platform\": [ \"mac\" ], \"domain\": [ \"thousandeyes.com\" ] }}' ``` ### Filter field with multiple values When a filter field contains multiple values, a logical `OR` is applied between the filter values. ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/real-user-tests/filter' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"networkId\": [ \"660b34109d12\", \"660b34109d15\" ] } }' ``` ### Combination of request parameters and body filters ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/real-user-tests/filter?window=1w' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"platform\": [ \"mac\" ], \"domain\": [ \"thousandeyes.com\" ], \"networkId\": [ \"660b34109d12\", \"660b34109d15\" ] } }' ``` Returns a `results` array of endpoint real user tests. Either the latest results, or based on the time range and body filters specified. - - :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 cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. - :type cursor: str - :param endpoint_real_user_test_results_request: - :type endpoint_real_user_test_results_request: EndpointRealUserTestResultsRequest - :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_endpoint_real_user_tests_serialize( - aid=aid, - window=window, - start_date=start_date, - end_date=end_date, - cursor=cursor, - endpoint_real_user_test_results_request=endpoint_real_user_test_results_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "EndpointRealUserTestResults", - '400': "ValidationError", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "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.endpoint_test_results.models, - ) - - - @validate_call - def get_endpoint_real_user_tests_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, - 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, - cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, - endpoint_real_user_test_results_request: Optional[EndpointRealUserTestResultsRequest] = 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 endpoint real user tests - - Returns a list of all endpoint real user tests. Results from the last round are provided unless an explicit start and end is provided with `startDate`, `endDate` or `window` optional parameters. ## Request body filters This endpoint supports complex filtering using the request body. It is important these filters remain unaltered when making use of pagination, otherwise the results will not be coherent with the original request. ### Multiple filter fields When multiple filter fields are provided, a logical `AND` is applied between the filters. ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/real-user-tests/filter' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"platform\": [ \"mac\" ], \"domain\": [ \"thousandeyes.com\" ] }}' ``` ### Filter field with multiple values When a filter field contains multiple values, a logical `OR` is applied between the filter values. ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/real-user-tests/filter' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"networkId\": [ \"660b34109d12\", \"660b34109d15\" ] } }' ``` ### Combination of request parameters and body filters ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/real-user-tests/filter?window=1w' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"platform\": [ \"mac\" ], \"domain\": [ \"thousandeyes.com\" ], \"networkId\": [ \"660b34109d12\", \"660b34109d15\" ] } }' ``` Returns a `results` array of endpoint real user tests. Either the latest results, or based on the time range and body filters specified. - - :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 cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. - :type cursor: str - :param endpoint_real_user_test_results_request: - :type endpoint_real_user_test_results_request: EndpointRealUserTestResultsRequest - :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_endpoint_real_user_tests_serialize( - aid=aid, - window=window, - start_date=start_date, - end_date=end_date, - cursor=cursor, - endpoint_real_user_test_results_request=endpoint_real_user_test_results_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "EndpointRealUserTestResults", - '400': "ValidationError", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_endpoint_real_user_tests_serialize( - self, - aid, - window, - start_date, - end_date, - cursor, - endpoint_real_user_test_results_request, - _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)) - - 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 cursor is not None: - - _query_params.append(('cursor', cursor)) - - # process the header parameters - # process the form parameters - # process the body parameter - if endpoint_real_user_test_results_request is not None: - _body_params = endpoint_real_user_test_results_request - - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/hal+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] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/v7/endpoint/test-results/real-user-tests/filter', - 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_endpoint_real_user_tests_network( + def filter_real_user_tests_network_results( 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, 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, @@ -1113,7 +110,7 @@ class RealUserTestsResultsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_endpoint_real_user_tests_network_serialize( + _param = self._filter_real_user_tests_network_results_serialize( aid=aid, window=window, start_date=start_date, @@ -1149,7 +146,7 @@ class RealUserTestsResultsApi: @validate_call - def get_endpoint_real_user_tests_network_with_http_info( + def filter_real_user_tests_network_results_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, 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, @@ -1208,7 +205,7 @@ class RealUserTestsResultsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_endpoint_real_user_tests_network_serialize( + _param = self._filter_real_user_tests_network_results_serialize( aid=aid, window=window, start_date=start_date, @@ -1244,7 +241,7 @@ class RealUserTestsResultsApi: @validate_call - def get_endpoint_real_user_tests_network_without_preload_content( + def filter_real_user_tests_network_results_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, 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, @@ -1303,7 +300,7 @@ class RealUserTestsResultsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_endpoint_real_user_tests_network_serialize( + _param = self._filter_real_user_tests_network_results_serialize( aid=aid, window=window, start_date=start_date, @@ -1333,7 +330,7 @@ class RealUserTestsResultsApi: return response_data.response - def _get_endpoint_real_user_tests_network_serialize( + def _filter_real_user_tests_network_results_serialize( self, aid, window, @@ -1410,6 +407,7 @@ class RealUserTestsResultsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1452,7 +450,406 @@ class RealUserTestsResultsApi: @validate_call - def get_endpoint_real_user_tests_pages( + def filter_real_user_tests_results( + 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, + 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, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, + endpoint_real_user_test_results_request: Optional[EndpointRealUserTestResultsRequest] = 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, + ) -> EndpointRealUserTestResults: + """List endpoint real user tests + + Returns a list of all endpoint real user tests. Results from the last round are provided unless an explicit start and end is provided with `startDate`, `endDate` or `window` optional parameters. ## Request body filters This endpoint supports complex filtering using the request body. It is important these filters remain unaltered when making use of pagination, otherwise the results will not be coherent with the original request. ### Multiple filter fields When multiple filter fields are provided, a logical `AND` is applied between the filters. ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/real-user-tests/filter' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"platform\": [ \"mac\" ], \"domain\": [ \"thousandeyes.com\" ] }}' ``` ### Filter field with multiple values When a filter field contains multiple values, a logical `OR` is applied between the filter values. ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/real-user-tests/filter' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"networkId\": [ \"660b34109d12\", \"660b34109d15\" ] } }' ``` ### Combination of request parameters and body filters ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/real-user-tests/filter?window=1w' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"platform\": [ \"mac\" ], \"domain\": [ \"thousandeyes.com\" ], \"networkId\": [ \"660b34109d12\", \"660b34109d15\" ] } }' ``` Returns a `results` array of endpoint real user tests. Either the latest results, or based on the time range and body filters specified. + + :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 cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: str + :param endpoint_real_user_test_results_request: + :type endpoint_real_user_test_results_request: EndpointRealUserTestResultsRequest + :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._filter_real_user_tests_results_serialize( + aid=aid, + window=window, + start_date=start_date, + end_date=end_date, + cursor=cursor, + endpoint_real_user_test_results_request=endpoint_real_user_test_results_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EndpointRealUserTestResults", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "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.endpoint_test_results.models, + ).data + + + @validate_call + def filter_real_user_tests_results_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, + 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, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, + endpoint_real_user_test_results_request: Optional[EndpointRealUserTestResultsRequest] = 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[EndpointRealUserTestResults]: + """List endpoint real user tests + + Returns a list of all endpoint real user tests. Results from the last round are provided unless an explicit start and end is provided with `startDate`, `endDate` or `window` optional parameters. ## Request body filters This endpoint supports complex filtering using the request body. It is important these filters remain unaltered when making use of pagination, otherwise the results will not be coherent with the original request. ### Multiple filter fields When multiple filter fields are provided, a logical `AND` is applied between the filters. ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/real-user-tests/filter' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"platform\": [ \"mac\" ], \"domain\": [ \"thousandeyes.com\" ] }}' ``` ### Filter field with multiple values When a filter field contains multiple values, a logical `OR` is applied between the filter values. ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/real-user-tests/filter' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"networkId\": [ \"660b34109d12\", \"660b34109d15\" ] } }' ``` ### Combination of request parameters and body filters ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/real-user-tests/filter?window=1w' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"platform\": [ \"mac\" ], \"domain\": [ \"thousandeyes.com\" ], \"networkId\": [ \"660b34109d12\", \"660b34109d15\" ] } }' ``` Returns a `results` array of endpoint real user tests. Either the latest results, or based on the time range and body filters specified. + + :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 cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: str + :param endpoint_real_user_test_results_request: + :type endpoint_real_user_test_results_request: EndpointRealUserTestResultsRequest + :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._filter_real_user_tests_results_serialize( + aid=aid, + window=window, + start_date=start_date, + end_date=end_date, + cursor=cursor, + endpoint_real_user_test_results_request=endpoint_real_user_test_results_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EndpointRealUserTestResults", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "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.endpoint_test_results.models, + ) + + + @validate_call + def filter_real_user_tests_results_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, + 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, + cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None, + endpoint_real_user_test_results_request: Optional[EndpointRealUserTestResultsRequest] = 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 endpoint real user tests + + Returns a list of all endpoint real user tests. Results from the last round are provided unless an explicit start and end is provided with `startDate`, `endDate` or `window` optional parameters. ## Request body filters This endpoint supports complex filtering using the request body. It is important these filters remain unaltered when making use of pagination, otherwise the results will not be coherent with the original request. ### Multiple filter fields When multiple filter fields are provided, a logical `AND` is applied between the filters. ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/real-user-tests/filter' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"platform\": [ \"mac\" ], \"domain\": [ \"thousandeyes.com\" ] }}' ``` ### Filter field with multiple values When a filter field contains multiple values, a logical `OR` is applied between the filter values. ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/real-user-tests/filter' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"networkId\": [ \"660b34109d12\", \"660b34109d15\" ] } }' ``` ### Combination of request parameters and body filters ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/real-user-tests/filter?window=1w' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"platform\": [ \"mac\" ], \"domain\": [ \"thousandeyes.com\" ], \"networkId\": [ \"660b34109d12\", \"660b34109d15\" ] } }' ``` Returns a `results` array of endpoint real user tests. Either the latest results, or based on the time range and body filters specified. + + :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 cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. + :type cursor: str + :param endpoint_real_user_test_results_request: + :type endpoint_real_user_test_results_request: EndpointRealUserTestResultsRequest + :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._filter_real_user_tests_results_serialize( + aid=aid, + window=window, + start_date=start_date, + end_date=end_date, + cursor=cursor, + endpoint_real_user_test_results_request=endpoint_real_user_test_results_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EndpointRealUserTestResults", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _filter_real_user_tests_results_serialize( + self, + aid, + window, + start_date, + end_date, + cursor, + endpoint_real_user_test_results_request, + _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)) + + 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 cursor is not None: + + _query_params.append(('cursor', cursor)) + + # process the header parameters + # process the form parameters + # process the body parameter + if endpoint_real_user_test_results_request is not None: + _body_params = endpoint_real_user_test_results_request + + + # 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] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v7/endpoint/test-results/real-user-tests/filter', + 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 filter_real_user_tests_visited_pages_results( 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, 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, @@ -1511,7 +908,7 @@ class RealUserTestsResultsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_endpoint_real_user_tests_pages_serialize( + _param = self._filter_real_user_tests_visited_pages_results_serialize( aid=aid, window=window, start_date=start_date, @@ -1547,7 +944,7 @@ class RealUserTestsResultsApi: @validate_call - def get_endpoint_real_user_tests_pages_with_http_info( + def filter_real_user_tests_visited_pages_results_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, 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, @@ -1606,7 +1003,7 @@ class RealUserTestsResultsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_endpoint_real_user_tests_pages_serialize( + _param = self._filter_real_user_tests_visited_pages_results_serialize( aid=aid, window=window, start_date=start_date, @@ -1642,7 +1039,7 @@ class RealUserTestsResultsApi: @validate_call - def get_endpoint_real_user_tests_pages_without_preload_content( + def filter_real_user_tests_visited_pages_results_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, 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, @@ -1701,7 +1098,7 @@ class RealUserTestsResultsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_endpoint_real_user_tests_pages_serialize( + _param = self._filter_real_user_tests_visited_pages_results_serialize( aid=aid, window=window, start_date=start_date, @@ -1731,7 +1128,7 @@ class RealUserTestsResultsApi: return response_data.response - def _get_endpoint_real_user_tests_pages_serialize( + def _filter_real_user_tests_visited_pages_results_serialize( self, aid, window, @@ -1808,6 +1205,7 @@ class RealUserTestsResultsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1847,3 +1245,612 @@ class RealUserTestsResultsApi: ) + + + @validate_call + def get_real_user_test_page_results( + self, + id: Annotated[StrictStr, Field(description="The real user test id.")], + page_id: Annotated[StrictStr, Field(description="Web page ID")], + 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, + ) -> RealUserTestPageDetailResult: + """Retrieve endpoint real user test page + + Returns details for endpoint real user test web page request. Provides complete waterfall information with all object requests. Sends back detailed endpoint real user test web page request. Returned object has a single field: `har` which is an HAR object according to the HTTP Archive 1.2 specifications. [You can read more about the specification](http://www.softwareishard.com/blog/har-12-spec/). In addition to standard fields, the object har includes a custom property `systemMetrics` which contain metrics about CPU and physical memory usage. Check `SystemMetrics` on schemas tab for more information. + + :param id: The real user test id. (required) + :type id: str + :param page_id: Web page ID (required) + :type page_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 + 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_real_user_test_page_results_serialize( + id=id, + page_id=page_id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RealUserTestPageDetailResult", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "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.endpoint_test_results.models, + ).data + + + @validate_call + def get_real_user_test_page_results_with_http_info( + self, + id: Annotated[StrictStr, Field(description="The real user test id.")], + page_id: Annotated[StrictStr, Field(description="Web page ID")], + 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[RealUserTestPageDetailResult]: + """Retrieve endpoint real user test page + + Returns details for endpoint real user test web page request. Provides complete waterfall information with all object requests. Sends back detailed endpoint real user test web page request. Returned object has a single field: `har` which is an HAR object according to the HTTP Archive 1.2 specifications. [You can read more about the specification](http://www.softwareishard.com/blog/har-12-spec/). In addition to standard fields, the object har includes a custom property `systemMetrics` which contain metrics about CPU and physical memory usage. Check `SystemMetrics` on schemas tab for more information. + + :param id: The real user test id. (required) + :type id: str + :param page_id: Web page ID (required) + :type page_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 + 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_real_user_test_page_results_serialize( + id=id, + page_id=page_id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RealUserTestPageDetailResult", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "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.endpoint_test_results.models, + ) + + + @validate_call + def get_real_user_test_page_results_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="The real user test id.")], + page_id: Annotated[StrictStr, Field(description="Web page ID")], + 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: + """Retrieve endpoint real user test page + + Returns details for endpoint real user test web page request. Provides complete waterfall information with all object requests. Sends back detailed endpoint real user test web page request. Returned object has a single field: `har` which is an HAR object according to the HTTP Archive 1.2 specifications. [You can read more about the specification](http://www.softwareishard.com/blog/har-12-spec/). In addition to standard fields, the object har includes a custom property `systemMetrics` which contain metrics about CPU and physical memory usage. Check `SystemMetrics` on schemas tab for more information. + + :param id: The real user test id. (required) + :type id: str + :param page_id: Web page ID (required) + :type page_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 + 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_real_user_test_page_results_serialize( + id=id, + page_id=page_id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RealUserTestPageDetailResult", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_real_user_test_page_results_serialize( + self, + id, + page_id, + 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 + if id is not None: + _path_params['id'] = id + if page_id is not None: + _path_params['pageId'] = page_id + # 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='/v7/endpoint/test-results/real-user-tests/{id}/pages/{pageId}', + 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_real_user_test_results( + self, + id: Annotated[StrictStr, Field(description="The real user test id.")], + 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, + ) -> EndpointRealUserTestDetailResults: + """Retrieve endpoint real user test + + Provides details for an endpoint real user test. Returns a results array containing detailed information about endpoint real user tests.\" + + :param id: The real user test id. (required) + :type 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 + 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_real_user_test_results_serialize( + id=id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EndpointRealUserTestDetailResults", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "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.endpoint_test_results.models, + ).data + + + @validate_call + def get_real_user_test_results_with_http_info( + self, + id: Annotated[StrictStr, Field(description="The real user test id.")], + 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[EndpointRealUserTestDetailResults]: + """Retrieve endpoint real user test + + Provides details for an endpoint real user test. Returns a results array containing detailed information about endpoint real user tests.\" + + :param id: The real user test id. (required) + :type 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 + 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_real_user_test_results_serialize( + id=id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EndpointRealUserTestDetailResults", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "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.endpoint_test_results.models, + ) + + + @validate_call + def get_real_user_test_results_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="The real user test id.")], + 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: + """Retrieve endpoint real user test + + Provides details for an endpoint real user test. Returns a results array containing detailed information about endpoint real user tests.\" + + :param id: The real user test id. (required) + :type 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 + 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_real_user_test_results_serialize( + id=id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EndpointRealUserTestDetailResults", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_real_user_test_results_serialize( + self, + id, + 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 + if id is not None: + _path_params['id'] = id + # 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='/v7/endpoint/test-results/real-user-tests/{id}', + 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 + ) + + diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/api/web_http_server_scheduled_test_results_api.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/api/web_http_server_scheduled_test_results_api.py index 880c6473..291b8092 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/api/web_http_server_scheduled_test_results_api.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/api/web_http_server_scheduled_test_results_api.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -28,6 +28,7 @@ from thousandeyes_sdk.endpoint_test_results.models.http_test_results import Http from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class WebHTTPServerScheduledTestResultsApi: @@ -40,11 +41,12 @@ class WebHTTPServerScheduledTestResultsApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @validate_call - def get_test_result_http_server( + def get_http_server_scheduled_test_results( self, test_id: Annotated[StrictStr, Field(description="Test ID")], 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, @@ -106,7 +108,7 @@ class WebHTTPServerScheduledTestResultsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_result_http_server_serialize( + _param = self._get_http_server_scheduled_test_results_serialize( test_id=test_id, aid=aid, window=window, @@ -142,7 +144,7 @@ class WebHTTPServerScheduledTestResultsApi: @validate_call - def get_test_result_http_server_with_http_info( + def get_http_server_scheduled_test_results_with_http_info( self, test_id: Annotated[StrictStr, Field(description="Test ID")], 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, @@ -204,7 +206,7 @@ class WebHTTPServerScheduledTestResultsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_result_http_server_serialize( + _param = self._get_http_server_scheduled_test_results_serialize( test_id=test_id, aid=aid, window=window, @@ -240,7 +242,7 @@ class WebHTTPServerScheduledTestResultsApi: @validate_call - def get_test_result_http_server_without_preload_content( + def get_http_server_scheduled_test_results_without_preload_content( self, test_id: Annotated[StrictStr, Field(description="Test ID")], 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, @@ -302,7 +304,7 @@ class WebHTTPServerScheduledTestResultsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_result_http_server_serialize( + _param = self._get_http_server_scheduled_test_results_serialize( test_id=test_id, aid=aid, window=window, @@ -332,7 +334,7 @@ class WebHTTPServerScheduledTestResultsApi: return response_data.response - def _get_test_result_http_server_serialize( + def _get_http_server_scheduled_test_results_serialize( self, test_id, aid, @@ -415,6 +417,7 @@ class WebHTTPServerScheduledTestResultsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/__init__.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/__init__.py index 92102f76..950f02cb 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/__init__.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/__init__.py @@ -6,7 +6,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -138,6 +138,7 @@ from thousandeyes_sdk.endpoint_test_results.models.threshold_filter_operator imp from thousandeyes_sdk.endpoint_test_results.models.traceroute import Traceroute from thousandeyes_sdk.endpoint_test_results.models.traceroute_hop import TracerouteHop from thousandeyes_sdk.endpoint_test_results.models.trigger import Trigger +from thousandeyes_sdk.endpoint_test_results.models.udp_probe_mode_response import UdpProbeModeResponse from thousandeyes_sdk.endpoint_test_results.models.unauthorized_error import UnauthorizedError from thousandeyes_sdk.endpoint_test_results.models.validation_error import ValidationError from thousandeyes_sdk.endpoint_test_results.models.validation_error_item import ValidationErrorItem diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/alert_direction.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/alert_direction.py index 44346bae..5f747e74 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/alert_direction.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/alert_direction.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/alert_rounds_violation_mode.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/alert_rounds_violation_mode.py index 5ba57b74..5856b10e 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/alert_rounds_violation_mode.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/alert_rounds_violation_mode.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/alert_rule.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/alert_rule.py index b6e7b80a..7c2a7354 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/alert_rule.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/alert_rule.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -48,6 +48,7 @@ class AlertRule(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -58,7 +59,7 @@ class AlertRule(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/alert_type.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/alert_type.py index 732edbe7..065ffd9f 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/alert_type.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/alert_type.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/application_score_quality.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/application_score_quality.py index 0919933e..2b2baccf 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/application_score_quality.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/application_score_quality.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/asn_details.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/asn_details.py index 9536e359..5a335402 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/asn_details.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/asn_details.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,8 +17,8 @@ import pprint import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union +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 @@ -27,13 +27,14 @@ class AsnDetails(BaseModel): AsnDetails """ # noqa: E501 as_name: Optional[StrictStr] = Field(default=None, description="Name of the provider.", alias="asName") - as_number: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Unique number assigned to an organization (also referred to as service provider).", alias="asNumber") + as_number: Optional[StrictInt] = Field(default=None, description="Unique number assigned to an organization (also referred to as service provider).", alias="asNumber") __properties: ClassVar[List[str]] = ["asName", "asNumber"] model_config = ConfigDict( populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class AsnDetails(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/conditional_operator.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/conditional_operator.py index 51b6d635..361c7c39 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/conditional_operator.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/conditional_operator.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/cpu_utilization.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/cpu_utilization.py index 6f5d4e7d..0df4b672 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/cpu_utilization.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/cpu_utilization.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,7 +17,7 @@ import pprint import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from pydantic import BaseModel, ConfigDict, Field, StrictInt from typing import Any, ClassVar, Dict, List, Optional, Union from typing_extensions import Annotated from typing import Optional, Set @@ -32,13 +32,14 @@ class CpuUtilization(BaseModel): mean: Optional[Union[Annotated[float, Field(le=1.0, strict=True, ge=0.0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = Field(default=None, description="The mean (average) sampled usage value recorded during the monitored period.") median: Optional[Union[Annotated[float, Field(le=1.0, strict=True, ge=0.0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = Field(default=None, description="The median sampled usage value recorded during the monitored period.") std_dev: Optional[Union[Annotated[float, Field(le=1.0, strict=True, ge=0.0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = Field(default=None, description="The standard deviation of sampled usage values recorded during the monitored period.", alias="stdDev") - count: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The total number of samples collected during the monitored period.") + count: Optional[StrictInt] = Field(default=None, description="The total number of samples collected during the monitored period.") __properties: ClassVar[List[str]] = ["min", "max", "mean", "median", "stdDev", "count"] model_config = ConfigDict( populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -49,7 +50,7 @@ class CpuUtilization(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/dynamic_base_test_result.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/dynamic_base_test_result.py index 53727f67..fdaea84c 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/dynamic_base_test_result.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/dynamic_base_test_result.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -20,6 +20,9 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional from thousandeyes_sdk.endpoint_test_results.models.dynamic_test_webex import DynamicTestWebex +from thousandeyes_sdk.endpoint_test_results.models.endpoint_test_protocol import EndpointTestProtocol +from thousandeyes_sdk.endpoint_test_results.models.test_probe_mode_response import TestProbeModeResponse +from thousandeyes_sdk.endpoint_test_results.models.udp_probe_mode_response import UdpProbeModeResponse from typing import Optional, Set from typing_extensions import Self @@ -28,13 +31,17 @@ class DynamicBaseTestResult(BaseModel): DynamicBaseTestResult """ # noqa: E501 application: Optional[StrictStr] = Field(default=None, description="Which supported application to monitor, can be one of `webex`, `zoom`, `microsoft-teams`.") + protocol: Optional[EndpointTestProtocol] = None + tcp_probe_mode: Optional[TestProbeModeResponse] = Field(default=None, alias="tcpProbeMode") + udp_probe_mode: Optional[UdpProbeModeResponse] = Field(default=None, alias="udpProbeMode") webex: Optional[DynamicTestWebex] = None - __properties: ClassVar[List[str]] = ["application", "webex"] + __properties: ClassVar[List[str]] = ["application", "protocol", "tcpProbeMode", "udpProbeMode", "webex"] model_config = ConfigDict( populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +52,7 @@ class DynamicBaseTestResult(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -86,6 +93,9 @@ class DynamicBaseTestResult(BaseModel): _obj = cls.model_validate({ "application": obj.get("application"), + "protocol": obj.get("protocol"), + "tcpProbeMode": obj.get("tcpProbeMode"), + "udpProbeMode": obj.get("udpProbeMode"), "webex": DynamicTestWebex.from_dict(obj["webex"]) if obj.get("webex") is not None else None }) return _obj diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/dynamic_test.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/dynamic_test.py index e341478b..97ff48e3 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/dynamic_test.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/dynamic_test.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -56,6 +56,7 @@ class DynamicTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -66,7 +67,7 @@ class DynamicTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/dynamic_test_links.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/dynamic_test_links.py index ad48b366..bf279061 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/dynamic_test_links.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/dynamic_test_links.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class DynamicTestLinks(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class DynamicTestLinks(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/dynamic_test_self_link.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/dynamic_test_self_link.py index 4082574f..2943aeee 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/dynamic_test_self_link.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/dynamic_test_self_link.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -40,6 +40,7 @@ class DynamicTestSelfLink(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -50,7 +51,7 @@ class DynamicTestSelfLink(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/dynamic_test_webex.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/dynamic_test_webex.py index 63639671..a8807277 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/dynamic_test_webex.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/dynamic_test_webex.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class DynamicTestWebex(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class DynamicTestWebex(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/dynamic_tests_data_round_search.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/dynamic_tests_data_round_search.py index 9c455a95..3bb7259e 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/dynamic_tests_data_round_search.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/dynamic_tests_data_round_search.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -38,6 +38,7 @@ class DynamicTestsDataRoundSearch(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -48,7 +49,7 @@ class DynamicTestsDataRoundSearch(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/dynamic_tests_data_search_filter.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/dynamic_tests_data_search_filter.py index b1cb8b55..20849732 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/dynamic_tests_data_search_filter.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/dynamic_tests_data_search_filter.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class DynamicTestsDataSearchFilter(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class DynamicTestsDataSearchFilter(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_agent_labels_selector_config.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_agent_labels_selector_config.py index 4c63a6f2..5eaf3f3d 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_agent_labels_selector_config.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_agent_labels_selector_config.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -43,6 +43,7 @@ class EndpointAgentLabelsSelectorConfig(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -53,7 +54,7 @@ class EndpointAgentLabelsSelectorConfig(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_agent_selector_config.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_agent_selector_config.py index 33f43692..9f104f1b 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_agent_selector_config.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_agent_selector_config.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -20,7 +20,7 @@ from typing import Any, List, Optional from thousandeyes_sdk.endpoint_test_results.models.endpoint_agent_labels_selector_config import EndpointAgentLabelsSelectorConfig from thousandeyes_sdk.endpoint_test_results.models.endpoint_all_agents_selector_config import EndpointAllAgentsSelectorConfig from thousandeyes_sdk.endpoint_test_results.models.endpoint_specific_agents_selector_config import EndpointSpecificAgentsSelectorConfig -from pydantic import StrictStr, Field +from pydantic import StrictStr, Field, model_serializer from typing import Union, List, Set, Optional, Dict from typing_extensions import Literal, Self @@ -126,6 +126,10 @@ class EndpointAgentSelectorConfig(BaseModel): 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: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_agent_to_server_test.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_agent_to_server_test.py index 34e72e8e..892cc262 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_agent_to_server_test.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_agent_to_server_test.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -67,6 +67,7 @@ class EndpointAgentToServerTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -77,7 +78,7 @@ class EndpointAgentToServerTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_all_agents_selector_config.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_all_agents_selector_config.py index 826b1afd..83f6404c 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_all_agents_selector_config.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_all_agents_selector_config.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -42,6 +42,7 @@ class EndpointAllAgentsSelectorConfig(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -52,7 +53,7 @@ class EndpointAllAgentsSelectorConfig(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_browser.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_browser.py index 8ea57543..da573b26 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_browser.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_browser.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class EndpointBrowser(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class EndpointBrowser(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_http_data_point_score.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_http_data_point_score.py index d5f254da..3a5c3750 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_http_data_point_score.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_http_data_point_score.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class EndpointHttpDataPointScore(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class EndpointHttpDataPointScore(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_http_server_base_test.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_http_server_base_test.py index 8a28d662..fe456de3 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_http_server_base_test.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_http_server_base_test.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -45,6 +45,7 @@ class EndpointHttpServerBaseTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -55,7 +56,7 @@ class EndpointHttpServerBaseTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_http_server_test.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_http_server_test.py index 3eb0b0ef..1722139e 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_http_server_test.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_http_server_test.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -62,7 +62,7 @@ class EndpointHttpServerTest(BaseModel): ssl_version_id: Optional[TestSslVersionId] = Field(default=None, alias="sslVersionId") verify_certificate: Optional[StrictBool] = Field(default=None, description="Flag indicating if a certificate should be verified.", alias="verifyCertificate") content_regex: Optional[StrictStr] = Field(default=None, description="Content regex, this field does not require escaping.", alias="contentRegex") - follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to false.", alias="followRedirects") + follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`.", alias="followRedirects") http_target_time: Optional[Annotated[int, Field(le=5000, strict=True, ge=100)]] = Field(default=None, description="Target time for HTTP server completion, specified in milliseconds.", alias="httpTargetTime") http_version: Optional[Annotated[int, Field(le=2, strict=True, ge=1)]] = Field(default=2, description="HTTP protocol version. Set to '2' to prefer HTTP/2, or '1' to use only HTTP/1.1.", alias="httpVersion") post_body: Optional[StrictStr] = Field(default=None, description="Enter the body for the HTTP POST request in this field. No special escaping is necessary. If the post body is provided with content, the `requestMethod` is automatically set to POST.", alias="postBody") @@ -83,6 +83,7 @@ class EndpointHttpServerTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -93,7 +94,7 @@ class EndpointHttpServerTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_network_topology_result_request.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_network_topology_result_request.py index 5a021127..eae7d7d2 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_network_topology_result_request.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_network_topology_result_request.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class EndpointNetworkTopologyResultRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class EndpointNetworkTopologyResultRequest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_network_topology_result_request_filter.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_network_topology_result_request_filter.py index 88039dbd..4cfee312 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_network_topology_result_request_filter.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_network_topology_result_request_filter.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -46,6 +46,7 @@ class EndpointNetworkTopologyResultRequestFilter(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -56,7 +57,7 @@ class EndpointNetworkTopologyResultRequestFilter(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_ping_data_point_score.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_ping_data_point_score.py index f2795543..c5640585 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_ping_data_point_score.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_ping_data_point_score.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class EndpointPingDataPointScore(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class EndpointPingDataPointScore(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_real_user_test.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_real_user_test.py index 1717873f..1fb944e2 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_real_user_test.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_real_user_test.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -47,6 +47,7 @@ class EndpointRealUserTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -57,7 +58,7 @@ class EndpointRealUserTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_real_user_test_base.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_real_user_test_base.py index f8f9dc1a..29765999 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_real_user_test_base.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_real_user_test_base.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -46,6 +46,7 @@ class EndpointRealUserTestBase(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -56,7 +57,7 @@ class EndpointRealUserTestBase(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_real_user_test_detail.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_real_user_test_detail.py index f8a9cfb5..1e0deeed 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_real_user_test_detail.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_real_user_test_detail.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -54,6 +54,7 @@ class EndpointRealUserTestDetail(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -64,7 +65,7 @@ class EndpointRealUserTestDetail(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_real_user_test_detail_results.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_real_user_test_detail_results.py index 5ad3d8ec..3ea3a3b2 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_real_user_test_detail_results.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_real_user_test_detail_results.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class EndpointRealUserTestDetailResults(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class EndpointRealUserTestDetailResults(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_real_user_test_result_request_filter.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_real_user_test_result_request_filter.py index 67b876b2..06d448f1 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_real_user_test_result_request_filter.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_real_user_test_result_request_filter.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -49,6 +49,7 @@ class EndpointRealUserTestResultRequestFilter(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -59,7 +60,7 @@ class EndpointRealUserTestResultRequestFilter(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_real_user_test_results.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_real_user_test_results.py index 24b5173a..271f37fd 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_real_user_test_results.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_real_user_test_results.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -39,6 +39,7 @@ class EndpointRealUserTestResults(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -49,7 +50,7 @@ class EndpointRealUserTestResults(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_real_user_test_results_request.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_real_user_test_results_request.py index 4d808abf..2dd33969 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_real_user_test_results_request.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_real_user_test_results_request.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class EndpointRealUserTestResultsRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class EndpointRealUserTestResultsRequest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_result_request_filter.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_result_request_filter.py index 29f9ae8e..b59339b1 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_result_request_filter.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_result_request_filter.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -44,6 +44,7 @@ class EndpointResultRequestFilter(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -54,7 +55,7 @@ class EndpointResultRequestFilter(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_scheduled_test.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_scheduled_test.py index e4107067..5f46a339 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_scheduled_test.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_scheduled_test.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -19,7 +19,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, f from typing import Any, List, Optional from thousandeyes_sdk.endpoint_test_results.models.endpoint_agent_to_server_test import EndpointAgentToServerTest from thousandeyes_sdk.endpoint_test_results.models.endpoint_http_server_test import EndpointHttpServerTest -from pydantic import StrictStr, Field +from pydantic import StrictStr, Field, model_serializer from typing import Union, List, Set, Optional, Dict from typing_extensions import Literal, Self @@ -112,6 +112,10 @@ class EndpointScheduledTest(BaseModel): 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: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_scheduled_test_type.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_scheduled_test_type.py index cd1c787f..4feee8ff 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_scheduled_test_type.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_scheduled_test_type.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_specific_agents_selector_config.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_specific_agents_selector_config.py index 3d468cee..9064af56 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_specific_agents_selector_config.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_specific_agents_selector_config.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -43,6 +43,7 @@ class EndpointSpecificAgentsSelectorConfig(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -53,7 +54,7 @@ class EndpointSpecificAgentsSelectorConfig(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_test.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_test.py index f0fced53..fd8f1f15 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_test.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_test.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -58,6 +58,7 @@ class EndpointTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -68,7 +69,7 @@ class EndpointTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_test_auth_type.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_test_auth_type.py index 101e413c..1aff8b1a 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_test_auth_type.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_test_auth_type.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_test_links.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_test_links.py index 4b210844..31888143 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_test_links.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_test_links.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class EndpointTestLinks(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class EndpointTestLinks(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_test_protocol.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_test_protocol.py index a59e98c0..a76b40ff 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_test_protocol.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_test_protocol.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_test_self_link.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_test_self_link.py index ffd17ada..64556e54 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_test_self_link.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/endpoint_test_self_link.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -40,6 +40,7 @@ class EndpointTestSelfLink(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -50,7 +51,7 @@ class EndpointTestSelfLink(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/error.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/error.py index 306c4b9d..1568e068 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/error.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/error.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -37,6 +37,7 @@ class Error(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -47,7 +48,7 @@ class Error(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/ethernet_profile.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/ethernet_profile.py index a1e6b920..22fc363f 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/ethernet_profile.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/ethernet_profile.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,8 +17,8 @@ import pprint import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt -from typing import Any, ClassVar, Dict, List, Optional, Union +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -26,13 +26,14 @@ class EthernetProfile(BaseModel): """ EthernetProfile """ # noqa: E501 - link_speed: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Ethernet profile link speed", alias="linkSpeed") + link_speed: Optional[StrictInt] = Field(default=None, description="Ethernet profile link speed", alias="linkSpeed") __properties: ClassVar[List[str]] = ["linkSpeed"] model_config = ConfigDict( populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -43,7 +44,7 @@ class EthernetProfile(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/expand.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/expand.py index 21b7e566..a80082cc 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/expand.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/expand.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/gateway_network_ping.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/gateway_network_ping.py index 8c1281ce..9a4fe188 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/gateway_network_ping.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/gateway_network_ping.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -40,6 +40,7 @@ class GatewayNetworkPing(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -50,7 +51,7 @@ class GatewayNetworkPing(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/hop.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/hop.py index 6ea1eb84..99526afe 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/hop.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/hop.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class Hop(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class Hop(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/http_error_type.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/http_error_type.py index 4834bd36..fcda4a8c 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/http_error_type.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/http_error_type.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/http_test_result.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/http_test_result.py index 528ca371..c0065174 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/http_test_result.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/http_test_result.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -60,6 +60,7 @@ class HttpTestResult(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -70,7 +71,7 @@ class HttpTestResult(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/http_test_result_headers.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/http_test_result_headers.py index 8cff2ccb..2e29c01e 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/http_test_result_headers.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/http_test_result_headers.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class HttpTestResultHeaders(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class HttpTestResultHeaders(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/http_test_results.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/http_test_results.py index dfb2a93b..96e068e8 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/http_test_results.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/http_test_results.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -41,6 +41,7 @@ class HttpTestResults(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -51,7 +52,7 @@ class HttpTestResults(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/interface_hardware_type.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/interface_hardware_type.py index 0ddf40a4..16368a66 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/interface_hardware_type.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/interface_hardware_type.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/link.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/link.py index 13f556d2..ebcfc401 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/link.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/link.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -40,6 +40,7 @@ class Link(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -50,7 +51,7 @@ class Link(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/local_network_result.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/local_network_result.py index e5a9b7c4..9a553945 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/local_network_result.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/local_network_result.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class LocalNetworkResult(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class LocalNetworkResult(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/local_network_results.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/local_network_results.py index 19573fe4..c8c8feb6 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/local_network_results.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/local_network_results.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class LocalNetworkResults(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class LocalNetworkResults(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/local_network_topology_detail_results.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/local_network_topology_detail_results.py index be275395..616b4e54 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/local_network_topology_detail_results.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/local_network_topology_detail_results.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class LocalNetworkTopologyDetailResults(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class LocalNetworkTopologyDetailResults(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/local_network_topology_result.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/local_network_topology_result.py index 3a53de45..c07181f5 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/local_network_topology_result.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/local_network_topology_result.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,8 +18,8 @@ import re # noqa: F401 import json from datetime import datetime -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional from thousandeyes_sdk.endpoint_test_results.models.network_ping import NetworkPing from thousandeyes_sdk.endpoint_test_results.models.network_profile import NetworkProfile from thousandeyes_sdk.endpoint_test_results.models.network_topology_type import NetworkTopologyType @@ -39,7 +39,7 @@ class LocalNetworkTopologyResult(BaseModel): network_topology_id: Optional[StrictStr] = Field(default=None, description="Network topology ID. Each network topology occurrence has a unique ID.", alias="networkTopologyId") round_id: Optional[StrictInt] = Field(default=None, description="Epoch time (seconds) indicating the start time of the round.", alias="roundId") target: Optional[StrictStr] = Field(default=None, description="IP of the target the network topology was performed against. This is typically a default gateway, proxy or VPN endpoint.") - target_port: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Port of the target the network topology was performed against.", alias="targetPort") + target_port: Optional[StrictInt] = Field(default=None, description="Port of the target the network topology was performed against.", alias="targetPort") type: Optional[NetworkTopologyType] = None icmp_ping: Optional[NetworkPing] = Field(default=None, alias="icmpPing") is_icmp_blocked: Optional[StrictBool] = Field(default=None, description="Set to `true` if network target is blocking ICMP echo (ping) queries.", alias="isIcmpBlocked") @@ -55,6 +55,7 @@ class LocalNetworkTopologyResult(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -65,7 +66,7 @@ class LocalNetworkTopologyResult(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/local_network_topology_result_base.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/local_network_topology_result_base.py index 900862c2..c8206cf0 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/local_network_topology_result_base.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/local_network_topology_result_base.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,8 +18,8 @@ import re # noqa: F401 import json from datetime import datetime -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional from thousandeyes_sdk.endpoint_test_results.models.network_ping import NetworkPing from thousandeyes_sdk.endpoint_test_results.models.network_topology_type import NetworkTopologyType from thousandeyes_sdk.endpoint_test_results.models.system_metrics import SystemMetrics @@ -36,7 +36,7 @@ class LocalNetworkTopologyResultBase(BaseModel): network_topology_id: Optional[StrictStr] = Field(default=None, description="Network topology ID. Each network topology occurrence has a unique ID.", alias="networkTopologyId") round_id: Optional[StrictInt] = Field(default=None, description="Epoch time (seconds) indicating the start time of the round.", alias="roundId") target: Optional[StrictStr] = Field(default=None, description="IP of the target the network topology was performed against. This is typically a default gateway, proxy or VPN endpoint.") - target_port: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Port of the target the network topology was performed against.", alias="targetPort") + target_port: Optional[StrictInt] = Field(default=None, description="Port of the target the network topology was performed against.", alias="targetPort") type: Optional[NetworkTopologyType] = None icmp_ping: Optional[NetworkPing] = Field(default=None, alias="icmpPing") is_icmp_blocked: Optional[StrictBool] = Field(default=None, description="Set to `true` if network target is blocking ICMP echo (ping) queries.", alias="isIcmpBlocked") @@ -48,6 +48,7 @@ class LocalNetworkTopologyResultBase(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -58,7 +59,7 @@ class LocalNetworkTopologyResultBase(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/local_network_topology_results.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/local_network_topology_results.py index 1fe248c1..521fd021 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/local_network_topology_results.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/local_network_topology_results.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -39,6 +39,7 @@ class LocalNetworkTopologyResults(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -49,7 +50,7 @@ class LocalNetworkTopologyResults(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/multi_test_id_network_test_results.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/multi_test_id_network_test_results.py index 4bac4537..cc013d67 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/multi_test_id_network_test_results.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/multi_test_id_network_test_results.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,8 +18,8 @@ import re # noqa: F401 import json from datetime import datetime -from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt -from typing import Any, ClassVar, Dict, List, Optional, Union +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List, Optional from thousandeyes_sdk.endpoint_test_results.models.network_test_result import NetworkTestResult from thousandeyes_sdk.endpoint_test_results.models.pagination_next_link import PaginationNextLink from typing import Optional, Set @@ -30,7 +30,7 @@ class MultiTestIdNetworkTestResults(BaseModel): MultiTestIdNetworkTestResults """ # noqa: E501 results: Optional[List[NetworkTestResult]] = None - total_hits: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Total number of measurements that match the search criteria", alias="totalHits") + total_hits: Optional[StrictInt] = Field(default=None, description="Total number of measurements that match the search criteria", alias="totalHits") 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") @@ -40,6 +40,7 @@ class MultiTestIdNetworkTestResults(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -50,7 +51,7 @@ class MultiTestIdNetworkTestResults(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/multi_test_id_tests_data_rounds_search.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/multi_test_id_tests_data_rounds_search.py index 8402b323..e1313a81 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/multi_test_id_tests_data_rounds_search.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/multi_test_id_tests_data_rounds_search.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -38,6 +38,7 @@ class MultiTestIdTestsDataRoundsSearch(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -48,7 +49,7 @@ class MultiTestIdTestsDataRoundsSearch(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/multi_test_id_tests_data_search_filter.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/multi_test_id_tests_data_search_filter.py index 0dfd86a1..31d9c8b1 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/multi_test_id_tests_data_search_filter.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/multi_test_id_tests_data_search_filter.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class MultiTestIdTestsDataSearchFilter(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class MultiTestIdTestsDataSearchFilter(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_dynamic_test_result.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_dynamic_test_result.py index 054c5327..c358b247 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_dynamic_test_result.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_dynamic_test_result.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -20,9 +20,12 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union from thousandeyes_sdk.endpoint_test_results.models.dynamic_test_webex import DynamicTestWebex +from thousandeyes_sdk.endpoint_test_results.models.endpoint_test_protocol import EndpointTestProtocol from thousandeyes_sdk.endpoint_test_results.models.network_profile import NetworkProfile from thousandeyes_sdk.endpoint_test_results.models.system_metrics import SystemMetrics from thousandeyes_sdk.endpoint_test_results.models.target_profile import TargetProfile +from thousandeyes_sdk.endpoint_test_results.models.test_probe_mode_response import TestProbeModeResponse +from thousandeyes_sdk.endpoint_test_results.models.udp_probe_mode_response import UdpProbeModeResponse from thousandeyes_sdk.endpoint_test_results.models.vpn_profile import VpnProfile from typing import Optional, Set from typing_extensions import Self @@ -47,13 +50,17 @@ class NetworkDynamicTestResult(BaseModel): max_latency: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Maximum RTT for packets sent to destination.", alias="maxLatency") min_latency: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Minimum RTT for packets sent to destination.", alias="minLatency") application: Optional[StrictStr] = Field(default=None, description="Which supported application to monitor, can be one of `webex`, `zoom`, `microsoft-teams`.") + protocol: Optional[EndpointTestProtocol] = None + tcp_probe_mode: Optional[TestProbeModeResponse] = Field(default=None, alias="tcpProbeMode") + udp_probe_mode: Optional[UdpProbeModeResponse] = Field(default=None, alias="udpProbeMode") webex: Optional[DynamicTestWebex] = None - __properties: ClassVar[List[str]] = ["aid", "agentId", "roundId", "serverIp", "networkProfile", "systemMetrics", "originalTargetProfile", "vpnProfile", "avgLatency", "errorDetails", "jitter", "isIcmpBlocked", "loss", "maxLatency", "minLatency", "application", "webex"] + __properties: ClassVar[List[str]] = ["aid", "agentId", "roundId", "serverIp", "networkProfile", "systemMetrics", "originalTargetProfile", "vpnProfile", "avgLatency", "errorDetails", "jitter", "isIcmpBlocked", "loss", "maxLatency", "minLatency", "application", "protocol", "tcpProbeMode", "udpProbeMode", "webex"] model_config = ConfigDict( populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -64,7 +71,7 @@ class NetworkDynamicTestResult(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -152,6 +159,9 @@ class NetworkDynamicTestResult(BaseModel): "maxLatency": obj.get("maxLatency"), "minLatency": obj.get("minLatency"), "application": obj.get("application"), + "protocol": obj.get("protocol"), + "tcpProbeMode": obj.get("tcpProbeMode"), + "udpProbeMode": obj.get("udpProbeMode"), "webex": DynamicTestWebex.from_dict(obj["webex"]) if obj.get("webex") is not None else None }) return _obj diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_dynamic_test_results.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_dynamic_test_results.py index 5b9c729f..054d42ce 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_dynamic_test_results.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_dynamic_test_results.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,8 +18,8 @@ import re # noqa: F401 import json from datetime import datetime -from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt -from typing import Any, ClassVar, Dict, List, Optional, Union +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List, Optional from thousandeyes_sdk.endpoint_test_results.models.dynamic_test import DynamicTest from thousandeyes_sdk.endpoint_test_results.models.network_dynamic_test_result import NetworkDynamicTestResult from thousandeyes_sdk.endpoint_test_results.models.pagination_next_link import PaginationNextLink @@ -32,7 +32,7 @@ class NetworkDynamicTestResults(BaseModel): """ # noqa: E501 results: Optional[List[NetworkDynamicTestResult]] = None test: Optional[DynamicTest] = None - total_hits: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Total number of measurements that match the search criteria", alias="totalHits") + total_hits: Optional[StrictInt] = Field(default=None, description="Total number of measurements that match the search criteria", alias="totalHits") 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") @@ -42,6 +42,7 @@ class NetworkDynamicTestResults(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -52,7 +53,7 @@ class NetworkDynamicTestResults(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_interface.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_interface.py index 05c3998f..1d3bf9c8 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_interface.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_interface.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -41,6 +41,7 @@ class NetworkInterface(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -51,7 +52,7 @@ class NetworkInterface(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_metrics.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_metrics.py index 113b93d1..82aa6bae 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_metrics.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_metrics.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class NetworkMetrics(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class NetworkMetrics(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_ping.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_ping.py index 46b0abe1..152d27b2 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_ping.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_ping.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -40,6 +40,7 @@ class NetworkPing(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -50,7 +51,7 @@ class NetworkPing(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_profile.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_profile.py index 8b1d2834..addf9e60 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_profile.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_profile.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -51,6 +51,7 @@ class NetworkProfile(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -61,7 +62,7 @@ class NetworkProfile(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_proxy.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_proxy.py index 73d2e5a5..605a3671 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_proxy.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_proxy.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class NetworkProxy(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class NetworkProxy(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_proxy_profile.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_proxy_profile.py index 05edfd63..b2ba8522 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_proxy_profile.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_proxy_profile.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class NetworkProxyProfile(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class NetworkProxyProfile(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_test_result.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_test_result.py index 407d7772..f96776df 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_test_result.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_test_result.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -51,6 +51,7 @@ class NetworkTestResult(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -61,7 +62,7 @@ class NetworkTestResult(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_test_results.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_test_results.py index 8dbd4b04..4256cdbe 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_test_results.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_test_results.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -18,8 +18,8 @@ import re # noqa: F401 import json from datetime import datetime -from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt -from typing import Any, ClassVar, Dict, List, Optional, Union +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List, Optional from thousandeyes_sdk.endpoint_test_results.models.endpoint_scheduled_test import EndpointScheduledTest from thousandeyes_sdk.endpoint_test_results.models.network_test_result import NetworkTestResult from thousandeyes_sdk.endpoint_test_results.models.pagination_next_link import PaginationNextLink @@ -31,7 +31,7 @@ class NetworkTestResults(BaseModel): NetworkTestResults """ # noqa: E501 results: Optional[List[NetworkTestResult]] = None - total_hits: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Total number of measurements that match the search criteria", alias="totalHits") + total_hits: Optional[StrictInt] = Field(default=None, description="Total number of measurements that match the search criteria", alias="totalHits") test: Optional[EndpointScheduledTest] = None 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") @@ -42,6 +42,7 @@ class NetworkTestResults(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -52,7 +53,7 @@ class NetworkTestResults(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_topology_type.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_topology_type.py index 4777fb05..4893f942 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_topology_type.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_topology_type.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_wireless_profile.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_wireless_profile.py index 3375b821..88ecf52f 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_wireless_profile.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/network_wireless_profile.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -41,6 +41,7 @@ class NetworkWirelessProfile(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -51,7 +52,7 @@ class NetworkWirelessProfile(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/pagination_next_and_self_link.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/pagination_next_and_self_link.py index 862f9bdc..8c1d0554 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/pagination_next_and_self_link.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/pagination_next_and_self_link.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class PaginationNextAndSelfLink(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class PaginationNextAndSelfLink(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/pagination_next_link.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/pagination_next_link.py index e9b78496..758b1e27 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/pagination_next_link.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/pagination_next_link.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class PaginationNextLink(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class PaginationNextLink(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_base_test_result.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_base_test_result.py index 4357f8a9..948c675d 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_base_test_result.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_base_test_result.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -49,6 +49,7 @@ class PathVisBaseTestResult(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -59,7 +60,7 @@ class PathVisBaseTestResult(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_detail_dynamic_test_result.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_detail_dynamic_test_result.py index e312248a..785d76ae 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_detail_dynamic_test_result.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_detail_dynamic_test_result.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -21,10 +21,13 @@ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from thousandeyes_sdk.endpoint_test_results.models.asn_details import AsnDetails from thousandeyes_sdk.endpoint_test_results.models.dynamic_test_webex import DynamicTestWebex +from thousandeyes_sdk.endpoint_test_results.models.endpoint_test_protocol import EndpointTestProtocol from thousandeyes_sdk.endpoint_test_results.models.network_profile import NetworkProfile from thousandeyes_sdk.endpoint_test_results.models.path_vis_route import PathVisRoute from thousandeyes_sdk.endpoint_test_results.models.system_metrics import SystemMetrics from thousandeyes_sdk.endpoint_test_results.models.target_profile import TargetProfile +from thousandeyes_sdk.endpoint_test_results.models.test_probe_mode_response import TestProbeModeResponse +from thousandeyes_sdk.endpoint_test_results.models.udp_probe_mode_response import UdpProbeModeResponse from thousandeyes_sdk.endpoint_test_results.models.vpn_profile import VpnProfile from typing import Optional, Set from typing_extensions import Self @@ -48,13 +51,17 @@ class PathVisDetailDynamicTestResult(BaseModel): path_traces: Optional[List[PathVisRoute]] = Field(default=None, description="Shows iterations of path trace, with each iteration specified by a pathId.", alias="pathTraces") vpn_path_traces: Optional[List[PathVisRoute]] = Field(default=None, description="Shows iterations of the VPN path trace, with each iteration specified by a pathId.", alias="vpnPathTraces") application: Optional[StrictStr] = Field(default=None, description="Which supported application to monitor, can be one of `webex`, `zoom`, `microsoft-teams`.") + protocol: Optional[EndpointTestProtocol] = None + tcp_probe_mode: Optional[TestProbeModeResponse] = Field(default=None, alias="tcpProbeMode") + udp_probe_mode: Optional[UdpProbeModeResponse] = Field(default=None, alias="udpProbeMode") webex: Optional[DynamicTestWebex] = None - __properties: ClassVar[List[str]] = ["aid", "agentId", "roundId", "serverIp", "networkProfile", "systemMetrics", "originalTargetProfile", "vpnProfile", "asnDetails", "server", "sourceIp", "sourcePrefix", "pathTraces", "vpnPathTraces", "application", "webex"] + __properties: ClassVar[List[str]] = ["aid", "agentId", "roundId", "serverIp", "networkProfile", "systemMetrics", "originalTargetProfile", "vpnProfile", "asnDetails", "server", "sourceIp", "sourcePrefix", "pathTraces", "vpnPathTraces", "application", "protocol", "tcpProbeMode", "udpProbeMode", "webex"] model_config = ConfigDict( populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -65,7 +72,7 @@ class PathVisDetailDynamicTestResult(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -161,6 +168,9 @@ class PathVisDetailDynamicTestResult(BaseModel): "pathTraces": [PathVisRoute.from_dict(_item) for _item in obj["pathTraces"]] if obj.get("pathTraces") is not None else None, "vpnPathTraces": [PathVisRoute.from_dict(_item) for _item in obj["vpnPathTraces"]] if obj.get("vpnPathTraces") is not None else None, "application": obj.get("application"), + "protocol": obj.get("protocol"), + "tcpProbeMode": obj.get("tcpProbeMode"), + "udpProbeMode": obj.get("udpProbeMode"), "webex": DynamicTestWebex.from_dict(obj["webex"]) if obj.get("webex") is not None else None }) return _obj diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_detail_dynamic_test_results.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_detail_dynamic_test_results.py index a78d149b..fec65cfd 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_detail_dynamic_test_results.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_detail_dynamic_test_results.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -38,6 +38,7 @@ class PathVisDetailDynamicTestResults(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -48,7 +49,7 @@ class PathVisDetailDynamicTestResults(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_detail_test_result.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_detail_test_result.py index aca9beb4..d7dbd750 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_detail_test_result.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_detail_test_result.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -52,6 +52,7 @@ class PathVisDetailTestResult(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -62,7 +63,7 @@ class PathVisDetailTestResult(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_detail_test_results.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_detail_test_results.py index b8e5491c..361f2baa 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_detail_test_results.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_detail_test_results.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -38,6 +38,7 @@ class PathVisDetailTestResults(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -48,7 +49,7 @@ class PathVisDetailTestResults(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_dynamic_test_result.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_dynamic_test_result.py index c2ed644e..f810d5be 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_dynamic_test_result.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_dynamic_test_result.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -21,10 +21,13 @@ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from thousandeyes_sdk.endpoint_test_results.models.asn_details import AsnDetails from thousandeyes_sdk.endpoint_test_results.models.dynamic_test_webex import DynamicTestWebex +from thousandeyes_sdk.endpoint_test_results.models.endpoint_test_protocol import EndpointTestProtocol from thousandeyes_sdk.endpoint_test_results.models.network_profile import NetworkProfile from thousandeyes_sdk.endpoint_test_results.models.path_vis_endpoint import PathVisEndpoint from thousandeyes_sdk.endpoint_test_results.models.system_metrics import SystemMetrics from thousandeyes_sdk.endpoint_test_results.models.target_profile import TargetProfile +from thousandeyes_sdk.endpoint_test_results.models.test_probe_mode_response import TestProbeModeResponse +from thousandeyes_sdk.endpoint_test_results.models.udp_probe_mode_response import UdpProbeModeResponse from thousandeyes_sdk.endpoint_test_results.models.vpn_profile import VpnProfile from typing import Optional, Set from typing_extensions import Self @@ -46,15 +49,19 @@ class PathVisDynamicTestResult(BaseModel): source_ip: Optional[StrictStr] = Field(default=None, description="IP address of source endpoint agent.", alias="sourceIp") source_prefix: Optional[StrictStr] = Field(default=None, description="IP prefix of source endpoint agent.", alias="sourcePrefix") application: Optional[StrictStr] = Field(default=None, description="Which supported application to monitor, can be one of `webex`, `zoom`, `microsoft-teams`.") + protocol: Optional[EndpointTestProtocol] = None + tcp_probe_mode: Optional[TestProbeModeResponse] = Field(default=None, alias="tcpProbeMode") + udp_probe_mode: Optional[UdpProbeModeResponse] = Field(default=None, alias="udpProbeMode") webex: Optional[DynamicTestWebex] = None location: Optional[StrictStr] = Field(default=None, description="Geographic location of the path visualization.") path_traces: Optional[List[PathVisEndpoint]] = Field(default=None, description="Shows an iteration of path trace, with each iteration specified by a pathId.", alias="pathTraces") - __properties: ClassVar[List[str]] = ["aid", "agentId", "roundId", "serverIp", "networkProfile", "systemMetrics", "originalTargetProfile", "vpnProfile", "asnDetails", "server", "sourceIp", "sourcePrefix", "application", "webex", "location", "pathTraces"] + __properties: ClassVar[List[str]] = ["aid", "agentId", "roundId", "serverIp", "networkProfile", "systemMetrics", "originalTargetProfile", "vpnProfile", "asnDetails", "server", "sourceIp", "sourcePrefix", "application", "protocol", "tcpProbeMode", "udpProbeMode", "webex", "location", "pathTraces"] model_config = ConfigDict( populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -65,7 +72,7 @@ class PathVisDynamicTestResult(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -154,6 +161,9 @@ class PathVisDynamicTestResult(BaseModel): "sourceIp": obj.get("sourceIp"), "sourcePrefix": obj.get("sourcePrefix"), "application": obj.get("application"), + "protocol": obj.get("protocol"), + "tcpProbeMode": obj.get("tcpProbeMode"), + "udpProbeMode": obj.get("udpProbeMode"), "webex": DynamicTestWebex.from_dict(obj["webex"]) if obj.get("webex") is not None else None, "location": obj.get("location"), "pathTraces": [PathVisEndpoint.from_dict(_item) for _item in obj["pathTraces"]] if obj.get("pathTraces") is not None else None diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_dynamic_test_results.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_dynamic_test_results.py index 43f6b276..7f677e61 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_dynamic_test_results.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_dynamic_test_results.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -41,6 +41,7 @@ class PathVisDynamicTestResults(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -51,7 +52,7 @@ class PathVisDynamicTestResults(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_endpoint.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_endpoint.py index 61a64424..b05ea345 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_endpoint.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_endpoint.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class PathVisEndpoint(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class PathVisEndpoint(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_hop.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_hop.py index 4a3866fb..8022eccd 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_hop.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_hop.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -39,6 +39,7 @@ class PathVisHop(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -49,7 +50,7 @@ class PathVisHop(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_route.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_route.py index 1c585218..7daf9d4a 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_route.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_route.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class PathVisRoute(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class PathVisRoute(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_test_result.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_test_result.py index 4554b8e6..3bfa204b 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_test_result.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_test_result.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -52,6 +52,7 @@ class PathVisTestResult(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -62,7 +63,7 @@ class PathVisTestResult(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_test_results.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_test_results.py index 624bd02f..42f88ffc 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_test_results.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/path_vis_test_results.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -41,6 +41,7 @@ class PathVisTestResults(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -51,7 +52,7 @@ class PathVisTestResults(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/physical_memory_used_bytes.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/physical_memory_used_bytes.py index 3cda19d6..ba799614 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/physical_memory_used_bytes.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/physical_memory_used_bytes.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -31,13 +31,14 @@ class PhysicalMemoryUsedBytes(BaseModel): mean: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The mean (average) value of memory usage sampled over the monitored period.") median: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The median value of memory usage sampled over the monitored period.") std_dev: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The standard deviation of memory usage sampled during the monitored period.", alias="stdDev") - count: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The total number of samples collected during the monitored period..") + count: Optional[StrictInt] = Field(default=None, description="The total number of samples collected during the monitored period.") __properties: ClassVar[List[str]] = ["min", "max", "mean", "median", "stdDev", "count"] model_config = ConfigDict( populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -48,7 +49,7 @@ class PhysicalMemoryUsedBytes(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/platform.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/platform.py index b130a90e..ab42e3ef 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/platform.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/platform.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/real_user_test_coordinates.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/real_user_test_coordinates.py index 6f22c9ce..b1238250 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/real_user_test_coordinates.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/real_user_test_coordinates.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class RealUserTestCoordinates(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class RealUserTestCoordinates(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/real_user_test_network.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/real_user_test_network.py index f524ed33..1dae2659 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/real_user_test_network.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/real_user_test_network.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -49,6 +49,7 @@ class RealUserTestNetwork(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -59,7 +60,7 @@ class RealUserTestNetwork(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/real_user_test_network_result.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/real_user_test_network_result.py index 2aa51730..8c613aff 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/real_user_test_network_result.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/real_user_test_network_result.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -43,6 +43,7 @@ class RealUserTestNetworkResult(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -53,7 +54,7 @@ class RealUserTestNetworkResult(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/real_user_test_network_results.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/real_user_test_network_results.py index e98f94e5..8d3b6f3e 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/real_user_test_network_results.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/real_user_test_network_results.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -39,6 +39,7 @@ class RealUserTestNetworkResults(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -49,7 +50,7 @@ class RealUserTestNetworkResults(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/real_user_test_page.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/real_user_test_page.py index 1b49c7a7..f65f2c12 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/real_user_test_page.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/real_user_test_page.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -40,6 +40,7 @@ class RealUserTestPage(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -50,7 +51,7 @@ class RealUserTestPage(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/real_user_test_page_detail_result.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/real_user_test_page_detail_result.py index 202ef5bd..abe2ace9 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/real_user_test_page_detail_result.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/real_user_test_page_detail_result.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class RealUserTestPageDetailResult(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class RealUserTestPageDetailResult(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/real_user_test_page_result.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/real_user_test_page_result.py index 604fab72..4bc8918e 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/real_user_test_page_result.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/real_user_test_page_result.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -46,6 +46,7 @@ class RealUserTestPageResult(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -56,7 +57,7 @@ class RealUserTestPageResult(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/real_user_test_page_results.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/real_user_test_page_results.py index 48ea187b..f7d312bc 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/real_user_test_page_results.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/real_user_test_page_results.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -39,6 +39,7 @@ class RealUserTestPageResults(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -49,7 +50,7 @@ class RealUserTestPageResults(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/real_user_test_page_timings.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/real_user_test_page_timings.py index a096059c..e3e24560 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/real_user_test_page_timings.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/real_user_test_page_timings.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class RealUserTestPageTimings(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class RealUserTestPageTimings(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/self_links.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/self_links.py index 879fd9f9..cda5fbd7 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/self_links.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/self_links.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class SelfLinks(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class SelfLinks(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/severity.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/severity.py index b3ff4a53..083cf789 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/severity.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/severity.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/sort_order.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/sort_order.py index b0ec1ec9..9b58c0cf 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/sort_order.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/sort_order.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/system_metrics.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/system_metrics.py index 941cdfc5..ad9eba56 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/system_metrics.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/system_metrics.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,8 +17,8 @@ import pprint import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt -from typing import Any, ClassVar, Dict, List, Optional, Union +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List, Optional from thousandeyes_sdk.endpoint_test_results.models.cpu_utilization import CpuUtilization from thousandeyes_sdk.endpoint_test_results.models.physical_memory_used_bytes import PhysicalMemoryUsedBytes from typing import Optional, Set @@ -28,17 +28,18 @@ class SystemMetrics(BaseModel): """ SystemMetrics """ # noqa: E501 - start_time_ms: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The start time of metrics collection, expressed in milliseconds since the Epoch.", alias="startTimeMs") - end_time_ms: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The end time of metrics collection, expressed in milliseconds since the Epoch.", alias="endTimeMs") + start_time_ms: Optional[StrictInt] = Field(default=None, description="The start time of metrics collection, expressed in milliseconds since the Epoch.", alias="startTimeMs") + end_time_ms: Optional[StrictInt] = Field(default=None, description="The end time of metrics collection, expressed in milliseconds since the Epoch.", alias="endTimeMs") cpu_utilization: Optional[CpuUtilization] = Field(default=None, alias="cpuUtilization") physical_memory_used_bytes: Optional[PhysicalMemoryUsedBytes] = Field(default=None, alias="physicalMemoryUsedBytes") - physical_memory_total_bytes: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Total physical memory of the system.", alias="physicalMemoryTotalBytes") + physical_memory_total_bytes: Optional[StrictInt] = Field(default=None, description="Total physical memory of the system.", alias="physicalMemoryTotalBytes") __properties: ClassVar[List[str]] = ["startTimeMs", "endTimeMs", "cpuUtilization", "physicalMemoryUsedBytes", "physicalMemoryTotalBytes"] model_config = ConfigDict( populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -49,7 +50,7 @@ class SystemMetrics(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/target_network_ping.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/target_network_ping.py index 475a0b5d..cf02258e 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/target_network_ping.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/target_network_ping.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -40,6 +40,7 @@ class TargetNetworkPing(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -50,7 +51,7 @@ class TargetNetworkPing(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/target_profile.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/target_profile.py index 8dc8651f..8dc3770d 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/target_profile.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/target_profile.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,8 +17,8 @@ import pprint import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional from thousandeyes_sdk.endpoint_test_results.models.test_protocol import TestProtocol from typing import Optional, Set from typing_extensions import Self @@ -27,7 +27,7 @@ class TargetProfile(BaseModel): """ TargetProfile """ # noqa: E501 - remote_port: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The remote port of a network flow towards the target.", alias="remotePort") + remote_port: Optional[StrictInt] = Field(default=None, description="The remote port of a network flow towards the target.", alias="remotePort") remote_ip_address: Optional[StrictStr] = Field(default=None, description="The remote IP address of a network flow towards the target.", alias="remoteIpAddress") protocol: Optional[TestProtocol] = None __properties: ClassVar[List[str]] = ["remotePort", "remoteIpAddress", "protocol"] @@ -36,6 +36,7 @@ class TargetProfile(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class TargetProfile(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/target_traceroute.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/target_traceroute.py index 26b8f06d..a5db7df8 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/target_traceroute.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/target_traceroute.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -38,6 +38,7 @@ class TargetTraceroute(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -48,7 +49,7 @@ class TargetTraceroute(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/tcp_connect.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/tcp_connect.py index 663d7572..371a9f75 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/tcp_connect.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/tcp_connect.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class TcpConnect(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class TcpConnect(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/test_interval.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/test_interval.py index 42742d11..eb60a6ba 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/test_interval.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/test_interval.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/test_label.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/test_label.py index 5062be70..eeda8d36 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/test_label.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/test_label.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class TestLabel(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class TestLabel(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/test_probe_mode_response.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/test_probe_mode_response.py index 9b2bacd4..57fdc6ba 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/test_probe_mode_response.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/test_probe_mode_response.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/test_protocol.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/test_protocol.py index 395c418f..87c6839e 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/test_protocol.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/test_protocol.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/test_result.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/test_result.py index 56c15dd3..4cc07890 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/test_result.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/test_result.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -44,6 +44,7 @@ class TestResult(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -54,7 +55,7 @@ class TestResult(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/test_ssl_version_id.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/test_ssl_version_id.py index 7979e1c6..48d26ad2 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/test_ssl_version_id.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/test_ssl_version_id.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/tests_data_rounds_search.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/tests_data_rounds_search.py index 48085a05..4a0d7b8d 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/tests_data_rounds_search.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/tests_data_rounds_search.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -38,6 +38,7 @@ class TestsDataRoundsSearch(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -48,7 +49,7 @@ class TestsDataRoundsSearch(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/tests_data_search_filter.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/tests_data_search_filter.py index d72794f9..ee1c3092 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/tests_data_search_filter.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/tests_data_search_filter.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -33,6 +33,7 @@ class TestsDataSearchFilter(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -43,7 +44,7 @@ class TestsDataSearchFilter(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/tests_data_search_sort.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/tests_data_search_sort.py index f38ef761..61e7a94e 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/tests_data_search_sort.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/tests_data_search_sort.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class TestsDataSearchSort(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class TestsDataSearchSort(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/tests_data_search_sort_key.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/tests_data_search_sort_key.py index 29550e70..ce89a93f 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/tests_data_search_sort_key.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/tests_data_search_sort_key.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/tests_data_threshold_filter.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/tests_data_threshold_filter.py index a1a828a4..ae86b794 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/tests_data_threshold_filter.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/tests_data_threshold_filter.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -37,6 +37,7 @@ class TestsDataThresholdFilter(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -47,7 +48,7 @@ class TestsDataThresholdFilter(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/tests_data_threshold_filters.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/tests_data_threshold_filters.py index 1c592883..1d7a075b 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/tests_data_threshold_filters.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/tests_data_threshold_filters.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class TestsDataThresholdFilters(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class TestsDataThresholdFilters(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/threshold_filter_name.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/threshold_filter_name.py index bb9955dc..8e6c9f92 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/threshold_filter_name.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/threshold_filter_name.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/threshold_filter_operator.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/threshold_filter_operator.py index 2e8ba540..8e821c78 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/threshold_filter_operator.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/threshold_filter_operator.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/traceroute.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/traceroute.py index b81118df..3dfdc32f 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/traceroute.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/traceroute.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -38,6 +38,7 @@ class Traceroute(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -48,7 +49,7 @@ class Traceroute(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/traceroute_hop.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/traceroute_hop.py index 3410a698..2cd7205a 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/traceroute_hop.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/traceroute_hop.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -39,6 +39,7 @@ class TracerouteHop(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -49,7 +50,7 @@ class TracerouteHop(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/trigger.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/trigger.py index 0ea4ff4d..93f5c332 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/trigger.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/trigger.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/udp_probe_mode_response.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/udp_probe_mode_response.py new file mode 100644 index 00000000..3fb50555 --- /dev/null +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/udp_probe_mode_response.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + Endpoint Test Results API + + Retrieve results for scheduled and dynamic tests on endpoint agents. + + The version of the OpenAPI document: 7.0.6 + 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 UdpProbeModeResponse(str, Enum): + """ + Probe mode used by network test, only valid when the protocol is set to UDP. + """ + + """ + allowed enum values + """ + STUN_MINUS_PCAP = 'stun-pcap' + UNKNOWN = 'unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of UdpProbeModeResponse from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/unauthorized_error.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/unauthorized_error.py index 1decdd5b..5ce76fc9 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/unauthorized_error.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/unauthorized_error.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class UnauthorizedError(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class UnauthorizedError(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/validation_error.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/validation_error.py index dcf9cfbb..1719dccd 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/validation_error.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/validation_error.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -39,6 +39,7 @@ class ValidationError(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -49,7 +50,7 @@ class ValidationError(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/validation_error_item.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/validation_error_item.py index f794dc6a..2829241e 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/validation_error_item.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/validation_error_item.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,7 +17,7 @@ import pprint import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +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 @@ -27,7 +27,7 @@ class ValidationErrorItem(BaseModel): ValidationErrorItem """ # noqa: E501 code: Optional[StrictStr] = Field(default=None, description="(Optional) A unique error type/code that can be referenced in the documentation for further details.") - var_field: Optional[StrictInt] = Field(default=None, description="Identifies the field that triggered this particular error.", alias="field") + var_field: Optional[StrictStr] = Field(default=None, description="Identifies the field that triggered this particular error.", alias="field") message: Optional[StrictStr] = Field(default=None, description="A short, human-readable summary of the error.") __properties: ClassVar[List[str]] = ["code", "field", "message"] @@ -35,6 +35,7 @@ class ValidationErrorItem(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class ValidationErrorItem(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/vpn_network_ping.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/vpn_network_ping.py index cf6a34df..5da15cb1 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/vpn_network_ping.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/vpn_network_ping.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -40,6 +40,7 @@ class VpnNetworkPing(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -50,7 +51,7 @@ class VpnNetworkPing(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/vpn_profile.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/vpn_profile.py index e33c0147..c765df83 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/vpn_profile.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/vpn_profile.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -37,6 +37,7 @@ class VpnProfile(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -47,7 +48,7 @@ class VpnProfile(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/vpn_traceroute.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/vpn_traceroute.py index 67b45037..89ac4710 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/vpn_traceroute.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/vpn_traceroute.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -38,6 +38,7 @@ class VpnTraceroute(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -48,7 +49,7 @@ class VpnTraceroute(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/vpn_type.py b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/vpn_type.py index 04385f52..bc132b42 100644 --- a/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/vpn_type.py +++ b/thousandeyes-sdk-endpoint-test-results/src/thousandeyes_sdk/endpoint_test_results/models/vpn_type.py @@ -5,7 +5,7 @@ Retrieve results for scheduled and dynamic tests on endpoint agents. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-test-results/test/test_local_network_tests_results_api.py b/thousandeyes-sdk-endpoint-test-results/test/test_local_network_tests_results_api.py new file mode 100644 index 00000000..7cfebcf9 --- /dev/null +++ b/thousandeyes-sdk-endpoint-test-results/test/test_local_network_tests_results_api.py @@ -0,0 +1,560 @@ +# coding: utf-8 + +""" + Endpoint Test Results API + + Retrieve results for scheduled and dynamic tests on endpoint agents. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.endpoint_test_results.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.endpoint_test_results.api.local_network_tests_results_api import LocalNetworkTestsResultsApi + + +class TestLocalNetworkTestsResultsApi(unittest.TestCase): + """LocalNetworkTestsResultsApi unit test stubs""" + + def setUp(self) -> None: + self.api = LocalNetworkTestsResultsApi() + + def tearDown(self) -> None: + pass + + def test_filter_local_networks_test_results_topologies_models_validation(self) -> None: + """Test case for filter_local_networks_test_results_topologies request and response models""" + request_body_json = """ + { + "searchFilters" : { + "agentId" : [ "3fde6422-f119-40e1-ae32-d08a1243c038", "236e6f18-9637-4a2f-b15f-7aa6a29c9fce" ], + "bssid" : [ "8c:68:c8:a5:0a:8c", "0c:51:01:e4:3e:d0" ], + "location" : [ "San Francisco Bay Area", "Germany" ], + "connection" : [ "wireless", "wireless" ], + "vpnTarget" : [ "78.153.54.204", "78.153.54.206" ], + "networkId" : [ "660b34109d12", "660b34109d15" ], + "type" : [ "vpn", "proxy" ], + "ssid" : [ "wifi-name", "other-room-wifi" ], + "platform" : [ "mac", "mac" ], + "gateway" : [ "78.153.54.204", "78.153.54.206" ], + "proxyTarget" : [ "78.153.54.204", "78.153.54.206" ] + } + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.endpoint_test_results.models.EndpointNetworkTopologyResultRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "endDate" : "2022-07-18T22:00:54Z", + "_links" : { + "next" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "results" : [ { + "date" : "2022-07-17T22:00:54Z", + "agentId" : "861b7557-cd57-4bbb-b648-00bddf88ef49", + "systemMetrics" : { + "cpuUtilization" : { + "min" : 0.22, + "median" : 0.61, + "max" : 0.75, + "mean" : 0.55, + "count" : 150, + "stdDev" : 0.01 + }, + "physicalMemoryTotalBytes" : 1024, + "startTimeMs" : 1581508857327, + "physicalMemoryUsedBytes" : { + "min" : 1.2, + "median" : 1.85, + "max" : 2.5, + "mean" : 1.77, + "count" : 155, + "stdDev" : 0.25 + }, + "endTimeMs" : 1581508867333 + }, + "isIcmpBlocked" : true, + "tcpConnect" : { + "rtt" : 77.777, + "errorCode" : "ERR_TIMED_OUT", + "error" : "An operation timed out.", + "infoFlags" : [ "TE_INFO_ICMP_BLOCKED_BY_FIREWALL" ] + }, + "icmpPing" : { + "maxRtt" : 66, + "pktsReceived" : 10, + "avgRtt" : 7, + "meanDevRtt" : 11, + "minRtt" : 1, + "error" : "An operation timed out.", + "infoFlags" : [ "TE_INFO_ICMP_BLOCKED_BY_FIREWALL" ], + "pktsSent" : 10 + }, + "type" : "vpn", + "networkTopologyId" : "00160:54c3a4b180c6:1490536500:c7a58c49", + "roundId" : 1384309800, + "targetPort" : 80, + "target" : "10.0.2.2" + }, { + "date" : "2022-07-17T22:00:54Z", + "agentId" : "861b7557-cd57-4bbb-b648-00bddf88ef49", + "systemMetrics" : { + "cpuUtilization" : { + "min" : 0.22, + "median" : 0.61, + "max" : 0.75, + "mean" : 0.55, + "count" : 150, + "stdDev" : 0.01 + }, + "physicalMemoryTotalBytes" : 1024, + "startTimeMs" : 1581508857327, + "physicalMemoryUsedBytes" : { + "min" : 1.2, + "median" : 1.85, + "max" : 2.5, + "mean" : 1.77, + "count" : 155, + "stdDev" : 0.25 + }, + "endTimeMs" : 1581508867333 + }, + "isIcmpBlocked" : true, + "tcpConnect" : { + "rtt" : 77.777, + "errorCode" : "ERR_TIMED_OUT", + "error" : "An operation timed out.", + "infoFlags" : [ "TE_INFO_ICMP_BLOCKED_BY_FIREWALL" ] + }, + "icmpPing" : { + "maxRtt" : 66, + "pktsReceived" : 10, + "avgRtt" : 7, + "meanDevRtt" : 11, + "minRtt" : 1, + "error" : "An operation timed out.", + "infoFlags" : [ "TE_INFO_ICMP_BLOCKED_BY_FIREWALL" ], + "pktsSent" : 10 + }, + "type" : "vpn", + "networkTopologyId" : "00160:54c3a4b180c6:1490536500:c7a58c49", + "roundId" : 1384309800, + "targetPort" : 80, + "target" : "10.0.2.2" + } ], + "startDate" : "2022-07-17T22:00:54Z" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.endpoint_test_results.models.LocalNetworkTopologyResults.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_local_networks_test_results_models_validation(self) -> None: + """Test case for get_local_networks_test_results request and response models""" + + response_body_json = """ + { + "localNetworks" : [ { + "publicIpRange" : "178.216.56.0-178.216.63.255", + "networkName" : "10.5.51.0 (in 178.216.56.0/21)", + "networkId" : "006c4fa7a054", + "localPrefix" : "10.5.51.0" + }, { + "publicIpRange" : "178.216.56.0-178.216.63.255", + "networkName" : "10.5.51.0 (in 178.216.56.0/21)", + "networkId" : "006c4fa7a054", + "localPrefix" : "10.5.51.0" + } ], + "_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" + } + } + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.endpoint_test_results.models.LocalNetworkResults.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_local_networks_test_results_topology_models_validation(self) -> None: + """Test case for get_local_networks_test_results_topology request and response models""" + + response_body_json = """ + { + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "results" : [ { + "date" : "2022-07-17T22:00:54Z", + "agentId" : "861b7557-cd57-4bbb-b648-00bddf88ef49", + "isIcmpBlocked" : true, + "tcpConnect" : { + "rtt" : 77.777, + "errorCode" : "ERR_TIMED_OUT", + "error" : "An operation timed out.", + "infoFlags" : [ "TE_INFO_ICMP_BLOCKED_BY_FIREWALL" ] + }, + "coordinates" : { + "latitude" : 46.0552778, + "location" : "Slovenia", + "longitude" : 14.5144444 + }, + "icmpTraceroutes" : [ { + "destination" : "13.32.22.232", + "hops" : [ { + "delay" : 5, + "prefix" : "196.40.96.0/20", + "hop" : 1, + "ipAddress" : "196.40.106.237", + "name" : "89-210-88-65.access.t-2.net", + "mpls" : [ "L=301472,E=0,S=1,T=1" ], + "asn" : 34779 + }, { + "delay" : 5, + "prefix" : "196.40.96.0/20", + "hop" : 1, + "ipAddress" : "196.40.106.237", + "name" : "89-210-88-65.access.t-2.net", + "mpls" : [ "L=301472,E=0,S=1,T=1" ], + "asn" : 34779 + } ], + "error" : "An operation timed out.", + "infoFlags" : [ "TE_INFO_ICMP_BLOCKED_BY_FIREWALL" ], + "internalErrors" : [ "TE_INFO_ICMP_BLOCKED_BY_FIREWALL" ] + }, { + "destination" : "13.32.22.232", + "hops" : [ { + "delay" : 5, + "prefix" : "196.40.96.0/20", + "hop" : 1, + "ipAddress" : "196.40.106.237", + "name" : "89-210-88-65.access.t-2.net", + "mpls" : [ "L=301472,E=0,S=1,T=1" ], + "asn" : 34779 + }, { + "delay" : 5, + "prefix" : "196.40.96.0/20", + "hop" : 1, + "ipAddress" : "196.40.106.237", + "name" : "89-210-88-65.access.t-2.net", + "mpls" : [ "L=301472,E=0,S=1,T=1" ], + "asn" : 34779 + } ], + "error" : "An operation timed out.", + "infoFlags" : [ "TE_INFO_ICMP_BLOCKED_BY_FIREWALL" ], + "internalErrors" : [ "TE_INFO_ICMP_BLOCKED_BY_FIREWALL" ] + } ], + "type" : "vpn", + "targetPort" : 80, + "target" : "10.0.2.2", + "systemMetrics" : { + "cpuUtilization" : { + "min" : 0.22, + "median" : 0.61, + "max" : 0.75, + "mean" : 0.55, + "count" : 150, + "stdDev" : 0.01 + }, + "physicalMemoryTotalBytes" : 1024, + "startTimeMs" : 1581508857327, + "physicalMemoryUsedBytes" : { + "min" : 1.2, + "median" : 1.85, + "max" : 2.5, + "mean" : 1.77, + "count" : 155, + "stdDev" : 0.25 + }, + "endTimeMs" : 1581508867333 + }, + "icmpTraceroute" : { + "destination" : "13.32.22.232", + "hops" : [ { + "delay" : 5, + "prefix" : "196.40.96.0/20", + "hop" : 1, + "ipAddress" : "196.40.106.237", + "name" : "89-210-88-65.access.t-2.net", + "mpls" : [ "L=301472,E=0,S=1,T=1" ], + "asn" : 34779 + }, { + "delay" : 5, + "prefix" : "196.40.96.0/20", + "hop" : 1, + "ipAddress" : "196.40.106.237", + "name" : "89-210-88-65.access.t-2.net", + "mpls" : [ "L=301472,E=0,S=1,T=1" ], + "asn" : 34779 + } ], + "error" : "An operation timed out.", + "infoFlags" : [ "TE_INFO_ICMP_BLOCKED_BY_FIREWALL" ], + "internalErrors" : [ "TE_INFO_ICMP_BLOCKED_BY_FIREWALL" ] + }, + "networkProfile" : { + "previousInterface" : { + "publicIpAddress" : "84.255.241.1", + "publicIpRange" : "84.255.241.0-84.255.241.255", + "ipAddress" : "10.0.0.13", + "hardwareType" : "wireless", + "localPrefix" : "10.0.0.0", + "interfaceName" : "en0", + "subnetMask" : "255.255.255.0", + "dnsServers" : [ "8.8.8.8", "8.8.8.4" ] + }, + "ethernetProfile" : { + "linkSpeed" : 860 + }, + "publicIpAddress" : "84.255.241.1", + "publicIpRange" : "84.255.241.0-84.255.241.255", + "ipAddress" : "10.0.0.13", + "hardwareType" : "wireless", + "localPrefix" : "10.0.0.0", + "proxyProfile" : { + "method" : "System", + "proxies" : [ { + "bypass" : "*.local;169.254/16", + "proxy" : "" + }, { + "bypass" : "*.local;169.254/16", + "proxy" : "" + } ] + }, + "subnetMask" : "255.255.255.0", + "error" : "An operation timed out.", + "wirelessProfile" : { + "rssi" : -38, + "bssid" : "4c:ba:ba:f4:fa:fa", + "vendor" : "Cisco", + "txRate" : 130, + "channel" : 1, + "noise" : -95, + "phyMode" : "802.11n", + "ssid" : "Internet for the masses", + "quality" : 100 + }, + "interfaceName" : "en0", + "dnsServers" : [ "8.8.8.8", "8.8.8.4" ], + "gateway" : "10.0.0.1" + }, + "icmpPing" : { + "maxRtt" : 66, + "pktsReceived" : 10, + "avgRtt" : 7, + "meanDevRtt" : 11, + "minRtt" : 1, + "error" : "An operation timed out.", + "infoFlags" : [ "TE_INFO_ICMP_BLOCKED_BY_FIREWALL" ], + "pktsSent" : 10 + }, + "networkTopologyId" : "00160:54c3a4b180c6:1490536500:c7a58c49", + "roundId" : 1384309800 + }, { + "date" : "2022-07-17T22:00:54Z", + "agentId" : "861b7557-cd57-4bbb-b648-00bddf88ef49", + "isIcmpBlocked" : true, + "tcpConnect" : { + "rtt" : 77.777, + "errorCode" : "ERR_TIMED_OUT", + "error" : "An operation timed out.", + "infoFlags" : [ "TE_INFO_ICMP_BLOCKED_BY_FIREWALL" ] + }, + "coordinates" : { + "latitude" : 46.0552778, + "location" : "Slovenia", + "longitude" : 14.5144444 + }, + "icmpTraceroutes" : [ { + "destination" : "13.32.22.232", + "hops" : [ { + "delay" : 5, + "prefix" : "196.40.96.0/20", + "hop" : 1, + "ipAddress" : "196.40.106.237", + "name" : "89-210-88-65.access.t-2.net", + "mpls" : [ "L=301472,E=0,S=1,T=1" ], + "asn" : 34779 + }, { + "delay" : 5, + "prefix" : "196.40.96.0/20", + "hop" : 1, + "ipAddress" : "196.40.106.237", + "name" : "89-210-88-65.access.t-2.net", + "mpls" : [ "L=301472,E=0,S=1,T=1" ], + "asn" : 34779 + } ], + "error" : "An operation timed out.", + "infoFlags" : [ "TE_INFO_ICMP_BLOCKED_BY_FIREWALL" ], + "internalErrors" : [ "TE_INFO_ICMP_BLOCKED_BY_FIREWALL" ] + }, { + "destination" : "13.32.22.232", + "hops" : [ { + "delay" : 5, + "prefix" : "196.40.96.0/20", + "hop" : 1, + "ipAddress" : "196.40.106.237", + "name" : "89-210-88-65.access.t-2.net", + "mpls" : [ "L=301472,E=0,S=1,T=1" ], + "asn" : 34779 + }, { + "delay" : 5, + "prefix" : "196.40.96.0/20", + "hop" : 1, + "ipAddress" : "196.40.106.237", + "name" : "89-210-88-65.access.t-2.net", + "mpls" : [ "L=301472,E=0,S=1,T=1" ], + "asn" : 34779 + } ], + "error" : "An operation timed out.", + "infoFlags" : [ "TE_INFO_ICMP_BLOCKED_BY_FIREWALL" ], + "internalErrors" : [ "TE_INFO_ICMP_BLOCKED_BY_FIREWALL" ] + } ], + "type" : "vpn", + "targetPort" : 80, + "target" : "10.0.2.2", + "systemMetrics" : { + "cpuUtilization" : { + "min" : 0.22, + "median" : 0.61, + "max" : 0.75, + "mean" : 0.55, + "count" : 150, + "stdDev" : 0.01 + }, + "physicalMemoryTotalBytes" : 1024, + "startTimeMs" : 1581508857327, + "physicalMemoryUsedBytes" : { + "min" : 1.2, + "median" : 1.85, + "max" : 2.5, + "mean" : 1.77, + "count" : 155, + "stdDev" : 0.25 + }, + "endTimeMs" : 1581508867333 + }, + "icmpTraceroute" : { + "destination" : "13.32.22.232", + "hops" : [ { + "delay" : 5, + "prefix" : "196.40.96.0/20", + "hop" : 1, + "ipAddress" : "196.40.106.237", + "name" : "89-210-88-65.access.t-2.net", + "mpls" : [ "L=301472,E=0,S=1,T=1" ], + "asn" : 34779 + }, { + "delay" : 5, + "prefix" : "196.40.96.0/20", + "hop" : 1, + "ipAddress" : "196.40.106.237", + "name" : "89-210-88-65.access.t-2.net", + "mpls" : [ "L=301472,E=0,S=1,T=1" ], + "asn" : 34779 + } ], + "error" : "An operation timed out.", + "infoFlags" : [ "TE_INFO_ICMP_BLOCKED_BY_FIREWALL" ], + "internalErrors" : [ "TE_INFO_ICMP_BLOCKED_BY_FIREWALL" ] + }, + "networkProfile" : { + "previousInterface" : { + "publicIpAddress" : "84.255.241.1", + "publicIpRange" : "84.255.241.0-84.255.241.255", + "ipAddress" : "10.0.0.13", + "hardwareType" : "wireless", + "localPrefix" : "10.0.0.0", + "interfaceName" : "en0", + "subnetMask" : "255.255.255.0", + "dnsServers" : [ "8.8.8.8", "8.8.8.4" ] + }, + "ethernetProfile" : { + "linkSpeed" : 860 + }, + "publicIpAddress" : "84.255.241.1", + "publicIpRange" : "84.255.241.0-84.255.241.255", + "ipAddress" : "10.0.0.13", + "hardwareType" : "wireless", + "localPrefix" : "10.0.0.0", + "proxyProfile" : { + "method" : "System", + "proxies" : [ { + "bypass" : "*.local;169.254/16", + "proxy" : "" + }, { + "bypass" : "*.local;169.254/16", + "proxy" : "" + } ] + }, + "subnetMask" : "255.255.255.0", + "error" : "An operation timed out.", + "wirelessProfile" : { + "rssi" : -38, + "bssid" : "4c:ba:ba:f4:fa:fa", + "vendor" : "Cisco", + "txRate" : 130, + "channel" : 1, + "noise" : -95, + "phyMode" : "802.11n", + "ssid" : "Internet for the masses", + "quality" : 100 + }, + "interfaceName" : "en0", + "dnsServers" : [ "8.8.8.8", "8.8.8.4" ], + "gateway" : "10.0.0.1" + }, + "icmpPing" : { + "maxRtt" : 66, + "pktsReceived" : 10, + "avgRtt" : 7, + "meanDevRtt" : 11, + "minRtt" : 1, + "error" : "An operation timed out.", + "infoFlags" : [ "TE_INFO_ICMP_BLOCKED_BY_FIREWALL" ], + "pktsSent" : 10 + }, + "networkTopologyId" : "00160:54c3a4b180c6:1490536500:c7a58c49", + "roundId" : 1384309800 + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.endpoint_test_results.models.LocalNetworkTopologyDetailResults.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-endpoint-test-results/test/test_network_dynamic_tests_results_api.py b/thousandeyes-sdk-endpoint-test-results/test/test_network_dynamic_tests_results_api.py new file mode 100644 index 00000000..537416f1 --- /dev/null +++ b/thousandeyes-sdk-endpoint-test-results/test/test_network_dynamic_tests_results_api.py @@ -0,0 +1,1069 @@ +# coding: utf-8 + +""" + Endpoint Test Results API + + Retrieve results for scheduled and dynamic tests on endpoint agents. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.endpoint_test_results.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.endpoint_test_results.api.network_dynamic_tests_results_api import NetworkDynamicTestsResultsApi + + +class TestNetworkDynamicTestsResultsApi(unittest.TestCase): + """NetworkDynamicTestsResultsApi unit test stubs""" + + def setUp(self) -> None: + self.api = NetworkDynamicTestsResultsApi() + + def tearDown(self) -> None: + pass + + def test_filter_dynamic_test_network_results_models_validation(self) -> None: + """Test case for filter_dynamic_test_network_results request and response models""" + request_body_json = """ + { + "searchSort" : [ { + "sort" : "round-id", + "order" : "desc" + }, { + "sort" : "round-id", + "order" : "desc" + } ], + "searchFilters" : { + "agentId" : [ "52455b09-ff1b-4849-8194-99026cc890e0", "52455b09-ff1b-4849-8194-99026cc890e0" ], + "webexConferenceId" : [ "52455b09-ff1b-4849-8194-99026cc890e0", "52455b09-ff1b-4849-8194-99026cc890e0" ] + }, + "thresholdFilter" : { + "conditionalOperator" : "and", + "filters" : [ { + "name" : "loss", + "value" : 10.0, + "operator" : "gte" + }, { + "name" : "loss", + "value" : 10.0, + "operator" : "gte" + } ] + } + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.endpoint_test_results.models.DynamicTestsDataRoundSearch.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "test" : { + "hasPing" : true, + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/endpoint/test-results/dynamic-tests/281474976710706/network/filter" + }, { + "href" : "https://api.thousandeyes.com/v7/endpoint/test-results/dynamic-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" + } + }, + "networkMeasurements" : true, + "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", + "application" : "webex", + "hasTraceroute" : true, + "isEnabled" : true, + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "aid" : "1234", + "agentSelectorConfig" : { + "agentSelectorType" : "all-agents", + "maxMachines" : 10 + }, + "hasPathTraceInSession" : true, + "testName" : "Test name" + }, + "totalHits" : 12, + "endDate" : "2022-07-18T22:00:54Z", + "_links" : { + "next" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "results" : [ { + "originalTargetProfile" : { + "protocol" : "tcp", + "remotePort" : 80, + "remoteIpAddress" : "120.98.134.7" + }, + "udpProbeMode" : "unknown", + "agentId" : "861b7557-cd57-4bbb-b648-00bddf88ef49", + "isIcmpBlocked" : true, + "avgLatency" : 167.04, + "minLatency" : 167.0, + "vpnProfile" : { + "vpnClientNetworkRange" : [ "9.88.37.27", "9.88.37.27" ], + "vpnGatewayAddress" : "120.98.134.7", + "vpnType" : "cisco-anyconnect", + "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] + }, + "maxLatency" : 168.0, + "tcpProbeMode" : "auto", + "loss" : 0.0, + "protocol" : "icmp", + "systemMetrics" : { + "cpuUtilization" : { + "min" : 0.22, + "median" : 0.61, + "max" : 0.75, + "mean" : 0.55, + "count" : 150, + "stdDev" : 0.01 + }, + "physicalMemoryTotalBytes" : 1024, + "startTimeMs" : 1581508857327, + "physicalMemoryUsedBytes" : { + "min" : 1.2, + "median" : 1.85, + "max" : 2.5, + "mean" : 1.77, + "count" : 155, + "stdDev" : 0.25 + }, + "endTimeMs" : 1581508867333 + }, + "jitter" : 0.076808, + "application" : "webex", + "serverIp" : "185.199.108.153", + "networkProfile" : { + "previousInterface" : { + "publicIpAddress" : "84.255.241.1", + "publicIpRange" : "84.255.241.0-84.255.241.255", + "ipAddress" : "10.0.0.13", + "hardwareType" : "wireless", + "localPrefix" : "10.0.0.0", + "interfaceName" : "en0", + "subnetMask" : "255.255.255.0", + "dnsServers" : [ "8.8.8.8", "8.8.8.4" ] + }, + "ethernetProfile" : { + "linkSpeed" : 860 + }, + "publicIpAddress" : "84.255.241.1", + "publicIpRange" : "84.255.241.0-84.255.241.255", + "ipAddress" : "10.0.0.13", + "hardwareType" : "wireless", + "localPrefix" : "10.0.0.0", + "proxyProfile" : { + "method" : "System", + "proxies" : [ { + "bypass" : "*.local;169.254/16", + "proxy" : "" + }, { + "bypass" : "*.local;169.254/16", + "proxy" : "" + } ] + }, + "subnetMask" : "255.255.255.0", + "error" : "An operation timed out.", + "wirelessProfile" : { + "rssi" : -38, + "bssid" : "4c:ba:ba:f4:fa:fa", + "vendor" : "Cisco", + "txRate" : 130, + "channel" : 1, + "noise" : -95, + "phyMode" : "802.11n", + "ssid" : "Internet for the masses", + "quality" : 100 + }, + "interfaceName" : "en0", + "dnsServers" : [ "8.8.8.8", "8.8.8.4" ], + "gateway" : "10.0.0.1" + }, + "webex" : { + "remoteSipSessionId" : "22581707460321454", + "localSipSessionId" : "22581707460321454", + "conferenceId" : "225817074608419375", + "correlationId" : "22581707460321454" + }, + "aid" : "1234", + "roundId" : 1384309800, + "errorDetails" : "Error" + }, { + "originalTargetProfile" : { + "protocol" : "tcp", + "remotePort" : 80, + "remoteIpAddress" : "120.98.134.7" + }, + "udpProbeMode" : "unknown", + "agentId" : "861b7557-cd57-4bbb-b648-00bddf88ef49", + "isIcmpBlocked" : true, + "avgLatency" : 167.04, + "minLatency" : 167.0, + "vpnProfile" : { + "vpnClientNetworkRange" : [ "9.88.37.27", "9.88.37.27" ], + "vpnGatewayAddress" : "120.98.134.7", + "vpnType" : "cisco-anyconnect", + "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] + }, + "maxLatency" : 168.0, + "tcpProbeMode" : "auto", + "loss" : 0.0, + "protocol" : "icmp", + "systemMetrics" : { + "cpuUtilization" : { + "min" : 0.22, + "median" : 0.61, + "max" : 0.75, + "mean" : 0.55, + "count" : 150, + "stdDev" : 0.01 + }, + "physicalMemoryTotalBytes" : 1024, + "startTimeMs" : 1581508857327, + "physicalMemoryUsedBytes" : { + "min" : 1.2, + "median" : 1.85, + "max" : 2.5, + "mean" : 1.77, + "count" : 155, + "stdDev" : 0.25 + }, + "endTimeMs" : 1581508867333 + }, + "jitter" : 0.076808, + "application" : "webex", + "serverIp" : "185.199.108.153", + "networkProfile" : { + "previousInterface" : { + "publicIpAddress" : "84.255.241.1", + "publicIpRange" : "84.255.241.0-84.255.241.255", + "ipAddress" : "10.0.0.13", + "hardwareType" : "wireless", + "localPrefix" : "10.0.0.0", + "interfaceName" : "en0", + "subnetMask" : "255.255.255.0", + "dnsServers" : [ "8.8.8.8", "8.8.8.4" ] + }, + "ethernetProfile" : { + "linkSpeed" : 860 + }, + "publicIpAddress" : "84.255.241.1", + "publicIpRange" : "84.255.241.0-84.255.241.255", + "ipAddress" : "10.0.0.13", + "hardwareType" : "wireless", + "localPrefix" : "10.0.0.0", + "proxyProfile" : { + "method" : "System", + "proxies" : [ { + "bypass" : "*.local;169.254/16", + "proxy" : "" + }, { + "bypass" : "*.local;169.254/16", + "proxy" : "" + } ] + }, + "subnetMask" : "255.255.255.0", + "error" : "An operation timed out.", + "wirelessProfile" : { + "rssi" : -38, + "bssid" : "4c:ba:ba:f4:fa:fa", + "vendor" : "Cisco", + "txRate" : 130, + "channel" : 1, + "noise" : -95, + "phyMode" : "802.11n", + "ssid" : "Internet for the masses", + "quality" : 100 + }, + "interfaceName" : "en0", + "dnsServers" : [ "8.8.8.8", "8.8.8.4" ], + "gateway" : "10.0.0.1" + }, + "webex" : { + "remoteSipSessionId" : "22581707460321454", + "localSipSessionId" : "22581707460321454", + "conferenceId" : "225817074608419375", + "correlationId" : "22581707460321454" + }, + "aid" : "1234", + "roundId" : 1384309800, + "errorDetails" : "Error" + } ], + "startDate" : "2022-07-17T22:00:54Z" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.endpoint_test_results.models.NetworkDynamicTestResults.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_dynamic_test_path_vis_agent_round_results_models_validation(self) -> None: + """Test case for get_dynamic_test_path_vis_agent_round_results request and response models""" + + response_body_json = """ + { + "test" : { + "hasPing" : true, + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/endpoint/test-results/dynamic-tests/281474976710706/network/filter" + }, { + "href" : "https://api.thousandeyes.com/v7/endpoint/test-results/dynamic-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" + } + }, + "networkMeasurements" : true, + "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", + "application" : "webex", + "hasTraceroute" : true, + "isEnabled" : true, + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "aid" : "1234", + "agentSelectorConfig" : { + "agentSelectorType" : "all-agents", + "maxMachines" : 10 + }, + "hasPathTraceInSession" : true, + "testName" : "Test name" + }, + "_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" + } + }, + "results" : [ { + "originalTargetProfile" : { + "protocol" : "tcp", + "remotePort" : 80, + "remoteIpAddress" : "120.98.134.7" + }, + "server" : "www.google.com:443", + "udpProbeMode" : "unknown", + "agentId" : "861b7557-cd57-4bbb-b648-00bddf88ef49", + "asnDetails" : { + "asName" : "ThousandEyes, Inc", + "asNumber" : 394101 + }, + "vpnProfile" : { + "vpnClientNetworkRange" : [ "9.88.37.27", "9.88.37.27" ], + "vpnGatewayAddress" : "120.98.134.7", + "vpnType" : "cisco-anyconnect", + "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] + }, + "sourcePrefix" : "196.40.96.0/20", + "tcpProbeMode" : "auto", + "protocol" : "icmp", + "systemMetrics" : { + "cpuUtilization" : { + "min" : 0.22, + "median" : 0.61, + "max" : 0.75, + "mean" : 0.55, + "count" : 150, + "stdDev" : 0.01 + }, + "physicalMemoryTotalBytes" : 1024, + "startTimeMs" : 1581508857327, + "physicalMemoryUsedBytes" : { + "min" : 1.2, + "median" : 1.85, + "max" : 2.5, + "mean" : 1.77, + "count" : 155, + "stdDev" : 0.25 + }, + "endTimeMs" : 1581508867333 + }, + "sourceIp" : "196.40.106.237", + "application" : "webex", + "pathTraces" : [ { + "hops" : [ { + "rdns" : "core-router1.cpt2.host-h.net", + "prefix" : "196.40.96.0/20", + "responseTime" : 1, + "hop" : 1, + "ipAddress" : "196.40.106.237", + "location" : "Cape Town, South Africa", + "network" : "HETZNER (Pty) Ltd (AS 37153)" + }, { + "rdns" : "core-router1.cpt2.host-h.net", + "prefix" : "196.40.96.0/20", + "responseTime" : 1, + "hop" : 1, + "ipAddress" : "196.40.106.237", + "location" : "Cape Town, South Africa", + "network" : "HETZNER (Pty) Ltd (AS 37153)" + } ], + "pathId" : "4711301366345855606023718047703941305741293841502186803" + }, { + "hops" : [ { + "rdns" : "core-router1.cpt2.host-h.net", + "prefix" : "196.40.96.0/20", + "responseTime" : 1, + "hop" : 1, + "ipAddress" : "196.40.106.237", + "location" : "Cape Town, South Africa", + "network" : "HETZNER (Pty) Ltd (AS 37153)" + }, { + "rdns" : "core-router1.cpt2.host-h.net", + "prefix" : "196.40.96.0/20", + "responseTime" : 1, + "hop" : 1, + "ipAddress" : "196.40.106.237", + "location" : "Cape Town, South Africa", + "network" : "HETZNER (Pty) Ltd (AS 37153)" + } ], + "pathId" : "4711301366345855606023718047703941305741293841502186803" + } ], + "vpnPathTraces" : [ { + "hops" : [ { + "rdns" : "core-router1.cpt2.host-h.net", + "prefix" : "196.40.96.0/20", + "responseTime" : 1, + "hop" : 1, + "ipAddress" : "196.40.106.237", + "location" : "Cape Town, South Africa", + "network" : "HETZNER (Pty) Ltd (AS 37153)" + }, { + "rdns" : "core-router1.cpt2.host-h.net", + "prefix" : "196.40.96.0/20", + "responseTime" : 1, + "hop" : 1, + "ipAddress" : "196.40.106.237", + "location" : "Cape Town, South Africa", + "network" : "HETZNER (Pty) Ltd (AS 37153)" + } ], + "pathId" : "4711301366345855606023718047703941305741293841502186803" + }, { + "hops" : [ { + "rdns" : "core-router1.cpt2.host-h.net", + "prefix" : "196.40.96.0/20", + "responseTime" : 1, + "hop" : 1, + "ipAddress" : "196.40.106.237", + "location" : "Cape Town, South Africa", + "network" : "HETZNER (Pty) Ltd (AS 37153)" + }, { + "rdns" : "core-router1.cpt2.host-h.net", + "prefix" : "196.40.96.0/20", + "responseTime" : 1, + "hop" : 1, + "ipAddress" : "196.40.106.237", + "location" : "Cape Town, South Africa", + "network" : "HETZNER (Pty) Ltd (AS 37153)" + } ], + "pathId" : "4711301366345855606023718047703941305741293841502186803" + } ], + "serverIp" : "185.199.108.153", + "networkProfile" : { + "previousInterface" : { + "publicIpAddress" : "84.255.241.1", + "publicIpRange" : "84.255.241.0-84.255.241.255", + "ipAddress" : "10.0.0.13", + "hardwareType" : "wireless", + "localPrefix" : "10.0.0.0", + "interfaceName" : "en0", + "subnetMask" : "255.255.255.0", + "dnsServers" : [ "8.8.8.8", "8.8.8.4" ] + }, + "ethernetProfile" : { + "linkSpeed" : 860 + }, + "publicIpAddress" : "84.255.241.1", + "publicIpRange" : "84.255.241.0-84.255.241.255", + "ipAddress" : "10.0.0.13", + "hardwareType" : "wireless", + "localPrefix" : "10.0.0.0", + "proxyProfile" : { + "method" : "System", + "proxies" : [ { + "bypass" : "*.local;169.254/16", + "proxy" : "" + }, { + "bypass" : "*.local;169.254/16", + "proxy" : "" + } ] + }, + "subnetMask" : "255.255.255.0", + "error" : "An operation timed out.", + "wirelessProfile" : { + "rssi" : -38, + "bssid" : "4c:ba:ba:f4:fa:fa", + "vendor" : "Cisco", + "txRate" : 130, + "channel" : 1, + "noise" : -95, + "phyMode" : "802.11n", + "ssid" : "Internet for the masses", + "quality" : 100 + }, + "interfaceName" : "en0", + "dnsServers" : [ "8.8.8.8", "8.8.8.4" ], + "gateway" : "10.0.0.1" + }, + "webex" : { + "remoteSipSessionId" : "22581707460321454", + "localSipSessionId" : "22581707460321454", + "conferenceId" : "225817074608419375", + "correlationId" : "22581707460321454" + }, + "aid" : "1234", + "roundId" : 1384309800 + }, { + "originalTargetProfile" : { + "protocol" : "tcp", + "remotePort" : 80, + "remoteIpAddress" : "120.98.134.7" + }, + "server" : "www.google.com:443", + "udpProbeMode" : "unknown", + "agentId" : "861b7557-cd57-4bbb-b648-00bddf88ef49", + "asnDetails" : { + "asName" : "ThousandEyes, Inc", + "asNumber" : 394101 + }, + "vpnProfile" : { + "vpnClientNetworkRange" : [ "9.88.37.27", "9.88.37.27" ], + "vpnGatewayAddress" : "120.98.134.7", + "vpnType" : "cisco-anyconnect", + "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] + }, + "sourcePrefix" : "196.40.96.0/20", + "tcpProbeMode" : "auto", + "protocol" : "icmp", + "systemMetrics" : { + "cpuUtilization" : { + "min" : 0.22, + "median" : 0.61, + "max" : 0.75, + "mean" : 0.55, + "count" : 150, + "stdDev" : 0.01 + }, + "physicalMemoryTotalBytes" : 1024, + "startTimeMs" : 1581508857327, + "physicalMemoryUsedBytes" : { + "min" : 1.2, + "median" : 1.85, + "max" : 2.5, + "mean" : 1.77, + "count" : 155, + "stdDev" : 0.25 + }, + "endTimeMs" : 1581508867333 + }, + "sourceIp" : "196.40.106.237", + "application" : "webex", + "pathTraces" : [ { + "hops" : [ { + "rdns" : "core-router1.cpt2.host-h.net", + "prefix" : "196.40.96.0/20", + "responseTime" : 1, + "hop" : 1, + "ipAddress" : "196.40.106.237", + "location" : "Cape Town, South Africa", + "network" : "HETZNER (Pty) Ltd (AS 37153)" + }, { + "rdns" : "core-router1.cpt2.host-h.net", + "prefix" : "196.40.96.0/20", + "responseTime" : 1, + "hop" : 1, + "ipAddress" : "196.40.106.237", + "location" : "Cape Town, South Africa", + "network" : "HETZNER (Pty) Ltd (AS 37153)" + } ], + "pathId" : "4711301366345855606023718047703941305741293841502186803" + }, { + "hops" : [ { + "rdns" : "core-router1.cpt2.host-h.net", + "prefix" : "196.40.96.0/20", + "responseTime" : 1, + "hop" : 1, + "ipAddress" : "196.40.106.237", + "location" : "Cape Town, South Africa", + "network" : "HETZNER (Pty) Ltd (AS 37153)" + }, { + "rdns" : "core-router1.cpt2.host-h.net", + "prefix" : "196.40.96.0/20", + "responseTime" : 1, + "hop" : 1, + "ipAddress" : "196.40.106.237", + "location" : "Cape Town, South Africa", + "network" : "HETZNER (Pty) Ltd (AS 37153)" + } ], + "pathId" : "4711301366345855606023718047703941305741293841502186803" + } ], + "vpnPathTraces" : [ { + "hops" : [ { + "rdns" : "core-router1.cpt2.host-h.net", + "prefix" : "196.40.96.0/20", + "responseTime" : 1, + "hop" : 1, + "ipAddress" : "196.40.106.237", + "location" : "Cape Town, South Africa", + "network" : "HETZNER (Pty) Ltd (AS 37153)" + }, { + "rdns" : "core-router1.cpt2.host-h.net", + "prefix" : "196.40.96.0/20", + "responseTime" : 1, + "hop" : 1, + "ipAddress" : "196.40.106.237", + "location" : "Cape Town, South Africa", + "network" : "HETZNER (Pty) Ltd (AS 37153)" + } ], + "pathId" : "4711301366345855606023718047703941305741293841502186803" + }, { + "hops" : [ { + "rdns" : "core-router1.cpt2.host-h.net", + "prefix" : "196.40.96.0/20", + "responseTime" : 1, + "hop" : 1, + "ipAddress" : "196.40.106.237", + "location" : "Cape Town, South Africa", + "network" : "HETZNER (Pty) Ltd (AS 37153)" + }, { + "rdns" : "core-router1.cpt2.host-h.net", + "prefix" : "196.40.96.0/20", + "responseTime" : 1, + "hop" : 1, + "ipAddress" : "196.40.106.237", + "location" : "Cape Town, South Africa", + "network" : "HETZNER (Pty) Ltd (AS 37153)" + } ], + "pathId" : "4711301366345855606023718047703941305741293841502186803" + } ], + "serverIp" : "185.199.108.153", + "networkProfile" : { + "previousInterface" : { + "publicIpAddress" : "84.255.241.1", + "publicIpRange" : "84.255.241.0-84.255.241.255", + "ipAddress" : "10.0.0.13", + "hardwareType" : "wireless", + "localPrefix" : "10.0.0.0", + "interfaceName" : "en0", + "subnetMask" : "255.255.255.0", + "dnsServers" : [ "8.8.8.8", "8.8.8.4" ] + }, + "ethernetProfile" : { + "linkSpeed" : 860 + }, + "publicIpAddress" : "84.255.241.1", + "publicIpRange" : "84.255.241.0-84.255.241.255", + "ipAddress" : "10.0.0.13", + "hardwareType" : "wireless", + "localPrefix" : "10.0.0.0", + "proxyProfile" : { + "method" : "System", + "proxies" : [ { + "bypass" : "*.local;169.254/16", + "proxy" : "" + }, { + "bypass" : "*.local;169.254/16", + "proxy" : "" + } ] + }, + "subnetMask" : "255.255.255.0", + "error" : "An operation timed out.", + "wirelessProfile" : { + "rssi" : -38, + "bssid" : "4c:ba:ba:f4:fa:fa", + "vendor" : "Cisco", + "txRate" : 130, + "channel" : 1, + "noise" : -95, + "phyMode" : "802.11n", + "ssid" : "Internet for the masses", + "quality" : 100 + }, + "interfaceName" : "en0", + "dnsServers" : [ "8.8.8.8", "8.8.8.4" ], + "gateway" : "10.0.0.1" + }, + "webex" : { + "remoteSipSessionId" : "22581707460321454", + "localSipSessionId" : "22581707460321454", + "conferenceId" : "225817074608419375", + "correlationId" : "22581707460321454" + }, + "aid" : "1234", + "roundId" : 1384309800 + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.endpoint_test_results.models.PathVisDetailDynamicTestResults.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_dynamic_test_path_vis_results_models_validation(self) -> None: + """Test case for get_dynamic_test_path_vis_results request and response models""" + + response_body_json = """ + { + "test" : { + "hasPing" : true, + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/endpoint/test-results/dynamic-tests/281474976710706/network/filter" + }, { + "href" : "https://api.thousandeyes.com/v7/endpoint/test-results/dynamic-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" + } + }, + "networkMeasurements" : true, + "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", + "application" : "webex", + "hasTraceroute" : true, + "isEnabled" : true, + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "aid" : "1234", + "agentSelectorConfig" : { + "agentSelectorType" : "all-agents", + "maxMachines" : 10 + }, + "hasPathTraceInSession" : true, + "testName" : "Test name" + }, + "endDate" : "2022-07-18T22:00:54Z", + "_links" : { + "next" : { + "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" + } + }, + "results" : [ { + "originalTargetProfile" : { + "protocol" : "tcp", + "remotePort" : 80, + "remoteIpAddress" : "120.98.134.7" + }, + "server" : "www.google.com:443", + "udpProbeMode" : "unknown", + "agentId" : "861b7557-cd57-4bbb-b648-00bddf88ef49", + "asnDetails" : { + "asName" : "ThousandEyes, Inc", + "asNumber" : 394101 + }, + "vpnProfile" : { + "vpnClientNetworkRange" : [ "9.88.37.27", "9.88.37.27" ], + "vpnGatewayAddress" : "120.98.134.7", + "vpnType" : "cisco-anyconnect", + "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] + }, + "sourcePrefix" : "196.40.96.0/20", + "tcpProbeMode" : "auto", + "protocol" : "icmp", + "systemMetrics" : { + "cpuUtilization" : { + "min" : 0.22, + "median" : 0.61, + "max" : 0.75, + "mean" : 0.55, + "count" : 150, + "stdDev" : 0.01 + }, + "physicalMemoryTotalBytes" : 1024, + "startTimeMs" : 1581508857327, + "physicalMemoryUsedBytes" : { + "min" : 1.2, + "median" : 1.85, + "max" : 2.5, + "mean" : 1.77, + "count" : 155, + "stdDev" : 0.25 + }, + "endTimeMs" : 1581508867333 + }, + "sourceIp" : "196.40.106.237", + "application" : "webex", + "pathTraces" : [ { + "numberOfHops" : 15, + "responseTime" : 1500, + "ipAddress" : "196.40.106.237", + "pathId" : "1230899668701775614109128428722974545787322404682781961521" + }, { + "numberOfHops" : 15, + "responseTime" : 1500, + "ipAddress" : "196.40.106.237", + "pathId" : "1230899668701775614109128428722974545787322404682781961521" + } ], + "serverIp" : "185.199.108.153", + "networkProfile" : { + "previousInterface" : { + "publicIpAddress" : "84.255.241.1", + "publicIpRange" : "84.255.241.0-84.255.241.255", + "ipAddress" : "10.0.0.13", + "hardwareType" : "wireless", + "localPrefix" : "10.0.0.0", + "interfaceName" : "en0", + "subnetMask" : "255.255.255.0", + "dnsServers" : [ "8.8.8.8", "8.8.8.4" ] + }, + "ethernetProfile" : { + "linkSpeed" : 860 + }, + "publicIpAddress" : "84.255.241.1", + "publicIpRange" : "84.255.241.0-84.255.241.255", + "ipAddress" : "10.0.0.13", + "hardwareType" : "wireless", + "localPrefix" : "10.0.0.0", + "proxyProfile" : { + "method" : "System", + "proxies" : [ { + "bypass" : "*.local;169.254/16", + "proxy" : "" + }, { + "bypass" : "*.local;169.254/16", + "proxy" : "" + } ] + }, + "subnetMask" : "255.255.255.0", + "error" : "An operation timed out.", + "wirelessProfile" : { + "rssi" : -38, + "bssid" : "4c:ba:ba:f4:fa:fa", + "vendor" : "Cisco", + "txRate" : 130, + "channel" : 1, + "noise" : -95, + "phyMode" : "802.11n", + "ssid" : "Internet for the masses", + "quality" : 100 + }, + "interfaceName" : "en0", + "dnsServers" : [ "8.8.8.8", "8.8.8.4" ], + "gateway" : "10.0.0.1" + }, + "location" : "San Francisco Area", + "webex" : { + "remoteSipSessionId" : "22581707460321454", + "localSipSessionId" : "22581707460321454", + "conferenceId" : "225817074608419375", + "correlationId" : "22581707460321454" + }, + "aid" : "1234", + "roundId" : 1384309800 + }, { + "originalTargetProfile" : { + "protocol" : "tcp", + "remotePort" : 80, + "remoteIpAddress" : "120.98.134.7" + }, + "server" : "www.google.com:443", + "udpProbeMode" : "unknown", + "agentId" : "861b7557-cd57-4bbb-b648-00bddf88ef49", + "asnDetails" : { + "asName" : "ThousandEyes, Inc", + "asNumber" : 394101 + }, + "vpnProfile" : { + "vpnClientNetworkRange" : [ "9.88.37.27", "9.88.37.27" ], + "vpnGatewayAddress" : "120.98.134.7", + "vpnType" : "cisco-anyconnect", + "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] + }, + "sourcePrefix" : "196.40.96.0/20", + "tcpProbeMode" : "auto", + "protocol" : "icmp", + "systemMetrics" : { + "cpuUtilization" : { + "min" : 0.22, + "median" : 0.61, + "max" : 0.75, + "mean" : 0.55, + "count" : 150, + "stdDev" : 0.01 + }, + "physicalMemoryTotalBytes" : 1024, + "startTimeMs" : 1581508857327, + "physicalMemoryUsedBytes" : { + "min" : 1.2, + "median" : 1.85, + "max" : 2.5, + "mean" : 1.77, + "count" : 155, + "stdDev" : 0.25 + }, + "endTimeMs" : 1581508867333 + }, + "sourceIp" : "196.40.106.237", + "application" : "webex", + "pathTraces" : [ { + "numberOfHops" : 15, + "responseTime" : 1500, + "ipAddress" : "196.40.106.237", + "pathId" : "1230899668701775614109128428722974545787322404682781961521" + }, { + "numberOfHops" : 15, + "responseTime" : 1500, + "ipAddress" : "196.40.106.237", + "pathId" : "1230899668701775614109128428722974545787322404682781961521" + } ], + "serverIp" : "185.199.108.153", + "networkProfile" : { + "previousInterface" : { + "publicIpAddress" : "84.255.241.1", + "publicIpRange" : "84.255.241.0-84.255.241.255", + "ipAddress" : "10.0.0.13", + "hardwareType" : "wireless", + "localPrefix" : "10.0.0.0", + "interfaceName" : "en0", + "subnetMask" : "255.255.255.0", + "dnsServers" : [ "8.8.8.8", "8.8.8.4" ] + }, + "ethernetProfile" : { + "linkSpeed" : 860 + }, + "publicIpAddress" : "84.255.241.1", + "publicIpRange" : "84.255.241.0-84.255.241.255", + "ipAddress" : "10.0.0.13", + "hardwareType" : "wireless", + "localPrefix" : "10.0.0.0", + "proxyProfile" : { + "method" : "System", + "proxies" : [ { + "bypass" : "*.local;169.254/16", + "proxy" : "" + }, { + "bypass" : "*.local;169.254/16", + "proxy" : "" + } ] + }, + "subnetMask" : "255.255.255.0", + "error" : "An operation timed out.", + "wirelessProfile" : { + "rssi" : -38, + "bssid" : "4c:ba:ba:f4:fa:fa", + "vendor" : "Cisco", + "txRate" : 130, + "channel" : 1, + "noise" : -95, + "phyMode" : "802.11n", + "ssid" : "Internet for the masses", + "quality" : 100 + }, + "interfaceName" : "en0", + "dnsServers" : [ "8.8.8.8", "8.8.8.4" ], + "gateway" : "10.0.0.1" + }, + "location" : "San Francisco Area", + "webex" : { + "remoteSipSessionId" : "22581707460321454", + "localSipSessionId" : "22581707460321454", + "conferenceId" : "225817074608419375", + "correlationId" : "22581707460321454" + }, + "aid" : "1234", + "roundId" : 1384309800 + } ], + "startDate" : "2022-07-17T22:00:54Z" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.endpoint_test_results.models.PathVisDynamicTestResults.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-endpoint-test-results/test/test_network_scheduled_tests_results_api.py b/thousandeyes-sdk-endpoint-test-results/test/test_network_scheduled_tests_results_api.py new file mode 100644 index 00000000..75be1645 --- /dev/null +++ b/thousandeyes-sdk-endpoint-test-results/test/test_network_scheduled_tests_results_api.py @@ -0,0 +1,1329 @@ +# coding: utf-8 + +""" + Endpoint Test Results API + + Retrieve results for scheduled and dynamic tests on endpoint agents. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.endpoint_test_results.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.endpoint_test_results.api.network_scheduled_tests_results_api import NetworkScheduledTestsResultsApi + + +class TestNetworkScheduledTestsResultsApi(unittest.TestCase): + """NetworkScheduledTestsResultsApi unit test stubs""" + + def setUp(self) -> None: + self.api = NetworkScheduledTestsResultsApi() + + def tearDown(self) -> None: + pass + + def test_filter_scheduled_test_network_results_models_validation(self) -> None: + """Test case for filter_scheduled_test_network_results request and response models""" + request_body_json = """ + { + "searchSort" : [ { + "sort" : "round-id", + "order" : "desc" + }, { + "sort" : "round-id", + "order" : "desc" + } ], + "searchFilters" : { + "agentId" : [ "52455b09-ff1b-4849-8194-99026cc890e0", "52455b09-ff1b-4849-8194-99026cc890e0" ] + }, + "thresholdFilter" : { + "conditionalOperator" : "and", + "filters" : [ { + "name" : "loss", + "value" : 10.0, + "operator" : "gte" + }, { + "name" : "loss", + "value" : 10.0, + "operator" : "gte" + } ] + } + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.endpoint_test_results.models.TestsDataRoundsSearch.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + 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" + } + }, + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "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", + "port" : 80, + "isEnabled" : true, + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "aid" : "1234", + "agentSelectorConfig" : { + "agentSelectorType" : "all-agents", + "maxMachines" : 10 + }, + "hasPathTraceInSession" : true, + "testName" : "Test name" + }, + "totalHits" : 12, + "endDate" : "2022-07-18T22:00:54Z", + "_links" : { + "next" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "results" : [ { + "originalTargetProfile" : { + "protocol" : "tcp", + "remotePort" : 80, + "remoteIpAddress" : "120.98.134.7" + }, + "agentId" : "861b7557-cd57-4bbb-b648-00bddf88ef49", + "isIcmpBlocked" : true, + "avgLatency" : 167.04, + "minLatency" : 167.0, + "vpnProfile" : { + "vpnClientNetworkRange" : [ "9.88.37.27", "9.88.37.27" ], + "vpnGatewayAddress" : "120.98.134.7", + "vpnType" : "cisco-anyconnect", + "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] + }, + "maxLatency" : 168.0, + "loss" : 0.0, + "systemMetrics" : { + "cpuUtilization" : { + "min" : 0.22, + "median" : 0.61, + "max" : 0.75, + "mean" : 0.55, + "count" : 150, + "stdDev" : 0.01 + }, + "physicalMemoryTotalBytes" : 1024, + "startTimeMs" : 1581508857327, + "physicalMemoryUsedBytes" : { + "min" : 1.2, + "median" : 1.85, + "max" : 2.5, + "mean" : 1.77, + "count" : 155, + "stdDev" : 0.25 + }, + "endTimeMs" : 1581508867333 + }, + "jitter" : 0.076808, + "serverIp" : "185.199.108.153", + "networkProfile" : { + "previousInterface" : { + "publicIpAddress" : "84.255.241.1", + "publicIpRange" : "84.255.241.0-84.255.241.255", + "ipAddress" : "10.0.0.13", + "hardwareType" : "wireless", + "localPrefix" : "10.0.0.0", + "interfaceName" : "en0", + "subnetMask" : "255.255.255.0", + "dnsServers" : [ "8.8.8.8", "8.8.8.4" ] + }, + "ethernetProfile" : { + "linkSpeed" : 860 + }, + "publicIpAddress" : "84.255.241.1", + "publicIpRange" : "84.255.241.0-84.255.241.255", + "ipAddress" : "10.0.0.13", + "hardwareType" : "wireless", + "localPrefix" : "10.0.0.0", + "proxyProfile" : { + "method" : "System", + "proxies" : [ { + "bypass" : "*.local;169.254/16", + "proxy" : "" + }, { + "bypass" : "*.local;169.254/16", + "proxy" : "" + } ] + }, + "subnetMask" : "255.255.255.0", + "error" : "An operation timed out.", + "wirelessProfile" : { + "rssi" : -38, + "bssid" : "4c:ba:ba:f4:fa:fa", + "vendor" : "Cisco", + "txRate" : 130, + "channel" : 1, + "noise" : -95, + "phyMode" : "802.11n", + "ssid" : "Internet for the masses", + "quality" : 100 + }, + "interfaceName" : "en0", + "dnsServers" : [ "8.8.8.8", "8.8.8.4" ], + "gateway" : "10.0.0.1" + }, + "aid" : "1234", + "roundId" : 1384309800, + "errorDetails" : "Error" + }, { + "originalTargetProfile" : { + "protocol" : "tcp", + "remotePort" : 80, + "remoteIpAddress" : "120.98.134.7" + }, + "agentId" : "861b7557-cd57-4bbb-b648-00bddf88ef49", + "isIcmpBlocked" : true, + "avgLatency" : 167.04, + "minLatency" : 167.0, + "vpnProfile" : { + "vpnClientNetworkRange" : [ "9.88.37.27", "9.88.37.27" ], + "vpnGatewayAddress" : "120.98.134.7", + "vpnType" : "cisco-anyconnect", + "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] + }, + "maxLatency" : 168.0, + "loss" : 0.0, + "systemMetrics" : { + "cpuUtilization" : { + "min" : 0.22, + "median" : 0.61, + "max" : 0.75, + "mean" : 0.55, + "count" : 150, + "stdDev" : 0.01 + }, + "physicalMemoryTotalBytes" : 1024, + "startTimeMs" : 1581508857327, + "physicalMemoryUsedBytes" : { + "min" : 1.2, + "median" : 1.85, + "max" : 2.5, + "mean" : 1.77, + "count" : 155, + "stdDev" : 0.25 + }, + "endTimeMs" : 1581508867333 + }, + "jitter" : 0.076808, + "serverIp" : "185.199.108.153", + "networkProfile" : { + "previousInterface" : { + "publicIpAddress" : "84.255.241.1", + "publicIpRange" : "84.255.241.0-84.255.241.255", + "ipAddress" : "10.0.0.13", + "hardwareType" : "wireless", + "localPrefix" : "10.0.0.0", + "interfaceName" : "en0", + "subnetMask" : "255.255.255.0", + "dnsServers" : [ "8.8.8.8", "8.8.8.4" ] + }, + "ethernetProfile" : { + "linkSpeed" : 860 + }, + "publicIpAddress" : "84.255.241.1", + "publicIpRange" : "84.255.241.0-84.255.241.255", + "ipAddress" : "10.0.0.13", + "hardwareType" : "wireless", + "localPrefix" : "10.0.0.0", + "proxyProfile" : { + "method" : "System", + "proxies" : [ { + "bypass" : "*.local;169.254/16", + "proxy" : "" + }, { + "bypass" : "*.local;169.254/16", + "proxy" : "" + } ] + }, + "subnetMask" : "255.255.255.0", + "error" : "An operation timed out.", + "wirelessProfile" : { + "rssi" : -38, + "bssid" : "4c:ba:ba:f4:fa:fa", + "vendor" : "Cisco", + "txRate" : 130, + "channel" : 1, + "noise" : -95, + "phyMode" : "802.11n", + "ssid" : "Internet for the masses", + "quality" : 100 + }, + "interfaceName" : "en0", + "dnsServers" : [ "8.8.8.8", "8.8.8.4" ], + "gateway" : "10.0.0.1" + }, + "aid" : "1234", + "roundId" : 1384309800, + "errorDetails" : "Error" + } ], + "startDate" : "2022-07-17T22:00:54Z" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.endpoint_test_results.models.NetworkTestResults.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_filter_scheduled_tests_network_results_models_validation(self) -> None: + """Test case for filter_scheduled_tests_network_results request and response models""" + request_body_json = """ + { + "searchSort" : [ { + "sort" : "round-id", + "order" : "desc" + }, { + "sort" : "round-id", + "order" : "desc" + } ], + "searchFilters" : { + "agentId" : [ "52455b09-ff1b-4849-8194-99026cc890e0", "52455b09-ff1b-4849-8194-99026cc890e0" ], + "testId" : [ "5", "5" ] + }, + "thresholdFilter" : { + "conditionalOperator" : "and", + "filters" : [ { + "name" : "loss", + "value" : 10.0, + "operator" : "gte" + }, { + "name" : "loss", + "value" : 10.0, + "operator" : "gte" + } ] + } + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.endpoint_test_results.models.MultiTestIdTestsDataRoundsSearch.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "totalHits" : 12, + "endDate" : "2022-07-18T22:00:54Z", + "_links" : { + "next" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "results" : [ { + "originalTargetProfile" : { + "protocol" : "tcp", + "remotePort" : 80, + "remoteIpAddress" : "120.98.134.7" + }, + "agentId" : "861b7557-cd57-4bbb-b648-00bddf88ef49", + "isIcmpBlocked" : true, + "avgLatency" : 167.04, + "minLatency" : 167.0, + "vpnProfile" : { + "vpnClientNetworkRange" : [ "9.88.37.27", "9.88.37.27" ], + "vpnGatewayAddress" : "120.98.134.7", + "vpnType" : "cisco-anyconnect", + "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] + }, + "maxLatency" : 168.0, + "loss" : 0.0, + "systemMetrics" : { + "cpuUtilization" : { + "min" : 0.22, + "median" : 0.61, + "max" : 0.75, + "mean" : 0.55, + "count" : 150, + "stdDev" : 0.01 + }, + "physicalMemoryTotalBytes" : 1024, + "startTimeMs" : 1581508857327, + "physicalMemoryUsedBytes" : { + "min" : 1.2, + "median" : 1.85, + "max" : 2.5, + "mean" : 1.77, + "count" : 155, + "stdDev" : 0.25 + }, + "endTimeMs" : 1581508867333 + }, + "jitter" : 0.076808, + "serverIp" : "185.199.108.153", + "networkProfile" : { + "previousInterface" : { + "publicIpAddress" : "84.255.241.1", + "publicIpRange" : "84.255.241.0-84.255.241.255", + "ipAddress" : "10.0.0.13", + "hardwareType" : "wireless", + "localPrefix" : "10.0.0.0", + "interfaceName" : "en0", + "subnetMask" : "255.255.255.0", + "dnsServers" : [ "8.8.8.8", "8.8.8.4" ] + }, + "ethernetProfile" : { + "linkSpeed" : 860 + }, + "publicIpAddress" : "84.255.241.1", + "publicIpRange" : "84.255.241.0-84.255.241.255", + "ipAddress" : "10.0.0.13", + "hardwareType" : "wireless", + "localPrefix" : "10.0.0.0", + "proxyProfile" : { + "method" : "System", + "proxies" : [ { + "bypass" : "*.local;169.254/16", + "proxy" : "" + }, { + "bypass" : "*.local;169.254/16", + "proxy" : "" + } ] + }, + "subnetMask" : "255.255.255.0", + "error" : "An operation timed out.", + "wirelessProfile" : { + "rssi" : -38, + "bssid" : "4c:ba:ba:f4:fa:fa", + "vendor" : "Cisco", + "txRate" : 130, + "channel" : 1, + "noise" : -95, + "phyMode" : "802.11n", + "ssid" : "Internet for the masses", + "quality" : 100 + }, + "interfaceName" : "en0", + "dnsServers" : [ "8.8.8.8", "8.8.8.4" ], + "gateway" : "10.0.0.1" + }, + "aid" : "1234", + "roundId" : 1384309800, + "errorDetails" : "Error" + }, { + "originalTargetProfile" : { + "protocol" : "tcp", + "remotePort" : 80, + "remoteIpAddress" : "120.98.134.7" + }, + "agentId" : "861b7557-cd57-4bbb-b648-00bddf88ef49", + "isIcmpBlocked" : true, + "avgLatency" : 167.04, + "minLatency" : 167.0, + "vpnProfile" : { + "vpnClientNetworkRange" : [ "9.88.37.27", "9.88.37.27" ], + "vpnGatewayAddress" : "120.98.134.7", + "vpnType" : "cisco-anyconnect", + "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] + }, + "maxLatency" : 168.0, + "loss" : 0.0, + "systemMetrics" : { + "cpuUtilization" : { + "min" : 0.22, + "median" : 0.61, + "max" : 0.75, + "mean" : 0.55, + "count" : 150, + "stdDev" : 0.01 + }, + "physicalMemoryTotalBytes" : 1024, + "startTimeMs" : 1581508857327, + "physicalMemoryUsedBytes" : { + "min" : 1.2, + "median" : 1.85, + "max" : 2.5, + "mean" : 1.77, + "count" : 155, + "stdDev" : 0.25 + }, + "endTimeMs" : 1581508867333 + }, + "jitter" : 0.076808, + "serverIp" : "185.199.108.153", + "networkProfile" : { + "previousInterface" : { + "publicIpAddress" : "84.255.241.1", + "publicIpRange" : "84.255.241.0-84.255.241.255", + "ipAddress" : "10.0.0.13", + "hardwareType" : "wireless", + "localPrefix" : "10.0.0.0", + "interfaceName" : "en0", + "subnetMask" : "255.255.255.0", + "dnsServers" : [ "8.8.8.8", "8.8.8.4" ] + }, + "ethernetProfile" : { + "linkSpeed" : 860 + }, + "publicIpAddress" : "84.255.241.1", + "publicIpRange" : "84.255.241.0-84.255.241.255", + "ipAddress" : "10.0.0.13", + "hardwareType" : "wireless", + "localPrefix" : "10.0.0.0", + "proxyProfile" : { + "method" : "System", + "proxies" : [ { + "bypass" : "*.local;169.254/16", + "proxy" : "" + }, { + "bypass" : "*.local;169.254/16", + "proxy" : "" + } ] + }, + "subnetMask" : "255.255.255.0", + "error" : "An operation timed out.", + "wirelessProfile" : { + "rssi" : -38, + "bssid" : "4c:ba:ba:f4:fa:fa", + "vendor" : "Cisco", + "txRate" : 130, + "channel" : 1, + "noise" : -95, + "phyMode" : "802.11n", + "ssid" : "Internet for the masses", + "quality" : 100 + }, + "interfaceName" : "en0", + "dnsServers" : [ "8.8.8.8", "8.8.8.4" ], + "gateway" : "10.0.0.1" + }, + "aid" : "1234", + "roundId" : 1384309800, + "errorDetails" : "Error" + } ], + "startDate" : "2022-07-17T22:00:54Z" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.endpoint_test_results.models.MultiTestIdNetworkTestResults.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_scheduled_test_path_vis_agent_round_results_models_validation(self) -> None: + """Test case for get_scheduled_test_path_vis_agent_round_results request and response models""" + + 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" + } + }, + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "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", + "port" : 80, + "isEnabled" : true, + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "aid" : "1234", + "agentSelectorConfig" : { + "agentSelectorType" : "all-agents", + "maxMachines" : 10 + }, + "hasPathTraceInSession" : true, + "testName" : "Test name" + }, + "_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" + } + }, + "results" : [ { + "originalTargetProfile" : { + "protocol" : "tcp", + "remotePort" : 80, + "remoteIpAddress" : "120.98.134.7" + }, + "server" : "www.google.com:443", + "agentId" : "861b7557-cd57-4bbb-b648-00bddf88ef49", + "asnDetails" : { + "asName" : "ThousandEyes, Inc", + "asNumber" : 394101 + }, + "vpnProfile" : { + "vpnClientNetworkRange" : [ "9.88.37.27", "9.88.37.27" ], + "vpnGatewayAddress" : "120.98.134.7", + "vpnType" : "cisco-anyconnect", + "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] + }, + "sourcePrefix" : "196.40.96.0/20", + "systemMetrics" : { + "cpuUtilization" : { + "min" : 0.22, + "median" : 0.61, + "max" : 0.75, + "mean" : 0.55, + "count" : 150, + "stdDev" : 0.01 + }, + "physicalMemoryTotalBytes" : 1024, + "startTimeMs" : 1581508857327, + "physicalMemoryUsedBytes" : { + "min" : 1.2, + "median" : 1.85, + "max" : 2.5, + "mean" : 1.77, + "count" : 155, + "stdDev" : 0.25 + }, + "endTimeMs" : 1581508867333 + }, + "sourceIp" : "196.40.106.237", + "pathTraces" : [ { + "hops" : [ { + "rdns" : "core-router1.cpt2.host-h.net", + "prefix" : "196.40.96.0/20", + "responseTime" : 1, + "hop" : 1, + "ipAddress" : "196.40.106.237", + "location" : "Cape Town, South Africa", + "network" : "HETZNER (Pty) Ltd (AS 37153)" + }, { + "rdns" : "core-router1.cpt2.host-h.net", + "prefix" : "196.40.96.0/20", + "responseTime" : 1, + "hop" : 1, + "ipAddress" : "196.40.106.237", + "location" : "Cape Town, South Africa", + "network" : "HETZNER (Pty) Ltd (AS 37153)" + } ], + "pathId" : "4711301366345855606023718047703941305741293841502186803" + }, { + "hops" : [ { + "rdns" : "core-router1.cpt2.host-h.net", + "prefix" : "196.40.96.0/20", + "responseTime" : 1, + "hop" : 1, + "ipAddress" : "196.40.106.237", + "location" : "Cape Town, South Africa", + "network" : "HETZNER (Pty) Ltd (AS 37153)" + }, { + "rdns" : "core-router1.cpt2.host-h.net", + "prefix" : "196.40.96.0/20", + "responseTime" : 1, + "hop" : 1, + "ipAddress" : "196.40.106.237", + "location" : "Cape Town, South Africa", + "network" : "HETZNER (Pty) Ltd (AS 37153)" + } ], + "pathId" : "4711301366345855606023718047703941305741293841502186803" + } ], + "vpnPathTraces" : [ { + "hops" : [ { + "rdns" : "core-router1.cpt2.host-h.net", + "prefix" : "196.40.96.0/20", + "responseTime" : 1, + "hop" : 1, + "ipAddress" : "196.40.106.237", + "location" : "Cape Town, South Africa", + "network" : "HETZNER (Pty) Ltd (AS 37153)" + }, { + "rdns" : "core-router1.cpt2.host-h.net", + "prefix" : "196.40.96.0/20", + "responseTime" : 1, + "hop" : 1, + "ipAddress" : "196.40.106.237", + "location" : "Cape Town, South Africa", + "network" : "HETZNER (Pty) Ltd (AS 37153)" + } ], + "pathId" : "4711301366345855606023718047703941305741293841502186803" + }, { + "hops" : [ { + "rdns" : "core-router1.cpt2.host-h.net", + "prefix" : "196.40.96.0/20", + "responseTime" : 1, + "hop" : 1, + "ipAddress" : "196.40.106.237", + "location" : "Cape Town, South Africa", + "network" : "HETZNER (Pty) Ltd (AS 37153)" + }, { + "rdns" : "core-router1.cpt2.host-h.net", + "prefix" : "196.40.96.0/20", + "responseTime" : 1, + "hop" : 1, + "ipAddress" : "196.40.106.237", + "location" : "Cape Town, South Africa", + "network" : "HETZNER (Pty) Ltd (AS 37153)" + } ], + "pathId" : "4711301366345855606023718047703941305741293841502186803" + } ], + "serverIp" : "185.199.108.153", + "networkProfile" : { + "previousInterface" : { + "publicIpAddress" : "84.255.241.1", + "publicIpRange" : "84.255.241.0-84.255.241.255", + "ipAddress" : "10.0.0.13", + "hardwareType" : "wireless", + "localPrefix" : "10.0.0.0", + "interfaceName" : "en0", + "subnetMask" : "255.255.255.0", + "dnsServers" : [ "8.8.8.8", "8.8.8.4" ] + }, + "ethernetProfile" : { + "linkSpeed" : 860 + }, + "publicIpAddress" : "84.255.241.1", + "publicIpRange" : "84.255.241.0-84.255.241.255", + "ipAddress" : "10.0.0.13", + "hardwareType" : "wireless", + "localPrefix" : "10.0.0.0", + "proxyProfile" : { + "method" : "System", + "proxies" : [ { + "bypass" : "*.local;169.254/16", + "proxy" : "" + }, { + "bypass" : "*.local;169.254/16", + "proxy" : "" + } ] + }, + "subnetMask" : "255.255.255.0", + "error" : "An operation timed out.", + "wirelessProfile" : { + "rssi" : -38, + "bssid" : "4c:ba:ba:f4:fa:fa", + "vendor" : "Cisco", + "txRate" : 130, + "channel" : 1, + "noise" : -95, + "phyMode" : "802.11n", + "ssid" : "Internet for the masses", + "quality" : 100 + }, + "interfaceName" : "en0", + "dnsServers" : [ "8.8.8.8", "8.8.8.4" ], + "gateway" : "10.0.0.1" + }, + "aid" : "1234", + "roundId" : 1384309800 + }, { + "originalTargetProfile" : { + "protocol" : "tcp", + "remotePort" : 80, + "remoteIpAddress" : "120.98.134.7" + }, + "server" : "www.google.com:443", + "agentId" : "861b7557-cd57-4bbb-b648-00bddf88ef49", + "asnDetails" : { + "asName" : "ThousandEyes, Inc", + "asNumber" : 394101 + }, + "vpnProfile" : { + "vpnClientNetworkRange" : [ "9.88.37.27", "9.88.37.27" ], + "vpnGatewayAddress" : "120.98.134.7", + "vpnType" : "cisco-anyconnect", + "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] + }, + "sourcePrefix" : "196.40.96.0/20", + "systemMetrics" : { + "cpuUtilization" : { + "min" : 0.22, + "median" : 0.61, + "max" : 0.75, + "mean" : 0.55, + "count" : 150, + "stdDev" : 0.01 + }, + "physicalMemoryTotalBytes" : 1024, + "startTimeMs" : 1581508857327, + "physicalMemoryUsedBytes" : { + "min" : 1.2, + "median" : 1.85, + "max" : 2.5, + "mean" : 1.77, + "count" : 155, + "stdDev" : 0.25 + }, + "endTimeMs" : 1581508867333 + }, + "sourceIp" : "196.40.106.237", + "pathTraces" : [ { + "hops" : [ { + "rdns" : "core-router1.cpt2.host-h.net", + "prefix" : "196.40.96.0/20", + "responseTime" : 1, + "hop" : 1, + "ipAddress" : "196.40.106.237", + "location" : "Cape Town, South Africa", + "network" : "HETZNER (Pty) Ltd (AS 37153)" + }, { + "rdns" : "core-router1.cpt2.host-h.net", + "prefix" : "196.40.96.0/20", + "responseTime" : 1, + "hop" : 1, + "ipAddress" : "196.40.106.237", + "location" : "Cape Town, South Africa", + "network" : "HETZNER (Pty) Ltd (AS 37153)" + } ], + "pathId" : "4711301366345855606023718047703941305741293841502186803" + }, { + "hops" : [ { + "rdns" : "core-router1.cpt2.host-h.net", + "prefix" : "196.40.96.0/20", + "responseTime" : 1, + "hop" : 1, + "ipAddress" : "196.40.106.237", + "location" : "Cape Town, South Africa", + "network" : "HETZNER (Pty) Ltd (AS 37153)" + }, { + "rdns" : "core-router1.cpt2.host-h.net", + "prefix" : "196.40.96.0/20", + "responseTime" : 1, + "hop" : 1, + "ipAddress" : "196.40.106.237", + "location" : "Cape Town, South Africa", + "network" : "HETZNER (Pty) Ltd (AS 37153)" + } ], + "pathId" : "4711301366345855606023718047703941305741293841502186803" + } ], + "vpnPathTraces" : [ { + "hops" : [ { + "rdns" : "core-router1.cpt2.host-h.net", + "prefix" : "196.40.96.0/20", + "responseTime" : 1, + "hop" : 1, + "ipAddress" : "196.40.106.237", + "location" : "Cape Town, South Africa", + "network" : "HETZNER (Pty) Ltd (AS 37153)" + }, { + "rdns" : "core-router1.cpt2.host-h.net", + "prefix" : "196.40.96.0/20", + "responseTime" : 1, + "hop" : 1, + "ipAddress" : "196.40.106.237", + "location" : "Cape Town, South Africa", + "network" : "HETZNER (Pty) Ltd (AS 37153)" + } ], + "pathId" : "4711301366345855606023718047703941305741293841502186803" + }, { + "hops" : [ { + "rdns" : "core-router1.cpt2.host-h.net", + "prefix" : "196.40.96.0/20", + "responseTime" : 1, + "hop" : 1, + "ipAddress" : "196.40.106.237", + "location" : "Cape Town, South Africa", + "network" : "HETZNER (Pty) Ltd (AS 37153)" + }, { + "rdns" : "core-router1.cpt2.host-h.net", + "prefix" : "196.40.96.0/20", + "responseTime" : 1, + "hop" : 1, + "ipAddress" : "196.40.106.237", + "location" : "Cape Town, South Africa", + "network" : "HETZNER (Pty) Ltd (AS 37153)" + } ], + "pathId" : "4711301366345855606023718047703941305741293841502186803" + } ], + "serverIp" : "185.199.108.153", + "networkProfile" : { + "previousInterface" : { + "publicIpAddress" : "84.255.241.1", + "publicIpRange" : "84.255.241.0-84.255.241.255", + "ipAddress" : "10.0.0.13", + "hardwareType" : "wireless", + "localPrefix" : "10.0.0.0", + "interfaceName" : "en0", + "subnetMask" : "255.255.255.0", + "dnsServers" : [ "8.8.8.8", "8.8.8.4" ] + }, + "ethernetProfile" : { + "linkSpeed" : 860 + }, + "publicIpAddress" : "84.255.241.1", + "publicIpRange" : "84.255.241.0-84.255.241.255", + "ipAddress" : "10.0.0.13", + "hardwareType" : "wireless", + "localPrefix" : "10.0.0.0", + "proxyProfile" : { + "method" : "System", + "proxies" : [ { + "bypass" : "*.local;169.254/16", + "proxy" : "" + }, { + "bypass" : "*.local;169.254/16", + "proxy" : "" + } ] + }, + "subnetMask" : "255.255.255.0", + "error" : "An operation timed out.", + "wirelessProfile" : { + "rssi" : -38, + "bssid" : "4c:ba:ba:f4:fa:fa", + "vendor" : "Cisco", + "txRate" : 130, + "channel" : 1, + "noise" : -95, + "phyMode" : "802.11n", + "ssid" : "Internet for the masses", + "quality" : 100 + }, + "interfaceName" : "en0", + "dnsServers" : [ "8.8.8.8", "8.8.8.4" ], + "gateway" : "10.0.0.1" + }, + "aid" : "1234", + "roundId" : 1384309800 + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.endpoint_test_results.models.PathVisDetailTestResults.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_scheduled_test_path_vis_results_models_validation(self) -> None: + """Test case for get_scheduled_test_path_vis_results request and response models""" + + 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" + } + }, + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "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", + "port" : 80, + "isEnabled" : true, + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "aid" : "1234", + "agentSelectorConfig" : { + "agentSelectorType" : "all-agents", + "maxMachines" : 10 + }, + "hasPathTraceInSession" : true, + "testName" : "Test name" + }, + "endDate" : "2022-07-18T22:00:54Z", + "_links" : { + "next" : { + "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" + } + }, + "results" : [ { + "originalTargetProfile" : { + "protocol" : "tcp", + "remotePort" : 80, + "remoteIpAddress" : "120.98.134.7" + }, + "server" : "www.google.com:443", + "agentId" : "861b7557-cd57-4bbb-b648-00bddf88ef49", + "asnDetails" : { + "asName" : "ThousandEyes, Inc", + "asNumber" : 394101 + }, + "vpnProfile" : { + "vpnClientNetworkRange" : [ "9.88.37.27", "9.88.37.27" ], + "vpnGatewayAddress" : "120.98.134.7", + "vpnType" : "cisco-anyconnect", + "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] + }, + "sourcePrefix" : "196.40.96.0/20", + "systemMetrics" : { + "cpuUtilization" : { + "min" : 0.22, + "median" : 0.61, + "max" : 0.75, + "mean" : 0.55, + "count" : 150, + "stdDev" : 0.01 + }, + "physicalMemoryTotalBytes" : 1024, + "startTimeMs" : 1581508857327, + "physicalMemoryUsedBytes" : { + "min" : 1.2, + "median" : 1.85, + "max" : 2.5, + "mean" : 1.77, + "count" : 155, + "stdDev" : 0.25 + }, + "endTimeMs" : 1581508867333 + }, + "sourceIp" : "196.40.106.237", + "pathTraces" : [ { + "numberOfHops" : 15, + "responseTime" : 1500, + "ipAddress" : "196.40.106.237", + "pathId" : "1230899668701775614109128428722974545787322404682781961521" + }, { + "numberOfHops" : 15, + "responseTime" : 1500, + "ipAddress" : "196.40.106.237", + "pathId" : "1230899668701775614109128428722974545787322404682781961521" + } ], + "serverIp" : "185.199.108.153", + "networkProfile" : { + "previousInterface" : { + "publicIpAddress" : "84.255.241.1", + "publicIpRange" : "84.255.241.0-84.255.241.255", + "ipAddress" : "10.0.0.13", + "hardwareType" : "wireless", + "localPrefix" : "10.0.0.0", + "interfaceName" : "en0", + "subnetMask" : "255.255.255.0", + "dnsServers" : [ "8.8.8.8", "8.8.8.4" ] + }, + "ethernetProfile" : { + "linkSpeed" : 860 + }, + "publicIpAddress" : "84.255.241.1", + "publicIpRange" : "84.255.241.0-84.255.241.255", + "ipAddress" : "10.0.0.13", + "hardwareType" : "wireless", + "localPrefix" : "10.0.0.0", + "proxyProfile" : { + "method" : "System", + "proxies" : [ { + "bypass" : "*.local;169.254/16", + "proxy" : "" + }, { + "bypass" : "*.local;169.254/16", + "proxy" : "" + } ] + }, + "subnetMask" : "255.255.255.0", + "error" : "An operation timed out.", + "wirelessProfile" : { + "rssi" : -38, + "bssid" : "4c:ba:ba:f4:fa:fa", + "vendor" : "Cisco", + "txRate" : 130, + "channel" : 1, + "noise" : -95, + "phyMode" : "802.11n", + "ssid" : "Internet for the masses", + "quality" : 100 + }, + "interfaceName" : "en0", + "dnsServers" : [ "8.8.8.8", "8.8.8.4" ], + "gateway" : "10.0.0.1" + }, + "location" : "San Francisco Area", + "aid" : "1234", + "roundId" : 1384309800 + }, { + "originalTargetProfile" : { + "protocol" : "tcp", + "remotePort" : 80, + "remoteIpAddress" : "120.98.134.7" + }, + "server" : "www.google.com:443", + "agentId" : "861b7557-cd57-4bbb-b648-00bddf88ef49", + "asnDetails" : { + "asName" : "ThousandEyes, Inc", + "asNumber" : 394101 + }, + "vpnProfile" : { + "vpnClientNetworkRange" : [ "9.88.37.27", "9.88.37.27" ], + "vpnGatewayAddress" : "120.98.134.7", + "vpnType" : "cisco-anyconnect", + "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] + }, + "sourcePrefix" : "196.40.96.0/20", + "systemMetrics" : { + "cpuUtilization" : { + "min" : 0.22, + "median" : 0.61, + "max" : 0.75, + "mean" : 0.55, + "count" : 150, + "stdDev" : 0.01 + }, + "physicalMemoryTotalBytes" : 1024, + "startTimeMs" : 1581508857327, + "physicalMemoryUsedBytes" : { + "min" : 1.2, + "median" : 1.85, + "max" : 2.5, + "mean" : 1.77, + "count" : 155, + "stdDev" : 0.25 + }, + "endTimeMs" : 1581508867333 + }, + "sourceIp" : "196.40.106.237", + "pathTraces" : [ { + "numberOfHops" : 15, + "responseTime" : 1500, + "ipAddress" : "196.40.106.237", + "pathId" : "1230899668701775614109128428722974545787322404682781961521" + }, { + "numberOfHops" : 15, + "responseTime" : 1500, + "ipAddress" : "196.40.106.237", + "pathId" : "1230899668701775614109128428722974545787322404682781961521" + } ], + "serverIp" : "185.199.108.153", + "networkProfile" : { + "previousInterface" : { + "publicIpAddress" : "84.255.241.1", + "publicIpRange" : "84.255.241.0-84.255.241.255", + "ipAddress" : "10.0.0.13", + "hardwareType" : "wireless", + "localPrefix" : "10.0.0.0", + "interfaceName" : "en0", + "subnetMask" : "255.255.255.0", + "dnsServers" : [ "8.8.8.8", "8.8.8.4" ] + }, + "ethernetProfile" : { + "linkSpeed" : 860 + }, + "publicIpAddress" : "84.255.241.1", + "publicIpRange" : "84.255.241.0-84.255.241.255", + "ipAddress" : "10.0.0.13", + "hardwareType" : "wireless", + "localPrefix" : "10.0.0.0", + "proxyProfile" : { + "method" : "System", + "proxies" : [ { + "bypass" : "*.local;169.254/16", + "proxy" : "" + }, { + "bypass" : "*.local;169.254/16", + "proxy" : "" + } ] + }, + "subnetMask" : "255.255.255.0", + "error" : "An operation timed out.", + "wirelessProfile" : { + "rssi" : -38, + "bssid" : "4c:ba:ba:f4:fa:fa", + "vendor" : "Cisco", + "txRate" : 130, + "channel" : 1, + "noise" : -95, + "phyMode" : "802.11n", + "ssid" : "Internet for the masses", + "quality" : 100 + }, + "interfaceName" : "en0", + "dnsServers" : [ "8.8.8.8", "8.8.8.4" ], + "gateway" : "10.0.0.1" + }, + "location" : "San Francisco Area", + "aid" : "1234", + "roundId" : 1384309800 + } ], + "startDate" : "2022-07-17T22:00:54Z" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.endpoint_test_results.models.PathVisTestResults.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-endpoint-test-results/test/test_real_user_tests_results_api.py b/thousandeyes-sdk-endpoint-test-results/test/test_real_user_tests_results_api.py new file mode 100644 index 00000000..9131e99a --- /dev/null +++ b/thousandeyes-sdk-endpoint-test-results/test/test_real_user_tests_results_api.py @@ -0,0 +1,1017 @@ +# coding: utf-8 + +""" + Endpoint Test Results API + + Retrieve results for scheduled and dynamic tests on endpoint agents. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.endpoint_test_results.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.endpoint_test_results.api.real_user_tests_results_api import RealUserTestsResultsApi + + +class TestRealUserTestsResultsApi(unittest.TestCase): + """RealUserTestsResultsApi unit test stubs""" + + def setUp(self) -> None: + self.api = RealUserTestsResultsApi() + + def tearDown(self) -> None: + pass + + def test_filter_real_user_tests_network_results_models_validation(self) -> None: + """Test case for filter_real_user_tests_network_results request and response models""" + request_body_json = """ + { + "searchFilters" : { + "agentId" : [ "3fde6422-f119-40e1-ae32-d08a1243c038", "236e6f18-9637-4a2f-b15f-7aa6a29c9fce" ], + "bssid" : [ "8c:68:c8:a5:0a:8c", "0c:51:01:e4:3e:d0" ], + "visitedSite" : [ "app.thousandeyes.com" ], + "trigger" : [ "user" ], + "ssid" : [ "wifi-name", "other-room-wifi" ], + "platform" : [ "mac", "mac" ], + "proxyTarget" : [ "78.153.54.204", "78.153.54.206" ], + "destinationIp" : [ "84.255.241.1", "193.2.1.88" ], + "domain" : [ "thousandeyes.com" ], + "location" : [ "San Francisco Bay Area", "Germany" ], + "connection" : [ "wireless", "wireless" ], + "vpnTarget" : [ "78.153.54.204", "78.153.54.206" ], + "networkId" : [ "660b34109d12", "660b34109d15" ], + "gateway" : [ "78.153.54.204", "78.153.54.206" ] + } + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.endpoint_test_results.models.EndpointRealUserTestResultsRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "endDate" : "2022-07-18T22:00:54Z", + "_links" : { + "next" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "results" : [ { + "date" : "2022-07-17T22:00:54Z", + "proxy" : { + "loss" : 0.1, + "jitter" : 46, + "latency" : 150, + "target" : "54.208.6.220" + }, + "agentId" : "861b7557-cd57-4bbb-b648-00bddf88ef49", + "systemMetrics" : { + "cpuUtilization" : { + "min" : 0.22, + "median" : 0.61, + "max" : 0.75, + "mean" : 0.55, + "count" : 150, + "stdDev" : 0.01 + }, + "physicalMemoryTotalBytes" : 1024, + "startTimeMs" : 1581508857327, + "physicalMemoryUsedBytes" : { + "min" : 1.2, + "median" : 1.85, + "max" : 2.5, + "mean" : 1.77, + "count" : 155, + "stdDev" : 0.25 + }, + "endTimeMs" : 1581508867333 + }, + "vpn" : { + "loss" : 0.1, + "jitter" : 46, + "latency" : 150, + "target" : "54.208.6.220" + }, + "destination" : { + "loss" : 0.1, + "jitter" : 46, + "latency" : 150, + "target" : "54.208.6.220" + }, + "id" : "07625:1490529480:aVDViw0i", + "roundId" : 1384309800 + }, { + "date" : "2022-07-17T22:00:54Z", + "proxy" : { + "loss" : 0.1, + "jitter" : 46, + "latency" : 150, + "target" : "54.208.6.220" + }, + "agentId" : "861b7557-cd57-4bbb-b648-00bddf88ef49", + "systemMetrics" : { + "cpuUtilization" : { + "min" : 0.22, + "median" : 0.61, + "max" : 0.75, + "mean" : 0.55, + "count" : 150, + "stdDev" : 0.01 + }, + "physicalMemoryTotalBytes" : 1024, + "startTimeMs" : 1581508857327, + "physicalMemoryUsedBytes" : { + "min" : 1.2, + "median" : 1.85, + "max" : 2.5, + "mean" : 1.77, + "count" : 155, + "stdDev" : 0.25 + }, + "endTimeMs" : 1581508867333 + }, + "vpn" : { + "loss" : 0.1, + "jitter" : 46, + "latency" : 150, + "target" : "54.208.6.220" + }, + "destination" : { + "loss" : 0.1, + "jitter" : 46, + "latency" : 150, + "target" : "54.208.6.220" + }, + "id" : "07625:1490529480:aVDViw0i", + "roundId" : 1384309800 + } ], + "startDate" : "2022-07-17T22:00:54Z" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.endpoint_test_results.models.RealUserTestNetworkResults.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_filter_real_user_tests_results_models_validation(self) -> None: + """Test case for filter_real_user_tests_results request and response models""" + request_body_json = """ + { + "searchFilters" : { + "agentId" : [ "3fde6422-f119-40e1-ae32-d08a1243c038", "236e6f18-9637-4a2f-b15f-7aa6a29c9fce" ], + "bssid" : [ "8c:68:c8:a5:0a:8c", "0c:51:01:e4:3e:d0" ], + "visitedSite" : [ "app.thousandeyes.com" ], + "trigger" : [ "user" ], + "ssid" : [ "wifi-name", "other-room-wifi" ], + "platform" : [ "mac", "mac" ], + "proxyTarget" : [ "78.153.54.204", "78.153.54.206" ], + "destinationIp" : [ "84.255.241.1", "193.2.1.88" ], + "domain" : [ "thousandeyes.com" ], + "location" : [ "San Francisco Bay Area", "Germany" ], + "connection" : [ "wireless", "wireless" ], + "vpnTarget" : [ "78.153.54.204", "78.153.54.206" ], + "networkId" : [ "660b34109d12", "660b34109d15" ], + "gateway" : [ "78.153.54.204", "78.153.54.206" ] + } + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.endpoint_test_results.models.EndpointRealUserTestResultsRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "endDate" : "2022-07-18T22:00:54Z", + "_links" : { + "next" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "results" : [ { + "date" : "2022-07-17T22:00:54Z", + "agentId" : "861b7557-cd57-4bbb-b648-00bddf88ef49", + "committed" : "2022-07-17T22:00:54Z", + "experienceScore" : 0.5, + "sourceAddress" : "84.255.241.1", + "organizationName" : "T-2 Access Network", + "visitedSite" : "www.thousandeyes.com", + "pageId" : "C31gBrYJ", + "protocol" : "https", + "numberOfPages" : 2, + "port" : 443, + "id" : "07625:1490529480:aVDViw0i", + "roundId" : 1384309800 + }, { + "date" : "2022-07-17T22:00:54Z", + "agentId" : "861b7557-cd57-4bbb-b648-00bddf88ef49", + "committed" : "2022-07-17T22:00:54Z", + "experienceScore" : 0.5, + "sourceAddress" : "84.255.241.1", + "organizationName" : "T-2 Access Network", + "visitedSite" : "www.thousandeyes.com", + "pageId" : "C31gBrYJ", + "protocol" : "https", + "numberOfPages" : 2, + "port" : 443, + "id" : "07625:1490529480:aVDViw0i", + "roundId" : 1384309800 + } ], + "startDate" : "2022-07-17T22:00:54Z" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.endpoint_test_results.models.EndpointRealUserTestResults.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_filter_real_user_tests_visited_pages_results_models_validation(self) -> None: + """Test case for filter_real_user_tests_visited_pages_results request and response models""" + request_body_json = """ + { + "agentId" : [ "3fde6422-f119-40e1-ae32-d08a1243c038", "236e6f18-9637-4a2f-b15f-7aa6a29c9fce" ], + "bssid" : [ "8c:68:c8:a5:0a:8c", "0c:51:01:e4:3e:d0" ], + "visitedSite" : [ "app.thousandeyes.com" ], + "trigger" : [ "user" ], + "ssid" : [ "wifi-name", "other-room-wifi" ], + "platform" : [ "mac", "mac" ], + "proxyTarget" : [ "78.153.54.204", "78.153.54.206" ], + "destinationIp" : [ "84.255.241.1", "193.2.1.88" ], + "domain" : [ "thousandeyes.com" ], + "location" : [ "San Francisco Bay Area", "Germany" ], + "connection" : [ "wireless", "wireless" ], + "vpnTarget" : [ "78.153.54.204", "78.153.54.206" ], + "networkId" : [ "660b34109d12", "660b34109d15" ], + "gateway" : [ "78.153.54.204", "78.153.54.206" ] + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.endpoint_test_results.models.EndpointRealUserTestResultRequestFilter.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "endDate" : "2022-07-18T22:00:54Z", + "_links" : { + "next" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "results" : [ { + "pageTimings" : { + "onContentLoad" : 1483, + "onLoad" : 4569 + }, + "agentId" : "861b7557-cd57-4bbb-b648-00bddf88ef49", + "systemMetrics" : { + "cpuUtilization" : { + "min" : 0.22, + "median" : 0.61, + "max" : 0.75, + "mean" : 0.55, + "count" : 150, + "stdDev" : 0.01 + }, + "physicalMemoryTotalBytes" : 1024, + "startTimeMs" : 1581508857327, + "physicalMemoryUsedBytes" : { + "min" : 1.2, + "median" : 1.85, + "max" : 2.5, + "mean" : 1.77, + "count" : 155, + "stdDev" : 0.25 + }, + "endTimeMs" : 1581508867333 + }, + "pageTitle" : "Network Performance Resources | ThousandEyes", + "responseTime" : 240, + "pageUrl" : "https://app.thousandeyes.com/settings/integrations", + "id" : "07625:1490529480:aVDViw0i", + "pageId" : "C31gBrYJ", + "roundId" : 1384309800, + "loadDate" : "2022-07-17T22:00:54Z", + "responseCode" : 200 + }, { + "pageTimings" : { + "onContentLoad" : 1483, + "onLoad" : 4569 + }, + "agentId" : "861b7557-cd57-4bbb-b648-00bddf88ef49", + "systemMetrics" : { + "cpuUtilization" : { + "min" : 0.22, + "median" : 0.61, + "max" : 0.75, + "mean" : 0.55, + "count" : 150, + "stdDev" : 0.01 + }, + "physicalMemoryTotalBytes" : 1024, + "startTimeMs" : 1581508857327, + "physicalMemoryUsedBytes" : { + "min" : 1.2, + "median" : 1.85, + "max" : 2.5, + "mean" : 1.77, + "count" : 155, + "stdDev" : 0.25 + }, + "endTimeMs" : 1581508867333 + }, + "pageTitle" : "Network Performance Resources | ThousandEyes", + "responseTime" : 240, + "pageUrl" : "https://app.thousandeyes.com/settings/integrations", + "id" : "07625:1490529480:aVDViw0i", + "pageId" : "C31gBrYJ", + "roundId" : 1384309800, + "loadDate" : "2022-07-17T22:00:54Z", + "responseCode" : 200 + } ], + "startDate" : "2022-07-17T22:00:54Z" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.endpoint_test_results.models.RealUserTestPageResults.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_real_user_test_page_results_models_validation(self) -> None: + """Test case for get_real_user_test_page_results request and response models""" + + response_body_json = """ + { + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "har" : { + "log" : { + "browser" : { + "name" : "Google Chrome", + "version" : "7.0.6.98" + }, + "creator" : { + "name" : "ThousandEyes Endpoint Agent", + "version" : "7.0.6" + }, + "entries" : [ { + "pageref" : "page_1", + "request" : { + "headers" : [ { + "name" : "Upgrade-Insecure-Requests", + "value" : "1" + }, { + "name" : "User-Agent", + "value" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36" + }, { + "name" : "Accept", + "value" : "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8" + }, { + "name" : "Referer", + "value" : "https://www.thousandeyes.com/" + }, { + "name" : "Accept-Encoding", + "value" : "gzip, deflate, sdch, br" + }, { + "name" : "Accept-Language", + "value" : "en-US,en;q=0.6" + }, { + "name" : "Cookie", + "value" : "(removed)" + } ], + "method" : "GET", + "queryString" : [ { + "name" : "locale", + "value" : "en-US" + } ], + "url" : "https://www.thousandeyes.com/resources" + }, + "response" : { + "bodySize" : 17776, + "content" : { + "mimeType" : "text/html;charset=ISO-8859-1", + "size" : 17776 + }, + "headers" : [ { + "name" : "Content-Type", + "value" : "text/html;charset=ISO-8859-1" + }, { + "name" : "Content-Length", + "value" : "17776" + }, { + "name" : "Connection", + "value" : "keep-alive" + }, { + "name" : "Date", + "value" : "Sun, 26 Mar 2017 11:58:54 GMT" + }, { + "name" : "Server", + "value" : "Apache" + }, { + "name" : "Cache-Control", + "value" : "max-age=600, must-revalidate" + }, { + "name" : "Content-Language", + "value" : "en-US" + }, { + "name" : "Content-Encoding", + "value" : "gzip" + }, { + "name" : "X-Frame-Options", + "value" : "sameorigin" + }, { + "name" : "Strict-Transport-Security", + "value" : "max-age=31536000" + }, { + "name" : "Vary", + "value" : "Accept-Encoding" + }, { + "name" : "X-Cache", + "value" : "Miss from cloudfront" + }, { + "name" : "Via", + "value" : "1.1 5dbe09af3a2c87121e31ffa67f174f66.cloudfront.net (CloudFront)" + }, { + "name" : "X-Amz-Cf-Id", + "value" : "YkvlkBNKgHt5aMu9vcS22Z8kHn1MUr-8adupwhDk3j9vF-TpSyIxZA==" + } ], + "headersSize" : 527, + "redirectURL" : "", + "status" : 200, + "statusText" : "OK" + }, + "serverIPAddress" : "13.32.22.80", + "startedDateTime" : "2017-03-22T11:58:54.123+02:00", + "time" : 177, + "timings" : { + "blocked" : -1, + "connect" : -1, + "dns" : -1, + "receive" : 27, + "send" : -1, + "ssl" : -1, + "wait" : 150 + } + }, { + "pageref" : "page_1", + "request" : { + "headers" : [ { + "name" : "User-Agent", + "value" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36" + }, { + "name" : "Accept", + "value" : "*/*" + }, { + "name" : "Referer", + "value" : "https://www.thousandeyes.com/resources" + }, { + "name" : "Accept-Encoding", + "value" : "gzip, deflate, sdch, br" + }, { + "name" : "Accept-Language", + "value" : "en-US,en;q=0.6" + } ], + "method" : "GET", + "queryString" : [ ], + "url" : "https://use.typekit.net/cjy5myw.js" + }, + "response" : { + "bodySize" : 0, + "content" : { + "mimeType" : "text/javascript;charset=utf-8", + "size" : 7814 + }, + "headers" : [ { + "name" : "status", + "value" : "200" + }, { + "name" : "access-control-allow-origin", + "value" : "*" + }, { + "name" : "cache-control", + "value" : "public, max-age=600, stale-while-revalidate=604800" + }, { + "name" : "content-encoding", + "value" : "gzip" + }, { + "name" : "content-type", + "value" : "text/javascript;charset=utf-8" + }, { + "name" : "server", + "value" : "nginx" + }, { + "name" : "status", + "value" : "200 OK" + }, { + "name" : "timing-allow-origin", + "value" : "*" + }, { + "name" : "vary", + "value" : "Accept-Encoding" + }, { + "name" : "content-length", + "value" : "7814" + }, { + "name" : "date", + "value" : "Sun, 26 Mar 2017 11:58:43 GMT" + } ], + "headersSize" : 334, + "redirectURL" : "", + "status" : 200, + "statusText" : "OK" + }, + "serverIPAddress" : "104.103.103.234", + "startedDateTime" : "2017-03-22T11:58:54.123+02:00", + "time" : 72, + "timings" : { + "blocked" : -1, + "connect" : -1, + "dns" : -1, + "receive" : 10, + "send" : -1, + "ssl" : -1, + "wait" : 62 + } + } ], + "pages" : [ { + "id" : "page_1", + "pageTimings" : { + "onContentLoad" : 874, + "onLoad" : 3492 + }, + "responseCode" : 200, + "startedDateTime" : "2017-03-22T11:58:54.123+02:00", + "title" : "Network Performance Resources | ThousandEyes" + } ], + "version" : "1.2", + "systemMetrics" : { + "startTimeMs" : 1581508857327, + "endTimeMs" : 1581508867333, + "cpuUtilization" : { + "min" : 0.30859375, + "max" : 0.5625, + "mean" : 0.38931831001805056, + "median" : 0.353515625, + "stdDev" : 0.08389194281742307, + "count" : 10 + }, + "physicalMemoryUsedBytes" : { + "min" : 1.2805128192E10, + "max" : 1.2825530368E10, + "mean" : 1.281914582109091E10, + "median" : 1.2818219008E10, + "stdDev" : 5741124.05691331, + "count" : 11 + }, + "physicalMemoryTotalBytes" : 17069891584 + } + } + } + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.endpoint_test_results.models.RealUserTestPageDetailResult.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_real_user_test_results_models_validation(self) -> None: + """Test case for get_real_user_test_results request and response models""" + + response_body_json = """ + { + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "results" : [ { + "date" : "2022-07-17T22:00:54Z", + "agentId" : "861b7557-cd57-4bbb-b648-00bddf88ef49", + "committed" : "2022-07-17T22:00:54Z", + "experienceScore" : 0.5, + "sourceAddress" : "84.255.241.1", + "organizationName" : "T-2 Access Network", + "visitedSite" : "www.thousandeyes.com", + "coordinates" : { + "latitude" : 46.0552778, + "location" : "Slovenia", + "longitude" : 14.5144444 + }, + "network" : { + "systemMetrics" : { + "cpuUtilization" : { + "min" : 0.22, + "median" : 0.61, + "max" : 0.75, + "mean" : 0.55, + "count" : 150, + "stdDev" : 0.01 + }, + "physicalMemoryTotalBytes" : 1024, + "startTimeMs" : 1581508857327, + "physicalMemoryUsedBytes" : { + "min" : 1.2, + "median" : 1.85, + "max" : 2.5, + "mean" : 1.77, + "count" : 155, + "stdDev" : 0.25 + }, + "endTimeMs" : 1581508867333 + }, + "isIcmpBlocked" : true, + "vpnPing" : { + "maxRtt" : 66, + "pktsReceived" : 10, + "avgRtt" : 7, + "meanDevRtt" : 11, + "minRtt" : 1, + "error" : "An operation timed out.", + "infoFlags" : [ "TE_INFO_ICMP_BLOCKED_BY_FIREWALL" ], + "pktsSent" : 10 + }, + "ping" : { + "maxRtt" : 66, + "pktsReceived" : 10, + "avgRtt" : 7, + "meanDevRtt" : 11, + "minRtt" : 1, + "error" : "An operation timed out.", + "infoFlags" : [ "TE_INFO_ICMP_BLOCKED_BY_FIREWALL" ], + "pktsSent" : 10 + }, + "networkProfile" : { + "previousInterface" : { + "publicIpAddress" : "84.255.241.1", + "publicIpRange" : "84.255.241.0-84.255.241.255", + "ipAddress" : "10.0.0.13", + "hardwareType" : "wireless", + "localPrefix" : "10.0.0.0", + "interfaceName" : "en0", + "subnetMask" : "255.255.255.0", + "dnsServers" : [ "8.8.8.8", "8.8.8.4" ] + }, + "ethernetProfile" : { + "linkSpeed" : 860 + }, + "publicIpAddress" : "84.255.241.1", + "publicIpRange" : "84.255.241.0-84.255.241.255", + "ipAddress" : "10.0.0.13", + "hardwareType" : "wireless", + "localPrefix" : "10.0.0.0", + "proxyProfile" : { + "method" : "System", + "proxies" : [ { + "bypass" : "*.local;169.254/16", + "proxy" : "" + }, { + "bypass" : "*.local;169.254/16", + "proxy" : "" + } ] + }, + "subnetMask" : "255.255.255.0", + "error" : "An operation timed out.", + "wirelessProfile" : { + "rssi" : -38, + "bssid" : "4c:ba:ba:f4:fa:fa", + "vendor" : "Cisco", + "txRate" : 130, + "channel" : 1, + "noise" : -95, + "phyMode" : "802.11n", + "ssid" : "Internet for the masses", + "quality" : 100 + }, + "interfaceName" : "en0", + "dnsServers" : [ "8.8.8.8", "8.8.8.4" ], + "gateway" : "10.0.0.1" + }, + "traceroute" : { + "destination" : "13.32.22.232", + "hops" : [ { + "delay" : 5, + "prefix" : "196.40.96.0/20", + "hop" : 1, + "ipAddress" : "196.40.106.237", + "name" : "89-210-88-65.access.t-2.net", + "mpls" : [ "L=301472,E=0,S=1,T=1" ], + "asn" : 34779 + }, { + "delay" : 5, + "prefix" : "196.40.96.0/20", + "hop" : 1, + "ipAddress" : "196.40.106.237", + "name" : "89-210-88-65.access.t-2.net", + "mpls" : [ "L=301472,E=0,S=1,T=1" ], + "asn" : 34779 + } ], + "error" : "An operation timed out.", + "infoFlags" : [ "TE_INFO_ICMP_BLOCKED_BY_FIREWALL" ], + "internalErrors" : [ "TE_INFO_ICMP_BLOCKED_BY_FIREWALL" ] + }, + "vpnTraceroute" : { + "destination" : "13.32.22.232", + "hops" : [ { + "delay" : 5, + "prefix" : "196.40.96.0/20", + "hop" : 1, + "ipAddress" : "196.40.106.237", + "name" : "89-210-88-65.access.t-2.net", + "mpls" : [ "L=301472,E=0,S=1,T=1" ], + "asn" : 34779 + }, { + "delay" : 5, + "prefix" : "196.40.96.0/20", + "hop" : 1, + "ipAddress" : "196.40.106.237", + "name" : "89-210-88-65.access.t-2.net", + "mpls" : [ "L=301472,E=0,S=1,T=1" ], + "asn" : 34779 + } ], + "error" : "An operation timed out.", + "infoFlags" : [ "TE_INFO_ICMP_BLOCKED_BY_FIREWALL" ], + "internalErrors" : [ "TE_INFO_ICMP_BLOCKED_BY_FIREWALL" ] + }, + "connectRtt" : 77.777, + "gatewayPing" : { + "maxRtt" : 66, + "pktsReceived" : 10, + "avgRtt" : 7, + "meanDevRtt" : 11, + "minRtt" : 1, + "error" : "An operation timed out.", + "infoFlags" : [ "TE_INFO_ICMP_BLOCKED_BY_FIREWALL" ], + "pktsSent" : 10 + }, + "errors" : [ "ping: Request timed out before getting response" ] + }, + "protocol" : "https", + "pages" : [ { + "pageTimings" : { + "onContentLoad" : 1483, + "onLoad" : 4569 + }, + "pageTitle" : "Network Performance Resources | ThousandEyes", + "pageUrl" : "https://app.thousandeyes.com/settings/integrations", + "pageId" : "C31gBrYJ", + "loadDate" : "2022-07-17T22:00:54Z", + "responseCode" : 200 + }, { + "pageTimings" : { + "onContentLoad" : 1483, + "onLoad" : 4569 + }, + "pageTitle" : "Network Performance Resources | ThousandEyes", + "pageUrl" : "https://app.thousandeyes.com/settings/integrations", + "pageId" : "C31gBrYJ", + "loadDate" : "2022-07-17T22:00:54Z", + "responseCode" : 200 + } ], + "numberOfPages" : 2, + "port" : 443, + "browser" : { + "name" : "Google Chrome", + "version" : "116.0.0.0" + }, + "id" : "07625:1490529480:aVDViw0i", + "roundId" : 1384309800 + }, { + "date" : "2022-07-17T22:00:54Z", + "agentId" : "861b7557-cd57-4bbb-b648-00bddf88ef49", + "committed" : "2022-07-17T22:00:54Z", + "experienceScore" : 0.5, + "sourceAddress" : "84.255.241.1", + "organizationName" : "T-2 Access Network", + "visitedSite" : "www.thousandeyes.com", + "coordinates" : { + "latitude" : 46.0552778, + "location" : "Slovenia", + "longitude" : 14.5144444 + }, + "network" : { + "systemMetrics" : { + "cpuUtilization" : { + "min" : 0.22, + "median" : 0.61, + "max" : 0.75, + "mean" : 0.55, + "count" : 150, + "stdDev" : 0.01 + }, + "physicalMemoryTotalBytes" : 1024, + "startTimeMs" : 1581508857327, + "physicalMemoryUsedBytes" : { + "min" : 1.2, + "median" : 1.85, + "max" : 2.5, + "mean" : 1.77, + "count" : 155, + "stdDev" : 0.25 + }, + "endTimeMs" : 1581508867333 + }, + "isIcmpBlocked" : true, + "vpnPing" : { + "maxRtt" : 66, + "pktsReceived" : 10, + "avgRtt" : 7, + "meanDevRtt" : 11, + "minRtt" : 1, + "error" : "An operation timed out.", + "infoFlags" : [ "TE_INFO_ICMP_BLOCKED_BY_FIREWALL" ], + "pktsSent" : 10 + }, + "ping" : { + "maxRtt" : 66, + "pktsReceived" : 10, + "avgRtt" : 7, + "meanDevRtt" : 11, + "minRtt" : 1, + "error" : "An operation timed out.", + "infoFlags" : [ "TE_INFO_ICMP_BLOCKED_BY_FIREWALL" ], + "pktsSent" : 10 + }, + "networkProfile" : { + "previousInterface" : { + "publicIpAddress" : "84.255.241.1", + "publicIpRange" : "84.255.241.0-84.255.241.255", + "ipAddress" : "10.0.0.13", + "hardwareType" : "wireless", + "localPrefix" : "10.0.0.0", + "interfaceName" : "en0", + "subnetMask" : "255.255.255.0", + "dnsServers" : [ "8.8.8.8", "8.8.8.4" ] + }, + "ethernetProfile" : { + "linkSpeed" : 860 + }, + "publicIpAddress" : "84.255.241.1", + "publicIpRange" : "84.255.241.0-84.255.241.255", + "ipAddress" : "10.0.0.13", + "hardwareType" : "wireless", + "localPrefix" : "10.0.0.0", + "proxyProfile" : { + "method" : "System", + "proxies" : [ { + "bypass" : "*.local;169.254/16", + "proxy" : "" + }, { + "bypass" : "*.local;169.254/16", + "proxy" : "" + } ] + }, + "subnetMask" : "255.255.255.0", + "error" : "An operation timed out.", + "wirelessProfile" : { + "rssi" : -38, + "bssid" : "4c:ba:ba:f4:fa:fa", + "vendor" : "Cisco", + "txRate" : 130, + "channel" : 1, + "noise" : -95, + "phyMode" : "802.11n", + "ssid" : "Internet for the masses", + "quality" : 100 + }, + "interfaceName" : "en0", + "dnsServers" : [ "8.8.8.8", "8.8.8.4" ], + "gateway" : "10.0.0.1" + }, + "traceroute" : { + "destination" : "13.32.22.232", + "hops" : [ { + "delay" : 5, + "prefix" : "196.40.96.0/20", + "hop" : 1, + "ipAddress" : "196.40.106.237", + "name" : "89-210-88-65.access.t-2.net", + "mpls" : [ "L=301472,E=0,S=1,T=1" ], + "asn" : 34779 + }, { + "delay" : 5, + "prefix" : "196.40.96.0/20", + "hop" : 1, + "ipAddress" : "196.40.106.237", + "name" : "89-210-88-65.access.t-2.net", + "mpls" : [ "L=301472,E=0,S=1,T=1" ], + "asn" : 34779 + } ], + "error" : "An operation timed out.", + "infoFlags" : [ "TE_INFO_ICMP_BLOCKED_BY_FIREWALL" ], + "internalErrors" : [ "TE_INFO_ICMP_BLOCKED_BY_FIREWALL" ] + }, + "vpnTraceroute" : { + "destination" : "13.32.22.232", + "hops" : [ { + "delay" : 5, + "prefix" : "196.40.96.0/20", + "hop" : 1, + "ipAddress" : "196.40.106.237", + "name" : "89-210-88-65.access.t-2.net", + "mpls" : [ "L=301472,E=0,S=1,T=1" ], + "asn" : 34779 + }, { + "delay" : 5, + "prefix" : "196.40.96.0/20", + "hop" : 1, + "ipAddress" : "196.40.106.237", + "name" : "89-210-88-65.access.t-2.net", + "mpls" : [ "L=301472,E=0,S=1,T=1" ], + "asn" : 34779 + } ], + "error" : "An operation timed out.", + "infoFlags" : [ "TE_INFO_ICMP_BLOCKED_BY_FIREWALL" ], + "internalErrors" : [ "TE_INFO_ICMP_BLOCKED_BY_FIREWALL" ] + }, + "connectRtt" : 77.777, + "gatewayPing" : { + "maxRtt" : 66, + "pktsReceived" : 10, + "avgRtt" : 7, + "meanDevRtt" : 11, + "minRtt" : 1, + "error" : "An operation timed out.", + "infoFlags" : [ "TE_INFO_ICMP_BLOCKED_BY_FIREWALL" ], + "pktsSent" : 10 + }, + "errors" : [ "ping: Request timed out before getting response" ] + }, + "protocol" : "https", + "pages" : [ { + "pageTimings" : { + "onContentLoad" : 1483, + "onLoad" : 4569 + }, + "pageTitle" : "Network Performance Resources | ThousandEyes", + "pageUrl" : "https://app.thousandeyes.com/settings/integrations", + "pageId" : "C31gBrYJ", + "loadDate" : "2022-07-17T22:00:54Z", + "responseCode" : 200 + }, { + "pageTimings" : { + "onContentLoad" : 1483, + "onLoad" : 4569 + }, + "pageTitle" : "Network Performance Resources | ThousandEyes", + "pageUrl" : "https://app.thousandeyes.com/settings/integrations", + "pageId" : "C31gBrYJ", + "loadDate" : "2022-07-17T22:00:54Z", + "responseCode" : 200 + } ], + "numberOfPages" : 2, + "port" : 443, + "browser" : { + "name" : "Google Chrome", + "version" : "116.0.0.0" + }, + "id" : "07625:1490529480:aVDViw0i", + "roundId" : 1384309800 + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.endpoint_test_results.models.EndpointRealUserTestDetailResults.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-endpoint-test-results/test/test_utils.py b/thousandeyes-sdk-endpoint-test-results/test/test_utils.py new file mode 100644 index 00000000..930528d9 --- /dev/null +++ b/thousandeyes-sdk-endpoint-test-results/test/test_utils.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +import json +import unittest + +from pydantic import BaseModel + + +def assert_constructed_model_matches_example_json(model: BaseModel, loaded_json: dict): + test_case = unittest.TestCase() + test_case.maxDiff = None + test_case.assertIsNotNone(model) + constructed_json = json.loads(model.to_json()) + sorted_loaded_json = json.dumps(loaded_json, sort_keys=True) + sorted_constructed_json = json.dumps(constructed_json, sort_keys=True) + test_case.assertEqual(sorted_loaded_json, sorted_constructed_json) diff --git a/thousandeyes-sdk-endpoint-test-results/test/test_web_http_server_scheduled_test_results_api.py b/thousandeyes-sdk-endpoint-test-results/test/test_web_http_server_scheduled_test_results_api.py new file mode 100644 index 00000000..fe7e73cf --- /dev/null +++ b/thousandeyes-sdk-endpoint-test-results/test/test_web_http_server_scheduled_test_results_api.py @@ -0,0 +1,358 @@ +# coding: utf-8 + +""" + Endpoint Test Results API + + Retrieve results for scheduled and dynamic tests on endpoint agents. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.endpoint_test_results.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.endpoint_test_results.api.web_http_server_scheduled_test_results_api import WebHTTPServerScheduledTestResultsApi + + +class TestWebHTTPServerScheduledTestResultsApi(unittest.TestCase): + """WebHTTPServerScheduledTestResultsApi unit test stubs""" + + def setUp(self) -> None: + self.api = WebHTTPServerScheduledTestResultsApi() + + def tearDown(self) -> None: + pass + + def test_get_http_server_scheduled_test_results_models_validation(self) -> None: + """Test case for get_http_server_scheduled_test_results request and response models""" + + 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" + } + }, + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "httpTimeLimit" : 5000, + "type" : "http-server", + "protocol" : "icmp", + "httpVersion" : 2, + "followRedirects" : true, + "contentRegex" : "(regex)+", + "authType" : "none", + "testName" : "Test name", + "verifyCertificate" : false, + "userAgent" : "curl", + "networkMeasurements" : true, + "tcpProbeMode" : "auto", + "url" : "www.example.com", + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "postBody" : "body", + "port" : 80, + "isEnabled" : true, + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "aid" : "1234", + "agentSelectorConfig" : { + "agentSelectorType" : "all-agents", + "maxMachines" : 10 + }, + "hasPathTraceInSession" : true, + "httpTargetTime" : 100, + "username" : "username", + "sslVersionId" : "0" + }, + "endDate" : "2022-07-18T22:00:54Z", + "_links" : { + "next" : { + "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" + } + }, + "results" : [ { + "originalTargetProfile" : { + "protocol" : "tcp", + "remotePort" : 80, + "remoteIpAddress" : "120.98.134.7" + }, + "headers" : { + "requestHeaders" : "GET / HTTP/1.1\\r\\nHost: www.thousandeyes.com\\r\\nUser-Agent: curl/7.58.0-DEV\\r\\nAccept: */*\\r\\nAccept-Encoding: deflate, gzip\\r\\nX-ThousandEyes-Agent: yes\\r\\n", + "responseHeaders" : "HTTP/1.1 200 OK\\r\\nContent-Type: text/html;charset=UTF-8\\r\\nContent-Length: 9993\\r\\nConnection: keep-alive\\r\\nDate: Mon, 04 May 2020 16:13:00 GMT\\r\\nServer: Apache\\r\\nContent-Language: en-US\\r\\nContent-Encoding: gzip\\r\\nX-Frame-Options: sameorigin\\r\\nCache-Control: max-age=600, must-revalidate\\r\\nStrict-Transport-Security: max-age=31536000\\r\\nX-Content-Type-Options: nosniff\\r\\nX-XSS-Protection: 1; mode=block\\r\\nVary: Accept-Encoding\\r\\nX-Cache: Hit from cloudfront\\r\\nVia: 1.1 7ba3caf71ae7a52dd411d1a543e80cd8.cloudfront.net (CloudFront)\\r\\nX-Amz-Cf-Pop: SFO5-C3\\r\\nX-Amz-Cf-Id: w4h42tkoJD-rEpkRDZUvnQBmy26GVGe6pUsuRr1Dphf7oajYbjXaOA==\\r\\nAge: 132\\r\\n" + }, + "agentId" : "861b7557-cd57-4bbb-b648-00bddf88ef49", + "redirectTime" : 10, + "numRedirects" : 0, + "vpnProfile" : { + "vpnClientNetworkRange" : [ "9.88.37.27", "9.88.37.27" ], + "vpnGatewayAddress" : "120.98.134.7", + "vpnType" : "cisco-anyconnect", + "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] + }, + "errorType" : "connect", + "responseTime" : 14, + "totalTime" : 15, + "responseCode" : 200, + "receiveTime" : 1, + "systemMetrics" : { + "cpuUtilization" : { + "min" : 0.22, + "median" : 0.61, + "max" : 0.75, + "mean" : 0.55, + "count" : 150, + "stdDev" : 0.01 + }, + "physicalMemoryTotalBytes" : 1024, + "startTimeMs" : 1581508857327, + "physicalMemoryUsedBytes" : { + "min" : 1.2, + "median" : 1.85, + "max" : 2.5, + "mean" : 1.77, + "count" : 155, + "stdDev" : 0.25 + }, + "endTimeMs" : 1581508867333 + }, + "connectTime" : 2, + "dnsTime" : 0, + "serverIp" : "193.2.1.88", + "networkProfile" : { + "previousInterface" : { + "publicIpAddress" : "84.255.241.1", + "publicIpRange" : "84.255.241.0-84.255.241.255", + "ipAddress" : "10.0.0.13", + "hardwareType" : "wireless", + "localPrefix" : "10.0.0.0", + "interfaceName" : "en0", + "subnetMask" : "255.255.255.0", + "dnsServers" : [ "8.8.8.8", "8.8.8.4" ] + }, + "ethernetProfile" : { + "linkSpeed" : 860 + }, + "publicIpAddress" : "84.255.241.1", + "publicIpRange" : "84.255.241.0-84.255.241.255", + "ipAddress" : "10.0.0.13", + "hardwareType" : "wireless", + "localPrefix" : "10.0.0.0", + "proxyProfile" : { + "method" : "System", + "proxies" : [ { + "bypass" : "*.local;169.254/16", + "proxy" : "" + }, { + "bypass" : "*.local;169.254/16", + "proxy" : "" + } ] + }, + "subnetMask" : "255.255.255.0", + "error" : "An operation timed out.", + "wirelessProfile" : { + "rssi" : -38, + "bssid" : "4c:ba:ba:f4:fa:fa", + "vendor" : "Cisco", + "txRate" : 130, + "channel" : 1, + "noise" : -95, + "phyMode" : "802.11n", + "ssid" : "Internet for the masses", + "quality" : 100 + }, + "interfaceName" : "en0", + "dnsServers" : [ "8.8.8.8", "8.8.8.4" ], + "gateway" : "10.0.0.1" + }, + "sslTime" : 9, + "aid" : "1234", + "roundId" : 1384309800, + "waitTime" : 3, + "errorDetails" : "errorDetails", + "wireSize" : 9993 + }, { + "originalTargetProfile" : { + "protocol" : "tcp", + "remotePort" : 80, + "remoteIpAddress" : "120.98.134.7" + }, + "headers" : { + "requestHeaders" : "GET / HTTP/1.1\\r\\nHost: www.thousandeyes.com\\r\\nUser-Agent: curl/7.58.0-DEV\\r\\nAccept: */*\\r\\nAccept-Encoding: deflate, gzip\\r\\nX-ThousandEyes-Agent: yes\\r\\n", + "responseHeaders" : "HTTP/1.1 200 OK\\r\\nContent-Type: text/html;charset=UTF-8\\r\\nContent-Length: 9993\\r\\nConnection: keep-alive\\r\\nDate: Mon, 04 May 2020 16:13:00 GMT\\r\\nServer: Apache\\r\\nContent-Language: en-US\\r\\nContent-Encoding: gzip\\r\\nX-Frame-Options: sameorigin\\r\\nCache-Control: max-age=600, must-revalidate\\r\\nStrict-Transport-Security: max-age=31536000\\r\\nX-Content-Type-Options: nosniff\\r\\nX-XSS-Protection: 1; mode=block\\r\\nVary: Accept-Encoding\\r\\nX-Cache: Hit from cloudfront\\r\\nVia: 1.1 7ba3caf71ae7a52dd411d1a543e80cd8.cloudfront.net (CloudFront)\\r\\nX-Amz-Cf-Pop: SFO5-C3\\r\\nX-Amz-Cf-Id: w4h42tkoJD-rEpkRDZUvnQBmy26GVGe6pUsuRr1Dphf7oajYbjXaOA==\\r\\nAge: 132\\r\\n" + }, + "agentId" : "861b7557-cd57-4bbb-b648-00bddf88ef49", + "redirectTime" : 10, + "numRedirects" : 0, + "vpnProfile" : { + "vpnClientNetworkRange" : [ "9.88.37.27", "9.88.37.27" ], + "vpnGatewayAddress" : "120.98.134.7", + "vpnType" : "cisco-anyconnect", + "vpnClientAddresses" : [ "184.81.113.85", "13.129.91.62" ] + }, + "errorType" : "connect", + "responseTime" : 14, + "totalTime" : 15, + "responseCode" : 200, + "receiveTime" : 1, + "systemMetrics" : { + "cpuUtilization" : { + "min" : 0.22, + "median" : 0.61, + "max" : 0.75, + "mean" : 0.55, + "count" : 150, + "stdDev" : 0.01 + }, + "physicalMemoryTotalBytes" : 1024, + "startTimeMs" : 1581508857327, + "physicalMemoryUsedBytes" : { + "min" : 1.2, + "median" : 1.85, + "max" : 2.5, + "mean" : 1.77, + "count" : 155, + "stdDev" : 0.25 + }, + "endTimeMs" : 1581508867333 + }, + "connectTime" : 2, + "dnsTime" : 0, + "serverIp" : "193.2.1.88", + "networkProfile" : { + "previousInterface" : { + "publicIpAddress" : "84.255.241.1", + "publicIpRange" : "84.255.241.0-84.255.241.255", + "ipAddress" : "10.0.0.13", + "hardwareType" : "wireless", + "localPrefix" : "10.0.0.0", + "interfaceName" : "en0", + "subnetMask" : "255.255.255.0", + "dnsServers" : [ "8.8.8.8", "8.8.8.4" ] + }, + "ethernetProfile" : { + "linkSpeed" : 860 + }, + "publicIpAddress" : "84.255.241.1", + "publicIpRange" : "84.255.241.0-84.255.241.255", + "ipAddress" : "10.0.0.13", + "hardwareType" : "wireless", + "localPrefix" : "10.0.0.0", + "proxyProfile" : { + "method" : "System", + "proxies" : [ { + "bypass" : "*.local;169.254/16", + "proxy" : "" + }, { + "bypass" : "*.local;169.254/16", + "proxy" : "" + } ] + }, + "subnetMask" : "255.255.255.0", + "error" : "An operation timed out.", + "wirelessProfile" : { + "rssi" : -38, + "bssid" : "4c:ba:ba:f4:fa:fa", + "vendor" : "Cisco", + "txRate" : 130, + "channel" : 1, + "noise" : -95, + "phyMode" : "802.11n", + "ssid" : "Internet for the masses", + "quality" : 100 + }, + "interfaceName" : "en0", + "dnsServers" : [ "8.8.8.8", "8.8.8.4" ], + "gateway" : "10.0.0.1" + }, + "sslTime" : 9, + "aid" : "1234", + "roundId" : 1384309800, + "waitTime" : 3, + "errorDetails" : "errorDetails", + "wireSize" : 9993 + } ], + "startDate" : "2022-07-17T22:00:54Z" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.endpoint_test_results.models.HttpTestResults.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-endpoint-tests/.openapi-generator/FILES b/thousandeyes-sdk-endpoint-tests/.openapi-generator/FILES index a44f8454..9fc14231 100644 --- a/thousandeyes-sdk-endpoint-tests/.openapi-generator/FILES +++ b/thousandeyes-sdk-endpoint-tests/.openapi-generator/FILES @@ -109,50 +109,8 @@ src/thousandeyes_sdk/endpoint_tests/models/validation_error.py src/thousandeyes_sdk/endpoint_tests/models/validation_error_item.py src/thousandeyes_sdk/endpoint_tests/py.typed test/__init__.py -test/test_alert_direction.py -test/test_alert_rounds_violation_mode.py -test/test_alert_rule.py -test/test_alert_type.py -test/test_dynamic_test.py -test/test_dynamic_test_links.py -test/test_dynamic_test_request.py -test/test_dynamic_test_self_link.py -test/test_dynamic_tests.py -test/test_endpoint_agent_labels_selector_config.py -test/test_endpoint_agent_selector_config.py -test/test_endpoint_agent_to_server_instant_test.py -test/test_endpoint_agent_to_server_test.py -test/test_endpoint_agent_to_server_test_request.py -test/test_endpoint_agent_to_server_tests.py -test/test_endpoint_all_agents_selector_config.py -test/test_endpoint_dynamic_test_update.py -test/test_endpoint_http_server_base_test.py -test/test_endpoint_http_server_instant_test.py -test/test_endpoint_http_server_test.py -test/test_endpoint_http_server_test_request.py -test/test_endpoint_http_server_tests.py -test/test_endpoint_http_test_update.py -test/test_endpoint_instant_test.py -test/test_endpoint_network_test_update.py -test/test_endpoint_scheduled_test_type.py -test/test_endpoint_specific_agents_selector_config.py -test/test_endpoint_test.py -test/test_endpoint_test_agent_selector_type.py -test/test_endpoint_test_auth_type.py -test/test_endpoint_test_links.py -test/test_endpoint_test_protocol.py -test/test_endpoint_test_self_link.py -test/test_endpoint_tests.py -test/test_error.py -test/test_link.py -test/test_self_links.py -test/test_severity.py -test/test_test_interval.py -test/test_test_label.py -test/test_test_probe_mode.py -test/test_test_probe_mode_response.py -test/test_test_ssl_version_id.py -test/test_test_update.py -test/test_unauthorized_error.py -test/test_validation_error.py -test/test_validation_error_item.py +test/test_dynamic_tests_agent_to_server_api.py +test/test_list_endpoint_scheduled_tests_api.py +test/test_scheduled_tests_agent_to_server_api.py +test/test_scheduled_tests_http_server_api.py +test/test_utils.py diff --git a/thousandeyes-sdk-endpoint-tests/README.md b/thousandeyes-sdk-endpoint-tests/README.md index 59469d04..474481b6 100644 --- a/thousandeyes-sdk-endpoint-tests/README.md +++ b/thousandeyes-sdk-endpoint-tests/README.md @@ -5,8 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.4 -- Package version: 1.0.0 +- API version: 7.0.6 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator @@ -20,9 +19,9 @@ Python 3.7+ If the python package is hosted on a repository, you can install directly using: ```sh -pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +pip install -e git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git#egg=thousandeyes-sdk-endpoint-tests\&subdirectory=thousandeyes-sdk-endpoint-tests ``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) +(you may need to run `pip` with root permission: `sudo pip install -e git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git#egg=thousandeyes-sdk-endpoint-tests\&subdirectory=thousandeyes-sdk-endpoint-tests`) Then import the package: ```python @@ -79,14 +78,16 @@ configuration = thousandeyes_sdk.client.Configuration( with thousandeyes_sdk.client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = thousandeyes_sdk.endpoint_tests.DynamicTestsAgentToServerApi(api_client) - test_id = '584739201' # str | Unique ID of endpoint test. + dynamic_test_request = thousandeyes_sdk.endpoint_tests.DynamicTestRequest() # DynamicTestRequest | 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 agent to server dynamic test - api_instance.delete_endpoint_dynamic_test(test_id, aid=aid) + # Create endpoint dynamic test + api_response = api_instance.create_agent_to_server_endpoint_dynamic_test(dynamic_test_request, aid=aid) + print("The response of DynamicTestsAgentToServerApi->create_agent_to_server_endpoint_dynamic_test:\n") + pprint(api_response) except ApiException as e: - print("Exception when calling DynamicTestsAgentToServerApi->delete_endpoint_dynamic_test: %s\n" % e) + print("Exception when calling DynamicTestsAgentToServerApi->create_agent_to_server_endpoint_dynamic_test: %s\n" % e) ``` @@ -96,22 +97,22 @@ All URIs are relative to *https://api.thousandeyes.com* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*DynamicTestsAgentToServerApi* | [**delete_endpoint_dynamic_test**](docs/DynamicTestsAgentToServerApi.md#delete_endpoint_dynamic_test) | **DELETE** /v7/endpoint/tests/dynamic-tests/agent-to-server/{testId} | Delete agent to server dynamic test -*DynamicTestsAgentToServerApi* | [**get_dynamic_test_detail**](docs/DynamicTestsAgentToServerApi.md#get_dynamic_test_detail) | **GET** /v7/endpoint/tests/dynamic-tests/agent-to-server/{testId} | Retrieve endpoint dynamic test -*DynamicTestsAgentToServerApi* | [**get_dynamic_tests_list**](docs/DynamicTestsAgentToServerApi.md#get_dynamic_tests_list) | **GET** /v7/endpoint/tests/dynamic-tests/agent-to-server | List endpoint dynamic tests -*DynamicTestsAgentToServerApi* | [**post_dynamic_test**](docs/DynamicTestsAgentToServerApi.md#post_dynamic_test) | **POST** /v7/endpoint/tests/dynamic-tests/agent-to-server | Create endpoint dynamic test -*DynamicTestsAgentToServerApi* | [**update_endpoint_dynamic_test_detail**](docs/DynamicTestsAgentToServerApi.md#update_endpoint_dynamic_test_detail) | **PATCH** /v7/endpoint/tests/dynamic-tests/agent-to-server/{testId} | Update agent to server dynamic test -*ListEndpointScheduledTestsApi* | [**get_endpoint_tests_list**](docs/ListEndpointScheduledTestsApi.md#get_endpoint_tests_list) | **GET** /v7/endpoint/tests/scheduled-tests | List endpoint scheduled tests -*ScheduledTestsAgentToServerApi* | [**delete_endpoint_agent_to_server_test**](docs/ScheduledTestsAgentToServerApi.md#delete_endpoint_agent_to_server_test) | **DELETE** /v7/endpoint/tests/scheduled-tests/agent-to-server/{testId} | Delete agent to server scheduled test -*ScheduledTestsAgentToServerApi* | [**get_endpoint_agent_to_server_detail**](docs/ScheduledTestsAgentToServerApi.md#get_endpoint_agent_to_server_detail) | **GET** /v7/endpoint/tests/scheduled-tests/agent-to-server/{testId} | Retrieve agent to server endpoint scheduled test -*ScheduledTestsAgentToServerApi* | [**get_endpoint_agent_to_server_tests_list**](docs/ScheduledTestsAgentToServerApi.md#get_endpoint_agent_to_server_tests_list) | **GET** /v7/endpoint/tests/scheduled-tests/agent-to-server | List agent to server endpoint scheduled tests -*ScheduledTestsAgentToServerApi* | [**post_endpoint_agent_to_server_test**](docs/ScheduledTestsAgentToServerApi.md#post_endpoint_agent_to_server_test) | **POST** /v7/endpoint/tests/scheduled-tests/agent-to-server | Creates agent to server endpoint scheduled test -*ScheduledTestsAgentToServerApi* | [**update_endpoint_agent_to_server_detail**](docs/ScheduledTestsAgentToServerApi.md#update_endpoint_agent_to_server_detail) | **PATCH** /v7/endpoint/tests/scheduled-tests/agent-to-server/{testId} | Update agent to server endpoint scheduled test -*ScheduledTestsHTTPServerApi* | [**delete_endpoint_http_server_test**](docs/ScheduledTestsHTTPServerApi.md#delete_endpoint_http_server_test) | **DELETE** /v7/endpoint/tests/scheduled-tests/http-server/{testId} | Delete HTTP server scheduled test -*ScheduledTestsHTTPServerApi* | [**get_endpoint_httpserver_test_detail**](docs/ScheduledTestsHTTPServerApi.md#get_endpoint_httpserver_test_detail) | **GET** /v7/endpoint/tests/scheduled-tests/http-server/{testId} | Retrieves HTTP server endpoint scheduled test -*ScheduledTestsHTTPServerApi* | [**get_endpoint_httpserver_tests_list**](docs/ScheduledTestsHTTPServerApi.md#get_endpoint_httpserver_tests_list) | **GET** /v7/endpoint/tests/scheduled-tests/http-server | List HTTP server endpoint scheduled tests -*ScheduledTestsHTTPServerApi* | [**post_endpoint_httpserver_test**](docs/ScheduledTestsHTTPServerApi.md#post_endpoint_httpserver_test) | **POST** /v7/endpoint/tests/scheduled-tests/http-server | Create HTTP server endpoint scheduled test -*ScheduledTestsHTTPServerApi* | [**update_endpoint_http_server_detail**](docs/ScheduledTestsHTTPServerApi.md#update_endpoint_http_server_detail) | **PATCH** /v7/endpoint/tests/scheduled-tests/http-server/{testId} | Update HTTP server endpoint scheduled test +*DynamicTestsAgentToServerApi* | [**create_agent_to_server_endpoint_dynamic_test**](docs/DynamicTestsAgentToServerApi.md#create_agent_to_server_endpoint_dynamic_test) | **POST** /v7/endpoint/tests/dynamic-tests/agent-to-server | Create endpoint dynamic test +*DynamicTestsAgentToServerApi* | [**delete_agent_to_server_endpoint_dynamic_test**](docs/DynamicTestsAgentToServerApi.md#delete_agent_to_server_endpoint_dynamic_test) | **DELETE** /v7/endpoint/tests/dynamic-tests/agent-to-server/{testId} | Delete agent to server dynamic test +*DynamicTestsAgentToServerApi* | [**get_agent_to_server_endpoint_dynamic_test**](docs/DynamicTestsAgentToServerApi.md#get_agent_to_server_endpoint_dynamic_test) | **GET** /v7/endpoint/tests/dynamic-tests/agent-to-server/{testId} | Retrieve endpoint dynamic test +*DynamicTestsAgentToServerApi* | [**get_agent_to_server_endpoint_dynamic_tests**](docs/DynamicTestsAgentToServerApi.md#get_agent_to_server_endpoint_dynamic_tests) | **GET** /v7/endpoint/tests/dynamic-tests/agent-to-server | List endpoint dynamic tests +*DynamicTestsAgentToServerApi* | [**update_agent_to_server_endpoint_dynamic_test**](docs/DynamicTestsAgentToServerApi.md#update_agent_to_server_endpoint_dynamic_test) | **PATCH** /v7/endpoint/tests/dynamic-tests/agent-to-server/{testId} | Update agent to server dynamic test +*ListEndpointScheduledTestsApi* | [**get_endpoint_scheduled_tests**](docs/ListEndpointScheduledTestsApi.md#get_endpoint_scheduled_tests) | **GET** /v7/endpoint/tests/scheduled-tests | List endpoint scheduled tests +*ScheduledTestsAgentToServerApi* | [**create_agent_to_server_endpoint_scheduled_test**](docs/ScheduledTestsAgentToServerApi.md#create_agent_to_server_endpoint_scheduled_test) | **POST** /v7/endpoint/tests/scheduled-tests/agent-to-server | Creates agent to server endpoint scheduled test +*ScheduledTestsAgentToServerApi* | [**delete_agent_to_server_endpoint_scheduled_test**](docs/ScheduledTestsAgentToServerApi.md#delete_agent_to_server_endpoint_scheduled_test) | **DELETE** /v7/endpoint/tests/scheduled-tests/agent-to-server/{testId} | Delete agent to server scheduled test +*ScheduledTestsAgentToServerApi* | [**get_agent_to_server_endpoint_scheduled_test**](docs/ScheduledTestsAgentToServerApi.md#get_agent_to_server_endpoint_scheduled_test) | **GET** /v7/endpoint/tests/scheduled-tests/agent-to-server/{testId} | Retrieve agent to server endpoint scheduled test +*ScheduledTestsAgentToServerApi* | [**get_agent_to_server_endpoint_scheduled_tests**](docs/ScheduledTestsAgentToServerApi.md#get_agent_to_server_endpoint_scheduled_tests) | **GET** /v7/endpoint/tests/scheduled-tests/agent-to-server | List agent to server endpoint scheduled tests +*ScheduledTestsAgentToServerApi* | [**update_agent_to_server_endpoint_scheduled_test**](docs/ScheduledTestsAgentToServerApi.md#update_agent_to_server_endpoint_scheduled_test) | **PATCH** /v7/endpoint/tests/scheduled-tests/agent-to-server/{testId} | Update agent to server endpoint scheduled test +*ScheduledTestsHTTPServerApi* | [**create_http_server_endpoint_scheduled_test**](docs/ScheduledTestsHTTPServerApi.md#create_http_server_endpoint_scheduled_test) | **POST** /v7/endpoint/tests/scheduled-tests/http-server | Create HTTP server endpoint scheduled test +*ScheduledTestsHTTPServerApi* | [**delete_http_server_endpoint_scheduled_test**](docs/ScheduledTestsHTTPServerApi.md#delete_http_server_endpoint_scheduled_test) | **DELETE** /v7/endpoint/tests/scheduled-tests/http-server/{testId} | Delete HTTP server scheduled test +*ScheduledTestsHTTPServerApi* | [**get_http_server_endpoint_scheduled_test**](docs/ScheduledTestsHTTPServerApi.md#get_http_server_endpoint_scheduled_test) | **GET** /v7/endpoint/tests/scheduled-tests/http-server/{testId} | Retrieves HTTP server endpoint scheduled test +*ScheduledTestsHTTPServerApi* | [**get_http_server_endpoint_scheduled_tests**](docs/ScheduledTestsHTTPServerApi.md#get_http_server_endpoint_scheduled_tests) | **GET** /v7/endpoint/tests/scheduled-tests/http-server | List HTTP server endpoint scheduled tests +*ScheduledTestsHTTPServerApi* | [**update_http_server_endpoint_scheduled_test**](docs/ScheduledTestsHTTPServerApi.md#update_http_server_endpoint_scheduled_test) | **PATCH** /v7/endpoint/tests/scheduled-tests/http-server/{testId} | Update HTTP server endpoint scheduled test ## Documentation For Models diff --git a/thousandeyes-sdk-endpoint-tests/docs/DynamicTestsAgentToServerApi.md b/thousandeyes-sdk-endpoint-tests/docs/DynamicTestsAgentToServerApi.md index 7b6f5240..ad58eb68 100644 --- a/thousandeyes-sdk-endpoint-tests/docs/DynamicTestsAgentToServerApi.md +++ b/thousandeyes-sdk-endpoint-tests/docs/DynamicTestsAgentToServerApi.md @@ -4,271 +4,15 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**delete_endpoint_dynamic_test**](DynamicTestsAgentToServerApi.md#delete_endpoint_dynamic_test) | **DELETE** /v7/endpoint/tests/dynamic-tests/agent-to-server/{testId} | Delete agent to server dynamic test -[**get_dynamic_test_detail**](DynamicTestsAgentToServerApi.md#get_dynamic_test_detail) | **GET** /v7/endpoint/tests/dynamic-tests/agent-to-server/{testId} | Retrieve endpoint dynamic test -[**get_dynamic_tests_list**](DynamicTestsAgentToServerApi.md#get_dynamic_tests_list) | **GET** /v7/endpoint/tests/dynamic-tests/agent-to-server | List endpoint dynamic tests -[**post_dynamic_test**](DynamicTestsAgentToServerApi.md#post_dynamic_test) | **POST** /v7/endpoint/tests/dynamic-tests/agent-to-server | Create endpoint dynamic test -[**update_endpoint_dynamic_test_detail**](DynamicTestsAgentToServerApi.md#update_endpoint_dynamic_test_detail) | **PATCH** /v7/endpoint/tests/dynamic-tests/agent-to-server/{testId} | Update agent to server dynamic test +[**create_agent_to_server_endpoint_dynamic_test**](DynamicTestsAgentToServerApi.md#create_agent_to_server_endpoint_dynamic_test) | **POST** /v7/endpoint/tests/dynamic-tests/agent-to-server | Create endpoint dynamic test +[**delete_agent_to_server_endpoint_dynamic_test**](DynamicTestsAgentToServerApi.md#delete_agent_to_server_endpoint_dynamic_test) | **DELETE** /v7/endpoint/tests/dynamic-tests/agent-to-server/{testId} | Delete agent to server dynamic test +[**get_agent_to_server_endpoint_dynamic_test**](DynamicTestsAgentToServerApi.md#get_agent_to_server_endpoint_dynamic_test) | **GET** /v7/endpoint/tests/dynamic-tests/agent-to-server/{testId} | Retrieve endpoint dynamic test +[**get_agent_to_server_endpoint_dynamic_tests**](DynamicTestsAgentToServerApi.md#get_agent_to_server_endpoint_dynamic_tests) | **GET** /v7/endpoint/tests/dynamic-tests/agent-to-server | List endpoint dynamic tests +[**update_agent_to_server_endpoint_dynamic_test**](DynamicTestsAgentToServerApi.md#update_agent_to_server_endpoint_dynamic_test) | **PATCH** /v7/endpoint/tests/dynamic-tests/agent-to-server/{testId} | Update agent to server dynamic test -# **delete_endpoint_dynamic_test** -> delete_endpoint_dynamic_test(test_id, aid=aid) - -Delete agent to server dynamic test - -Deletes an agent to server endpoint dynamic test. - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import thousandeyes_sdk.endpoint_tests -from thousandeyes_sdk.endpoint_tests.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.thousandeyes.com -# See configuration.py for a list of all supported configuration parameters. -configuration = thousandeyes_sdk.client.Configuration( - host = "https://api.thousandeyes.com" -) - -# 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.client.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with thousandeyes_sdk.endpoint_tests.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = thousandeyes_sdk.endpoint_tests.DynamicTestsAgentToServerApi(api_client) - test_id = '584739201' # str | Unique ID of endpoint test. - 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 agent to server dynamic test - api_instance.delete_endpoint_dynamic_test(test_id, aid=aid) - except Exception as e: - print("Exception when calling DynamicTestsAgentToServerApi->delete_endpoint_dynamic_test: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **test_id** | **str**| Unique ID of endpoint test. | - **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/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 | - | -**429** | Exhausted rate limit for the organization | - | -**500** | Internal server error | - | -**502** | Bad Gateway | - | -**0** | An error occurred | - | - -[[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_dynamic_test_detail** -> DynamicTest get_dynamic_test_detail(test_id, aid=aid) - -Retrieve endpoint dynamic test - -Returns details of an endpoint dynamic test, including test type, name, intervals, targets. - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import thousandeyes_sdk.endpoint_tests -from thousandeyes_sdk.endpoint_tests.models.dynamic_test import DynamicTest -from thousandeyes_sdk.endpoint_tests.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.thousandeyes.com -# See configuration.py for a list of all supported configuration parameters. -configuration = thousandeyes_sdk.client.Configuration( - host = "https://api.thousandeyes.com" -) - -# 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.client.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with thousandeyes_sdk.endpoint_tests.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = thousandeyes_sdk.endpoint_tests.DynamicTestsAgentToServerApi(api_client) - test_id = '584739201' # str | Unique ID of endpoint test. - 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: - # Retrieve endpoint dynamic test - api_response = api_instance.get_dynamic_test_detail(test_id, aid=aid) - print("The response of DynamicTestsAgentToServerApi->get_dynamic_test_detail:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DynamicTestsAgentToServerApi->get_dynamic_test_detail: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **test_id** | **str**| Unique ID of endpoint test. | - **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 - -[**DynamicTest**](DynamicTest.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**401** | Unauthorized | - | -**403** | Insufficient permissions to query endpoint | - | -**404** | Not found | - | -**429** | Exhausted rate limit for the organization | - | -**500** | Internal server error | - | -**502** | Bad Gateway | - | -**0** | An error occurred | - | - -[[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_dynamic_tests_list** -> DynamicTests get_dynamic_tests_list(aid=aid) - -List endpoint dynamic tests - -Returns a list of all endpoint dynamic tests configured in ThousandEyes. This list does not contain saved events. - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import thousandeyes_sdk.endpoint_tests -from thousandeyes_sdk.endpoint_tests.models.dynamic_tests import DynamicTests -from thousandeyes_sdk.endpoint_tests.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.thousandeyes.com -# See configuration.py for a list of all supported configuration parameters. -configuration = thousandeyes_sdk.client.Configuration( - host = "https://api.thousandeyes.com" -) - -# 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.client.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with thousandeyes_sdk.endpoint_tests.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = thousandeyes_sdk.endpoint_tests.DynamicTestsAgentToServerApi(api_client) - 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: - # List endpoint dynamic tests - api_response = api_instance.get_dynamic_tests_list(aid=aid) - print("The response of DynamicTestsAgentToServerApi->get_dynamic_tests_list:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DynamicTestsAgentToServerApi->get_dynamic_tests_list: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **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 - -[**DynamicTests**](DynamicTests.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**401** | Unauthorized | - | -**403** | Insufficient permissions to query endpoint | - | -**429** | Exhausted rate limit for the organization | - | -**500** | Internal server error | - | -**502** | Bad Gateway | - | -**0** | An error occurred | - | - -[[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) - -# **post_dynamic_test** -> DynamicTest post_dynamic_test(dynamic_test_request, aid=aid) +# **create_agent_to_server_endpoint_dynamic_test** +> DynamicTest create_agent_to_server_endpoint_dynamic_test(dynamic_test_request, aid=aid) Create endpoint dynamic test @@ -310,11 +54,11 @@ with thousandeyes_sdk.endpoint_tests.ApiClient(configuration) as api_client: try: # Create endpoint dynamic test - api_response = api_instance.post_dynamic_test(dynamic_test_request, aid=aid) - print("The response of DynamicTestsAgentToServerApi->post_dynamic_test:\n") + api_response = api_instance.create_agent_to_server_endpoint_dynamic_test(dynamic_test_request, aid=aid) + print("The response of DynamicTestsAgentToServerApi->create_agent_to_server_endpoint_dynamic_test:\n") pprint(api_response) except Exception as e: - print("Exception when calling DynamicTestsAgentToServerApi->post_dynamic_test: %s\n" % e) + print("Exception when calling DynamicTestsAgentToServerApi->create_agent_to_server_endpoint_dynamic_test: %s\n" % e) ``` @@ -338,7 +82,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -356,8 +100,264 @@ 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_endpoint_dynamic_test_detail** -> DynamicTest update_endpoint_dynamic_test_detail(test_id, endpoint_dynamic_test_update, aid=aid) +# **delete_agent_to_server_endpoint_dynamic_test** +> delete_agent_to_server_endpoint_dynamic_test(test_id, aid=aid) + +Delete agent to server dynamic test + +Deletes an agent to server endpoint dynamic test. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.endpoint_tests +from thousandeyes_sdk.endpoint_tests.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.endpoint_tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.endpoint_tests.DynamicTestsAgentToServerApi(api_client) + test_id = '584739201' # str | Unique ID of endpoint test. + 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 agent to server dynamic test + api_instance.delete_agent_to_server_endpoint_dynamic_test(test_id, aid=aid) + except Exception as e: + print("Exception when calling DynamicTestsAgentToServerApi->delete_agent_to_server_endpoint_dynamic_test: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **test_id** | **str**| Unique ID of endpoint test. | + **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 | - | +**429** | Exhausted rate limit for the organization | - | +**500** | Internal server error | - | +**502** | Bad Gateway | - | +**0** | An error occurred | - | + +[[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_agent_to_server_endpoint_dynamic_test** +> DynamicTest get_agent_to_server_endpoint_dynamic_test(test_id, aid=aid) + +Retrieve endpoint dynamic test + +Returns details of an endpoint dynamic test, including test type, name, intervals, targets. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.endpoint_tests +from thousandeyes_sdk.endpoint_tests.models.dynamic_test import DynamicTest +from thousandeyes_sdk.endpoint_tests.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.endpoint_tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.endpoint_tests.DynamicTestsAgentToServerApi(api_client) + test_id = '584739201' # str | Unique ID of endpoint test. + 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: + # Retrieve endpoint dynamic test + api_response = api_instance.get_agent_to_server_endpoint_dynamic_test(test_id, aid=aid) + print("The response of DynamicTestsAgentToServerApi->get_agent_to_server_endpoint_dynamic_test:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DynamicTestsAgentToServerApi->get_agent_to_server_endpoint_dynamic_test: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **test_id** | **str**| Unique ID of endpoint test. | + **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 + +[**DynamicTest**](DynamicTest.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | +**404** | Not found | - | +**429** | Exhausted rate limit for the organization | - | +**500** | Internal server error | - | +**502** | Bad Gateway | - | +**0** | An error occurred | - | + +[[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_agent_to_server_endpoint_dynamic_tests** +> DynamicTests get_agent_to_server_endpoint_dynamic_tests(aid=aid) + +List endpoint dynamic tests + +Returns a list of all endpoint dynamic tests configured in ThousandEyes. This list does not contain saved events. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.endpoint_tests +from thousandeyes_sdk.endpoint_tests.models.dynamic_tests import DynamicTests +from thousandeyes_sdk.endpoint_tests.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.endpoint_tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.endpoint_tests.DynamicTestsAgentToServerApi(api_client) + 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: + # List endpoint dynamic tests + api_response = api_instance.get_agent_to_server_endpoint_dynamic_tests(aid=aid) + print("The response of DynamicTestsAgentToServerApi->get_agent_to_server_endpoint_dynamic_tests:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DynamicTestsAgentToServerApi->get_agent_to_server_endpoint_dynamic_tests: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **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 + +[**DynamicTests**](DynamicTests.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | +**429** | Exhausted rate limit for the organization | - | +**500** | Internal server error | - | +**502** | Bad Gateway | - | +**0** | An error occurred | - | + +[[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_agent_to_server_endpoint_dynamic_test** +> DynamicTest update_agent_to_server_endpoint_dynamic_test(test_id, endpoint_dynamic_test_update, aid=aid) Update agent to server dynamic test @@ -400,11 +400,11 @@ with thousandeyes_sdk.endpoint_tests.ApiClient(configuration) as api_client: try: # Update agent to server dynamic test - api_response = api_instance.update_endpoint_dynamic_test_detail(test_id, endpoint_dynamic_test_update, aid=aid) - print("The response of DynamicTestsAgentToServerApi->update_endpoint_dynamic_test_detail:\n") + api_response = api_instance.update_agent_to_server_endpoint_dynamic_test(test_id, endpoint_dynamic_test_update, aid=aid) + print("The response of DynamicTestsAgentToServerApi->update_agent_to_server_endpoint_dynamic_test:\n") pprint(api_response) except Exception as e: - print("Exception when calling DynamicTestsAgentToServerApi->update_endpoint_dynamic_test_detail: %s\n" % e) + print("Exception when calling DynamicTestsAgentToServerApi->update_agent_to_server_endpoint_dynamic_test: %s\n" % e) ``` @@ -429,7 +429,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-endpoint-tests/docs/EndpointHttpServerTest.md b/thousandeyes-sdk-endpoint-tests/docs/EndpointHttpServerTest.md index 5f69864d..b2ccdd47 100644 --- a/thousandeyes-sdk-endpoint-tests/docs/EndpointHttpServerTest.md +++ b/thousandeyes-sdk-endpoint-tests/docs/EndpointHttpServerTest.md @@ -30,7 +30,7 @@ Name | Type | Description | Notes **ssl_version_id** | [**TestSslVersionId**](TestSslVersionId.md) | | [optional] **verify_certificate** | **bool** | Flag indicating if a certificate should be verified. | [optional] **content_regex** | **str** | Content regex, this field does not require escaping. | [optional] -**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to false. | [optional] [default to True] +**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`. | [optional] [default to True] **http_target_time** | **int** | Target time for HTTP server completion, specified in milliseconds. | [optional] **http_version** | **int** | HTTP protocol version. Set to '2' to prefer HTTP/2, or '1' to use only HTTP/1.1. | [optional] [default to 2] **post_body** | **str** | Enter the body for the HTTP POST request in this field. No special escaping is necessary. If the post body is provided with content, the `requestMethod` is automatically set to POST. | [optional] diff --git a/thousandeyes-sdk-endpoint-tests/docs/ListEndpointScheduledTestsApi.md b/thousandeyes-sdk-endpoint-tests/docs/ListEndpointScheduledTestsApi.md index f94322c3..12278001 100644 --- a/thousandeyes-sdk-endpoint-tests/docs/ListEndpointScheduledTestsApi.md +++ b/thousandeyes-sdk-endpoint-tests/docs/ListEndpointScheduledTestsApi.md @@ -4,11 +4,11 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**get_endpoint_tests_list**](ListEndpointScheduledTestsApi.md#get_endpoint_tests_list) | **GET** /v7/endpoint/tests/scheduled-tests | List endpoint scheduled tests +[**get_endpoint_scheduled_tests**](ListEndpointScheduledTestsApi.md#get_endpoint_scheduled_tests) | **GET** /v7/endpoint/tests/scheduled-tests | List endpoint scheduled tests -# **get_endpoint_tests_list** -> EndpointTests get_endpoint_tests_list(aid=aid) +# **get_endpoint_scheduled_tests** +> EndpointTests get_endpoint_scheduled_tests(aid=aid) List endpoint scheduled tests @@ -48,11 +48,11 @@ with thousandeyes_sdk.endpoint_tests.ApiClient(configuration) as api_client: try: # List endpoint scheduled tests - api_response = api_instance.get_endpoint_tests_list(aid=aid) - print("The response of ListEndpointScheduledTestsApi->get_endpoint_tests_list:\n") + api_response = api_instance.get_endpoint_scheduled_tests(aid=aid) + print("The response of ListEndpointScheduledTestsApi->get_endpoint_scheduled_tests:\n") pprint(api_response) except Exception as e: - print("Exception when calling ListEndpointScheduledTestsApi->get_endpoint_tests_list: %s\n" % e) + print("Exception when calling ListEndpointScheduledTestsApi->get_endpoint_scheduled_tests: %s\n" % e) ``` @@ -75,7 +75,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-endpoint-tests/docs/ScheduledTestsAgentToServerApi.md b/thousandeyes-sdk-endpoint-tests/docs/ScheduledTestsAgentToServerApi.md index 1680e350..3789dc16 100644 --- a/thousandeyes-sdk-endpoint-tests/docs/ScheduledTestsAgentToServerApi.md +++ b/thousandeyes-sdk-endpoint-tests/docs/ScheduledTestsAgentToServerApi.md @@ -4,271 +4,15 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**delete_endpoint_agent_to_server_test**](ScheduledTestsAgentToServerApi.md#delete_endpoint_agent_to_server_test) | **DELETE** /v7/endpoint/tests/scheduled-tests/agent-to-server/{testId} | Delete agent to server scheduled test -[**get_endpoint_agent_to_server_detail**](ScheduledTestsAgentToServerApi.md#get_endpoint_agent_to_server_detail) | **GET** /v7/endpoint/tests/scheduled-tests/agent-to-server/{testId} | Retrieve agent to server endpoint scheduled test -[**get_endpoint_agent_to_server_tests_list**](ScheduledTestsAgentToServerApi.md#get_endpoint_agent_to_server_tests_list) | **GET** /v7/endpoint/tests/scheduled-tests/agent-to-server | List agent to server endpoint scheduled tests -[**post_endpoint_agent_to_server_test**](ScheduledTestsAgentToServerApi.md#post_endpoint_agent_to_server_test) | **POST** /v7/endpoint/tests/scheduled-tests/agent-to-server | Creates agent to server endpoint scheduled test -[**update_endpoint_agent_to_server_detail**](ScheduledTestsAgentToServerApi.md#update_endpoint_agent_to_server_detail) | **PATCH** /v7/endpoint/tests/scheduled-tests/agent-to-server/{testId} | Update agent to server endpoint scheduled test +[**create_agent_to_server_endpoint_scheduled_test**](ScheduledTestsAgentToServerApi.md#create_agent_to_server_endpoint_scheduled_test) | **POST** /v7/endpoint/tests/scheduled-tests/agent-to-server | Creates agent to server endpoint scheduled test +[**delete_agent_to_server_endpoint_scheduled_test**](ScheduledTestsAgentToServerApi.md#delete_agent_to_server_endpoint_scheduled_test) | **DELETE** /v7/endpoint/tests/scheduled-tests/agent-to-server/{testId} | Delete agent to server scheduled test +[**get_agent_to_server_endpoint_scheduled_test**](ScheduledTestsAgentToServerApi.md#get_agent_to_server_endpoint_scheduled_test) | **GET** /v7/endpoint/tests/scheduled-tests/agent-to-server/{testId} | Retrieve agent to server endpoint scheduled test +[**get_agent_to_server_endpoint_scheduled_tests**](ScheduledTestsAgentToServerApi.md#get_agent_to_server_endpoint_scheduled_tests) | **GET** /v7/endpoint/tests/scheduled-tests/agent-to-server | List agent to server endpoint scheduled tests +[**update_agent_to_server_endpoint_scheduled_test**](ScheduledTestsAgentToServerApi.md#update_agent_to_server_endpoint_scheduled_test) | **PATCH** /v7/endpoint/tests/scheduled-tests/agent-to-server/{testId} | Update agent to server endpoint scheduled test -# **delete_endpoint_agent_to_server_test** -> delete_endpoint_agent_to_server_test(test_id, aid=aid) - -Delete agent to server scheduled test - -Deletes an agent to server endpoint scheduled test. - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import thousandeyes_sdk.endpoint_tests -from thousandeyes_sdk.endpoint_tests.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.thousandeyes.com -# See configuration.py for a list of all supported configuration parameters. -configuration = thousandeyes_sdk.client.Configuration( - host = "https://api.thousandeyes.com" -) - -# 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.client.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with thousandeyes_sdk.endpoint_tests.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = thousandeyes_sdk.endpoint_tests.ScheduledTestsAgentToServerApi(api_client) - test_id = '584739201' # str | Unique ID of endpoint test. - 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 agent to server scheduled test - api_instance.delete_endpoint_agent_to_server_test(test_id, aid=aid) - except Exception as e: - print("Exception when calling ScheduledTestsAgentToServerApi->delete_endpoint_agent_to_server_test: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **test_id** | **str**| Unique ID of endpoint test. | - **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/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 | - | -**429** | Exhausted rate limit for the organization | - | -**500** | Internal server error | - | -**502** | Bad Gateway | - | -**0** | An error occurred | - | - -[[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_endpoint_agent_to_server_detail** -> EndpointAgentToServerTest get_endpoint_agent_to_server_detail(test_id, aid=aid) - -Retrieve agent to server endpoint scheduled test - -Retrieves details of an agent to server endpoint scheduled test. - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import thousandeyes_sdk.endpoint_tests -from thousandeyes_sdk.endpoint_tests.models.endpoint_agent_to_server_test import EndpointAgentToServerTest -from thousandeyes_sdk.endpoint_tests.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.thousandeyes.com -# See configuration.py for a list of all supported configuration parameters. -configuration = thousandeyes_sdk.client.Configuration( - host = "https://api.thousandeyes.com" -) - -# 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.client.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with thousandeyes_sdk.endpoint_tests.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = thousandeyes_sdk.endpoint_tests.ScheduledTestsAgentToServerApi(api_client) - test_id = '584739201' # str | Unique ID of endpoint test. - 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: - # Retrieve agent to server endpoint scheduled test - api_response = api_instance.get_endpoint_agent_to_server_detail(test_id, aid=aid) - print("The response of ScheduledTestsAgentToServerApi->get_endpoint_agent_to_server_detail:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ScheduledTestsAgentToServerApi->get_endpoint_agent_to_server_detail: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **test_id** | **str**| Unique ID of endpoint test. | - **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 - -[**EndpointAgentToServerTest**](EndpointAgentToServerTest.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**401** | Unauthorized | - | -**403** | Insufficient permissions to query endpoint | - | -**404** | Not found | - | -**429** | Exhausted rate limit for the organization | - | -**500** | Internal server error | - | -**502** | Bad Gateway | - | -**0** | An error occurred | - | - -[[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_endpoint_agent_to_server_tests_list** -> EndpointAgentToServerTests get_endpoint_agent_to_server_tests_list(aid=aid) - -List agent to server endpoint scheduled tests - -Returns a list of all agent to server endpoint scheduled tests configured in ThousandEyes. This list does not contain saved events. - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import thousandeyes_sdk.endpoint_tests -from thousandeyes_sdk.endpoint_tests.models.endpoint_agent_to_server_tests import EndpointAgentToServerTests -from thousandeyes_sdk.endpoint_tests.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.thousandeyes.com -# See configuration.py for a list of all supported configuration parameters. -configuration = thousandeyes_sdk.client.Configuration( - host = "https://api.thousandeyes.com" -) - -# 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.client.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with thousandeyes_sdk.endpoint_tests.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = thousandeyes_sdk.endpoint_tests.ScheduledTestsAgentToServerApi(api_client) - 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: - # List agent to server endpoint scheduled tests - api_response = api_instance.get_endpoint_agent_to_server_tests_list(aid=aid) - print("The response of ScheduledTestsAgentToServerApi->get_endpoint_agent_to_server_tests_list:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ScheduledTestsAgentToServerApi->get_endpoint_agent_to_server_tests_list: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **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 - -[**EndpointAgentToServerTests**](EndpointAgentToServerTests.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**401** | Unauthorized | - | -**403** | Insufficient permissions to query endpoint | - | -**429** | Exhausted rate limit for the organization | - | -**500** | Internal server error | - | -**502** | Bad Gateway | - | -**0** | An error occurred | - | - -[[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) - -# **post_endpoint_agent_to_server_test** -> EndpointAgentToServerTest post_endpoint_agent_to_server_test(endpoint_agent_to_server_test_request, aid=aid) +# **create_agent_to_server_endpoint_scheduled_test** +> EndpointAgentToServerTest create_agent_to_server_endpoint_scheduled_test(endpoint_agent_to_server_test_request, aid=aid) Creates agent to server endpoint scheduled test @@ -310,11 +54,11 @@ with thousandeyes_sdk.endpoint_tests.ApiClient(configuration) as api_client: try: # Creates agent to server endpoint scheduled test - api_response = api_instance.post_endpoint_agent_to_server_test(endpoint_agent_to_server_test_request, aid=aid) - print("The response of ScheduledTestsAgentToServerApi->post_endpoint_agent_to_server_test:\n") + api_response = api_instance.create_agent_to_server_endpoint_scheduled_test(endpoint_agent_to_server_test_request, aid=aid) + print("The response of ScheduledTestsAgentToServerApi->create_agent_to_server_endpoint_scheduled_test:\n") pprint(api_response) except Exception as e: - print("Exception when calling ScheduledTestsAgentToServerApi->post_endpoint_agent_to_server_test: %s\n" % e) + print("Exception when calling ScheduledTestsAgentToServerApi->create_agent_to_server_endpoint_scheduled_test: %s\n" % e) ``` @@ -338,7 +82,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -356,8 +100,264 @@ 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_endpoint_agent_to_server_detail** -> EndpointAgentToServerTest update_endpoint_agent_to_server_detail(test_id, endpoint_network_test_update, aid=aid) +# **delete_agent_to_server_endpoint_scheduled_test** +> delete_agent_to_server_endpoint_scheduled_test(test_id, aid=aid) + +Delete agent to server scheduled test + +Deletes an agent to server endpoint scheduled test. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.endpoint_tests +from thousandeyes_sdk.endpoint_tests.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.endpoint_tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.endpoint_tests.ScheduledTestsAgentToServerApi(api_client) + test_id = '584739201' # str | Unique ID of endpoint test. + 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 agent to server scheduled test + api_instance.delete_agent_to_server_endpoint_scheduled_test(test_id, aid=aid) + except Exception as e: + print("Exception when calling ScheduledTestsAgentToServerApi->delete_agent_to_server_endpoint_scheduled_test: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **test_id** | **str**| Unique ID of endpoint test. | + **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 | - | +**429** | Exhausted rate limit for the organization | - | +**500** | Internal server error | - | +**502** | Bad Gateway | - | +**0** | An error occurred | - | + +[[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_agent_to_server_endpoint_scheduled_test** +> EndpointAgentToServerTest get_agent_to_server_endpoint_scheduled_test(test_id, aid=aid) + +Retrieve agent to server endpoint scheduled test + +Retrieves details of an agent to server endpoint scheduled test. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.endpoint_tests +from thousandeyes_sdk.endpoint_tests.models.endpoint_agent_to_server_test import EndpointAgentToServerTest +from thousandeyes_sdk.endpoint_tests.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.endpoint_tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.endpoint_tests.ScheduledTestsAgentToServerApi(api_client) + test_id = '584739201' # str | Unique ID of endpoint test. + 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: + # Retrieve agent to server endpoint scheduled test + api_response = api_instance.get_agent_to_server_endpoint_scheduled_test(test_id, aid=aid) + print("The response of ScheduledTestsAgentToServerApi->get_agent_to_server_endpoint_scheduled_test:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ScheduledTestsAgentToServerApi->get_agent_to_server_endpoint_scheduled_test: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **test_id** | **str**| Unique ID of endpoint test. | + **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 + +[**EndpointAgentToServerTest**](EndpointAgentToServerTest.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | +**404** | Not found | - | +**429** | Exhausted rate limit for the organization | - | +**500** | Internal server error | - | +**502** | Bad Gateway | - | +**0** | An error occurred | - | + +[[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_agent_to_server_endpoint_scheduled_tests** +> EndpointAgentToServerTests get_agent_to_server_endpoint_scheduled_tests(aid=aid) + +List agent to server endpoint scheduled tests + +Returns a list of all agent to server endpoint scheduled tests configured in ThousandEyes. This list does not contain saved events. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.endpoint_tests +from thousandeyes_sdk.endpoint_tests.models.endpoint_agent_to_server_tests import EndpointAgentToServerTests +from thousandeyes_sdk.endpoint_tests.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.endpoint_tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.endpoint_tests.ScheduledTestsAgentToServerApi(api_client) + 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: + # List agent to server endpoint scheduled tests + api_response = api_instance.get_agent_to_server_endpoint_scheduled_tests(aid=aid) + print("The response of ScheduledTestsAgentToServerApi->get_agent_to_server_endpoint_scheduled_tests:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ScheduledTestsAgentToServerApi->get_agent_to_server_endpoint_scheduled_tests: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **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 + +[**EndpointAgentToServerTests**](EndpointAgentToServerTests.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | +**429** | Exhausted rate limit for the organization | - | +**500** | Internal server error | - | +**502** | Bad Gateway | - | +**0** | An error occurred | - | + +[[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_agent_to_server_endpoint_scheduled_test** +> EndpointAgentToServerTest update_agent_to_server_endpoint_scheduled_test(test_id, endpoint_network_test_update, aid=aid) Update agent to server endpoint scheduled test @@ -400,11 +400,11 @@ with thousandeyes_sdk.endpoint_tests.ApiClient(configuration) as api_client: try: # Update agent to server endpoint scheduled test - api_response = api_instance.update_endpoint_agent_to_server_detail(test_id, endpoint_network_test_update, aid=aid) - print("The response of ScheduledTestsAgentToServerApi->update_endpoint_agent_to_server_detail:\n") + api_response = api_instance.update_agent_to_server_endpoint_scheduled_test(test_id, endpoint_network_test_update, aid=aid) + print("The response of ScheduledTestsAgentToServerApi->update_agent_to_server_endpoint_scheduled_test:\n") pprint(api_response) except Exception as e: - print("Exception when calling ScheduledTestsAgentToServerApi->update_endpoint_agent_to_server_detail: %s\n" % e) + print("Exception when calling ScheduledTestsAgentToServerApi->update_agent_to_server_endpoint_scheduled_test: %s\n" % e) ``` @@ -429,7 +429,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-endpoint-tests/docs/ScheduledTestsHTTPServerApi.md b/thousandeyes-sdk-endpoint-tests/docs/ScheduledTestsHTTPServerApi.md index 57045887..8311f95c 100644 --- a/thousandeyes-sdk-endpoint-tests/docs/ScheduledTestsHTTPServerApi.md +++ b/thousandeyes-sdk-endpoint-tests/docs/ScheduledTestsHTTPServerApi.md @@ -4,271 +4,15 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**delete_endpoint_http_server_test**](ScheduledTestsHTTPServerApi.md#delete_endpoint_http_server_test) | **DELETE** /v7/endpoint/tests/scheduled-tests/http-server/{testId} | Delete HTTP server scheduled test -[**get_endpoint_httpserver_test_detail**](ScheduledTestsHTTPServerApi.md#get_endpoint_httpserver_test_detail) | **GET** /v7/endpoint/tests/scheduled-tests/http-server/{testId} | Retrieves HTTP server endpoint scheduled test -[**get_endpoint_httpserver_tests_list**](ScheduledTestsHTTPServerApi.md#get_endpoint_httpserver_tests_list) | **GET** /v7/endpoint/tests/scheduled-tests/http-server | List HTTP server endpoint scheduled tests -[**post_endpoint_httpserver_test**](ScheduledTestsHTTPServerApi.md#post_endpoint_httpserver_test) | **POST** /v7/endpoint/tests/scheduled-tests/http-server | Create HTTP server endpoint scheduled test -[**update_endpoint_http_server_detail**](ScheduledTestsHTTPServerApi.md#update_endpoint_http_server_detail) | **PATCH** /v7/endpoint/tests/scheduled-tests/http-server/{testId} | Update HTTP server endpoint scheduled test +[**create_http_server_endpoint_scheduled_test**](ScheduledTestsHTTPServerApi.md#create_http_server_endpoint_scheduled_test) | **POST** /v7/endpoint/tests/scheduled-tests/http-server | Create HTTP server endpoint scheduled test +[**delete_http_server_endpoint_scheduled_test**](ScheduledTestsHTTPServerApi.md#delete_http_server_endpoint_scheduled_test) | **DELETE** /v7/endpoint/tests/scheduled-tests/http-server/{testId} | Delete HTTP server scheduled test +[**get_http_server_endpoint_scheduled_test**](ScheduledTestsHTTPServerApi.md#get_http_server_endpoint_scheduled_test) | **GET** /v7/endpoint/tests/scheduled-tests/http-server/{testId} | Retrieves HTTP server endpoint scheduled test +[**get_http_server_endpoint_scheduled_tests**](ScheduledTestsHTTPServerApi.md#get_http_server_endpoint_scheduled_tests) | **GET** /v7/endpoint/tests/scheduled-tests/http-server | List HTTP server endpoint scheduled tests +[**update_http_server_endpoint_scheduled_test**](ScheduledTestsHTTPServerApi.md#update_http_server_endpoint_scheduled_test) | **PATCH** /v7/endpoint/tests/scheduled-tests/http-server/{testId} | Update HTTP server endpoint scheduled test -# **delete_endpoint_http_server_test** -> delete_endpoint_http_server_test(test_id, aid=aid) - -Delete HTTP server scheduled test - -Deletes an HTTP server endpoint scheduled test. - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import thousandeyes_sdk.endpoint_tests -from thousandeyes_sdk.endpoint_tests.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.thousandeyes.com -# See configuration.py for a list of all supported configuration parameters. -configuration = thousandeyes_sdk.client.Configuration( - host = "https://api.thousandeyes.com" -) - -# 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.client.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with thousandeyes_sdk.endpoint_tests.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = thousandeyes_sdk.endpoint_tests.ScheduledTestsHTTPServerApi(api_client) - test_id = '584739201' # str | Unique ID of endpoint test. - 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 HTTP server scheduled test - api_instance.delete_endpoint_http_server_test(test_id, aid=aid) - except Exception as e: - print("Exception when calling ScheduledTestsHTTPServerApi->delete_endpoint_http_server_test: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **test_id** | **str**| Unique ID of endpoint test. | - **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/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 | - | -**429** | Exhausted rate limit for the organization | - | -**500** | Internal server error | - | -**502** | Bad Gateway | - | -**0** | An error occurred | - | - -[[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_endpoint_httpserver_test_detail** -> EndpointHttpServerTest get_endpoint_httpserver_test_detail(test_id, aid=aid) - -Retrieves HTTP server endpoint scheduled test - -Retrieves details of an HTTP Server endpoint scheduled test. - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import thousandeyes_sdk.endpoint_tests -from thousandeyes_sdk.endpoint_tests.models.endpoint_http_server_test import EndpointHttpServerTest -from thousandeyes_sdk.endpoint_tests.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.thousandeyes.com -# See configuration.py for a list of all supported configuration parameters. -configuration = thousandeyes_sdk.client.Configuration( - host = "https://api.thousandeyes.com" -) - -# 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.client.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with thousandeyes_sdk.endpoint_tests.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = thousandeyes_sdk.endpoint_tests.ScheduledTestsHTTPServerApi(api_client) - test_id = '584739201' # str | Unique ID of endpoint test. - 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: - # Retrieves HTTP server endpoint scheduled test - api_response = api_instance.get_endpoint_httpserver_test_detail(test_id, aid=aid) - print("The response of ScheduledTestsHTTPServerApi->get_endpoint_httpserver_test_detail:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ScheduledTestsHTTPServerApi->get_endpoint_httpserver_test_detail: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **test_id** | **str**| Unique ID of endpoint test. | - **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 - -[**EndpointHttpServerTest**](EndpointHttpServerTest.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**401** | Unauthorized | - | -**403** | Insufficient permissions to query endpoint | - | -**404** | Not found | - | -**429** | Exhausted rate limit for the organization | - | -**500** | Internal server error | - | -**502** | Bad Gateway | - | -**0** | An error occurred | - | - -[[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_endpoint_httpserver_tests_list** -> EndpointHttpServerTests get_endpoint_httpserver_tests_list(aid=aid) - -List HTTP server endpoint scheduled tests - -Returns a list of agent to server endpoint scheduled tests configured in ThousandEyes. This list does not contain saved events. - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import thousandeyes_sdk.endpoint_tests -from thousandeyes_sdk.endpoint_tests.models.endpoint_http_server_tests import EndpointHttpServerTests -from thousandeyes_sdk.endpoint_tests.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.thousandeyes.com -# See configuration.py for a list of all supported configuration parameters. -configuration = thousandeyes_sdk.client.Configuration( - host = "https://api.thousandeyes.com" -) - -# 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.client.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with thousandeyes_sdk.endpoint_tests.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = thousandeyes_sdk.endpoint_tests.ScheduledTestsHTTPServerApi(api_client) - 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: - # List HTTP server endpoint scheduled tests - api_response = api_instance.get_endpoint_httpserver_tests_list(aid=aid) - print("The response of ScheduledTestsHTTPServerApi->get_endpoint_httpserver_tests_list:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ScheduledTestsHTTPServerApi->get_endpoint_httpserver_tests_list: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **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 - -[**EndpointHttpServerTests**](EndpointHttpServerTests.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**401** | Unauthorized | - | -**403** | Insufficient permissions to query endpoint | - | -**429** | Exhausted rate limit for the organization | - | -**500** | Internal server error | - | -**502** | Bad Gateway | - | -**0** | An error occurred | - | - -[[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) - -# **post_endpoint_httpserver_test** -> EndpointHttpServerTest post_endpoint_httpserver_test(endpoint_http_server_test_request, aid=aid) +# **create_http_server_endpoint_scheduled_test** +> EndpointHttpServerTest create_http_server_endpoint_scheduled_test(endpoint_http_server_test_request, aid=aid) Create HTTP server endpoint scheduled test @@ -310,11 +54,11 @@ with thousandeyes_sdk.endpoint_tests.ApiClient(configuration) as api_client: try: # Create HTTP server endpoint scheduled test - api_response = api_instance.post_endpoint_httpserver_test(endpoint_http_server_test_request, aid=aid) - print("The response of ScheduledTestsHTTPServerApi->post_endpoint_httpserver_test:\n") + api_response = api_instance.create_http_server_endpoint_scheduled_test(endpoint_http_server_test_request, aid=aid) + print("The response of ScheduledTestsHTTPServerApi->create_http_server_endpoint_scheduled_test:\n") pprint(api_response) except Exception as e: - print("Exception when calling ScheduledTestsHTTPServerApi->post_endpoint_httpserver_test: %s\n" % e) + print("Exception when calling ScheduledTestsHTTPServerApi->create_http_server_endpoint_scheduled_test: %s\n" % e) ``` @@ -338,7 +82,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -356,8 +100,264 @@ 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_endpoint_http_server_detail** -> EndpointHttpServerTest update_endpoint_http_server_detail(test_id, endpoint_http_test_update, aid=aid) +# **delete_http_server_endpoint_scheduled_test** +> delete_http_server_endpoint_scheduled_test(test_id, aid=aid) + +Delete HTTP server scheduled test + +Deletes an HTTP server endpoint scheduled test. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.endpoint_tests +from thousandeyes_sdk.endpoint_tests.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.endpoint_tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.endpoint_tests.ScheduledTestsHTTPServerApi(api_client) + test_id = '584739201' # str | Unique ID of endpoint test. + 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 HTTP server scheduled test + api_instance.delete_http_server_endpoint_scheduled_test(test_id, aid=aid) + except Exception as e: + print("Exception when calling ScheduledTestsHTTPServerApi->delete_http_server_endpoint_scheduled_test: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **test_id** | **str**| Unique ID of endpoint test. | + **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 | - | +**429** | Exhausted rate limit for the organization | - | +**500** | Internal server error | - | +**502** | Bad Gateway | - | +**0** | An error occurred | - | + +[[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_http_server_endpoint_scheduled_test** +> EndpointHttpServerTest get_http_server_endpoint_scheduled_test(test_id, aid=aid) + +Retrieves HTTP server endpoint scheduled test + +Retrieves details of an HTTP Server endpoint scheduled test. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.endpoint_tests +from thousandeyes_sdk.endpoint_tests.models.endpoint_http_server_test import EndpointHttpServerTest +from thousandeyes_sdk.endpoint_tests.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.endpoint_tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.endpoint_tests.ScheduledTestsHTTPServerApi(api_client) + test_id = '584739201' # str | Unique ID of endpoint test. + 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: + # Retrieves HTTP server endpoint scheduled test + api_response = api_instance.get_http_server_endpoint_scheduled_test(test_id, aid=aid) + print("The response of ScheduledTestsHTTPServerApi->get_http_server_endpoint_scheduled_test:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ScheduledTestsHTTPServerApi->get_http_server_endpoint_scheduled_test: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **test_id** | **str**| Unique ID of endpoint test. | + **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 + +[**EndpointHttpServerTest**](EndpointHttpServerTest.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | +**404** | Not found | - | +**429** | Exhausted rate limit for the organization | - | +**500** | Internal server error | - | +**502** | Bad Gateway | - | +**0** | An error occurred | - | + +[[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_http_server_endpoint_scheduled_tests** +> EndpointHttpServerTests get_http_server_endpoint_scheduled_tests(aid=aid) + +List HTTP server endpoint scheduled tests + +Returns a list of agent to server endpoint scheduled tests configured in ThousandEyes. This list does not contain saved events. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.endpoint_tests +from thousandeyes_sdk.endpoint_tests.models.endpoint_http_server_tests import EndpointHttpServerTests +from thousandeyes_sdk.endpoint_tests.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.endpoint_tests.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.endpoint_tests.ScheduledTestsHTTPServerApi(api_client) + 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: + # List HTTP server endpoint scheduled tests + api_response = api_instance.get_http_server_endpoint_scheduled_tests(aid=aid) + print("The response of ScheduledTestsHTTPServerApi->get_http_server_endpoint_scheduled_tests:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ScheduledTestsHTTPServerApi->get_http_server_endpoint_scheduled_tests: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **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 + +[**EndpointHttpServerTests**](EndpointHttpServerTests.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/hal+json, application/json, application/problem+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**401** | Unauthorized | - | +**403** | Insufficient permissions to query endpoint | - | +**429** | Exhausted rate limit for the organization | - | +**500** | Internal server error | - | +**502** | Bad Gateway | - | +**0** | An error occurred | - | + +[[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_http_server_endpoint_scheduled_test** +> EndpointHttpServerTest update_http_server_endpoint_scheduled_test(test_id, endpoint_http_test_update, aid=aid) Update HTTP server endpoint scheduled test @@ -400,11 +400,11 @@ with thousandeyes_sdk.endpoint_tests.ApiClient(configuration) as api_client: try: # Update HTTP server endpoint scheduled test - api_response = api_instance.update_endpoint_http_server_detail(test_id, endpoint_http_test_update, aid=aid) - print("The response of ScheduledTestsHTTPServerApi->update_endpoint_http_server_detail:\n") + api_response = api_instance.update_http_server_endpoint_scheduled_test(test_id, endpoint_http_test_update, aid=aid) + print("The response of ScheduledTestsHTTPServerApi->update_http_server_endpoint_scheduled_test:\n") pprint(api_response) except Exception as e: - print("Exception when calling ScheduledTestsHTTPServerApi->update_endpoint_http_server_detail: %s\n" % e) + print("Exception when calling ScheduledTestsHTTPServerApi->update_http_server_endpoint_scheduled_test: %s\n" % e) ``` @@ -429,7 +429,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-endpoint-tests/docs/ValidationErrorItem.md b/thousandeyes-sdk-endpoint-tests/docs/ValidationErrorItem.md index 2dfa1308..6227b6ab 100644 --- a/thousandeyes-sdk-endpoint-tests/docs/ValidationErrorItem.md +++ b/thousandeyes-sdk-endpoint-tests/docs/ValidationErrorItem.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **code** | **str** | (Optional) A unique error type/code that can be referenced in the documentation for further details. | [optional] -**var_field** | **int** | Identifies the field that triggered this particular error. | [optional] +**var_field** | **str** | Identifies the field that triggered this particular error. | [optional] **message** | **str** | A short, human-readable summary of the error. | [optional] ## Example diff --git a/thousandeyes-sdk-endpoint-tests/pyproject.toml b/thousandeyes-sdk-endpoint-tests/pyproject.toml index e6bb29d4..727a9e2f 100644 --- a/thousandeyes-sdk-endpoint-tests/pyproject.toml +++ b/thousandeyes-sdk-endpoint-tests/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "thousandeyes-sdk-endpoint-tests" -version = "1.0.0" +dynamic = ["version"] authors = [ { name = "ThousandEyes API Team", email = "api-team@thousandeyes.com" } ] @@ -11,9 +11,12 @@ dependencies = [ "python-dateutil >=2.8.2", "pydantic >=2", "typing-extensions >=4.7.1", - "thousandeyes-sdk-client==1.0.0", + "thousandeyes-sdk-core", ] +[tool.setuptools.dynamic] +version = {attr = "thousandeyes_sdk.client.__version__"} + [project.optional-dependencies] test = [ "pytest~=7.1.3", diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/__init__.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/__init__.py index ef0def4a..02610a72 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/__init__.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/__init__.py @@ -7,15 +7,13 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 -__version__ = "1.0.0" - # import apis into sdk package from thousandeyes_sdk.endpoint_tests.api.dynamic_tests_agent_to_server_api import DynamicTestsAgentToServerApi from thousandeyes_sdk.endpoint_tests.api.list_endpoint_scheduled_tests_api import ListEndpointScheduledTestsApi diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/api/dynamic_tests_agent_to_server_api.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/api/dynamic_tests_agent_to_server_api.py index 3898317e..9aa7945c 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/api/dynamic_tests_agent_to_server_api.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/api/dynamic_tests_agent_to_server_api.py @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -29,6 +29,7 @@ from thousandeyes_sdk.endpoint_tests.models.endpoint_dynamic_test_update import from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class DynamicTestsAgentToServerApi: @@ -41,11 +42,325 @@ class DynamicTestsAgentToServerApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @validate_call - def delete_endpoint_dynamic_test( + def create_agent_to_server_endpoint_dynamic_test( + self, + dynamic_test_request: DynamicTestRequest, + 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, + ) -> DynamicTest: + """Create endpoint dynamic test + + Create a new endpoint dynamic test in ThousandEyes using properties specified in the POST data. Please note that only Account Admins have the authorization to create new tests; regular users are restricted from using POST-based methods. + + :param dynamic_test_request: (required) + :type dynamic_test_request: DynamicTestRequest + :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._create_agent_to_server_endpoint_dynamic_test_serialize( + dynamic_test_request=dynamic_test_request, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "DynamicTest", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "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.endpoint_tests.models, + ).data + + + @validate_call + def create_agent_to_server_endpoint_dynamic_test_with_http_info( + self, + dynamic_test_request: DynamicTestRequest, + 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[DynamicTest]: + """Create endpoint dynamic test + + Create a new endpoint dynamic test in ThousandEyes using properties specified in the POST data. Please note that only Account Admins have the authorization to create new tests; regular users are restricted from using POST-based methods. + + :param dynamic_test_request: (required) + :type dynamic_test_request: DynamicTestRequest + :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._create_agent_to_server_endpoint_dynamic_test_serialize( + dynamic_test_request=dynamic_test_request, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "DynamicTest", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "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.endpoint_tests.models, + ) + + + @validate_call + def create_agent_to_server_endpoint_dynamic_test_without_preload_content( + self, + dynamic_test_request: DynamicTestRequest, + 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: + """Create endpoint dynamic test + + Create a new endpoint dynamic test in ThousandEyes using properties specified in the POST data. Please note that only Account Admins have the authorization to create new tests; regular users are restricted from using POST-based methods. + + :param dynamic_test_request: (required) + :type dynamic_test_request: DynamicTestRequest + :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._create_agent_to_server_endpoint_dynamic_test_serialize( + dynamic_test_request=dynamic_test_request, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "DynamicTest", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_agent_to_server_endpoint_dynamic_test_serialize( + self, + dynamic_test_request, + 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 + if dynamic_test_request is not None: + _body_params = dynamic_test_request + + + # 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] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v7/endpoint/tests/dynamic-tests/agent-to-server', + 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 delete_agent_to_server_endpoint_dynamic_test( self, test_id: Annotated[StrictStr, Field(description="Unique ID of endpoint test.")], 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, @@ -92,7 +407,7 @@ class DynamicTestsAgentToServerApi: :return: Returns the result object. """ # noqa: E501 - _param = self._delete_endpoint_dynamic_test_serialize( + _param = self._delete_agent_to_server_endpoint_dynamic_test_serialize( test_id=test_id, aid=aid, _request_auth=_request_auth, @@ -124,7 +439,7 @@ class DynamicTestsAgentToServerApi: @validate_call - def delete_endpoint_dynamic_test_with_http_info( + def delete_agent_to_server_endpoint_dynamic_test_with_http_info( self, test_id: Annotated[StrictStr, Field(description="Unique ID of endpoint test.")], 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, @@ -171,7 +486,7 @@ class DynamicTestsAgentToServerApi: :return: Returns the result object. """ # noqa: E501 - _param = self._delete_endpoint_dynamic_test_serialize( + _param = self._delete_agent_to_server_endpoint_dynamic_test_serialize( test_id=test_id, aid=aid, _request_auth=_request_auth, @@ -203,7 +518,7 @@ class DynamicTestsAgentToServerApi: @validate_call - def delete_endpoint_dynamic_test_without_preload_content( + def delete_agent_to_server_endpoint_dynamic_test_without_preload_content( self, test_id: Annotated[StrictStr, Field(description="Unique ID of endpoint test.")], 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, @@ -250,7 +565,7 @@ class DynamicTestsAgentToServerApi: :return: Returns the result object. """ # noqa: E501 - _param = self._delete_endpoint_dynamic_test_serialize( + _param = self._delete_agent_to_server_endpoint_dynamic_test_serialize( test_id=test_id, aid=aid, _request_auth=_request_auth, @@ -276,7 +591,7 @@ class DynamicTestsAgentToServerApi: return response_data.response - def _delete_endpoint_dynamic_test_serialize( + def _delete_agent_to_server_endpoint_dynamic_test_serialize( self, test_id, aid, @@ -314,6 +629,7 @@ class DynamicTestsAgentToServerApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ + 'application/json', 'application/problem+json' ] ) @@ -343,7 +659,7 @@ class DynamicTestsAgentToServerApi: @validate_call - def get_dynamic_test_detail( + def get_agent_to_server_endpoint_dynamic_test( self, test_id: Annotated[StrictStr, Field(description="Unique ID of endpoint test.")], 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, @@ -390,7 +706,7 @@ class DynamicTestsAgentToServerApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_dynamic_test_detail_serialize( + _param = self._get_agent_to_server_endpoint_dynamic_test_serialize( test_id=test_id, aid=aid, _request_auth=_request_auth, @@ -421,7 +737,7 @@ class DynamicTestsAgentToServerApi: @validate_call - def get_dynamic_test_detail_with_http_info( + def get_agent_to_server_endpoint_dynamic_test_with_http_info( self, test_id: Annotated[StrictStr, Field(description="Unique ID of endpoint test.")], 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, @@ -468,7 +784,7 @@ class DynamicTestsAgentToServerApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_dynamic_test_detail_serialize( + _param = self._get_agent_to_server_endpoint_dynamic_test_serialize( test_id=test_id, aid=aid, _request_auth=_request_auth, @@ -499,7 +815,7 @@ class DynamicTestsAgentToServerApi: @validate_call - def get_dynamic_test_detail_without_preload_content( + def get_agent_to_server_endpoint_dynamic_test_without_preload_content( self, test_id: Annotated[StrictStr, Field(description="Unique ID of endpoint test.")], 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, @@ -546,7 +862,7 @@ class DynamicTestsAgentToServerApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_dynamic_test_detail_serialize( + _param = self._get_agent_to_server_endpoint_dynamic_test_serialize( test_id=test_id, aid=aid, _request_auth=_request_auth, @@ -571,7 +887,7 @@ class DynamicTestsAgentToServerApi: return response_data.response - def _get_dynamic_test_detail_serialize( + def _get_agent_to_server_endpoint_dynamic_test_serialize( self, test_id, aid, @@ -610,6 +926,7 @@ class DynamicTestsAgentToServerApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -639,7 +956,7 @@ class DynamicTestsAgentToServerApi: @validate_call - def get_dynamic_tests_list( + def get_agent_to_server_endpoint_dynamic_tests( 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[ @@ -683,7 +1000,7 @@ class DynamicTestsAgentToServerApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_dynamic_tests_list_serialize( + _param = self._get_agent_to_server_endpoint_dynamic_tests_serialize( aid=aid, _request_auth=_request_auth, _content_type=_content_type, @@ -712,7 +1029,7 @@ class DynamicTestsAgentToServerApi: @validate_call - def get_dynamic_tests_list_with_http_info( + def get_agent_to_server_endpoint_dynamic_tests_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[ @@ -756,7 +1073,7 @@ class DynamicTestsAgentToServerApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_dynamic_tests_list_serialize( + _param = self._get_agent_to_server_endpoint_dynamic_tests_serialize( aid=aid, _request_auth=_request_auth, _content_type=_content_type, @@ -785,7 +1102,7 @@ class DynamicTestsAgentToServerApi: @validate_call - def get_dynamic_tests_list_without_preload_content( + def get_agent_to_server_endpoint_dynamic_tests_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[ @@ -829,7 +1146,7 @@ class DynamicTestsAgentToServerApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_dynamic_tests_list_serialize( + _param = self._get_agent_to_server_endpoint_dynamic_tests_serialize( aid=aid, _request_auth=_request_auth, _content_type=_content_type, @@ -852,7 +1169,7 @@ class DynamicTestsAgentToServerApi: return response_data.response - def _get_dynamic_tests_list_serialize( + def _get_agent_to_server_endpoint_dynamic_tests_serialize( self, aid, _request_auth, @@ -888,6 +1205,7 @@ class DynamicTestsAgentToServerApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -917,319 +1235,7 @@ class DynamicTestsAgentToServerApi: @validate_call - def post_dynamic_test( - self, - dynamic_test_request: DynamicTestRequest, - 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, - ) -> DynamicTest: - """Create endpoint dynamic test - - Create a new endpoint dynamic test in ThousandEyes using properties specified in the POST data. Please note that only Account Admins have the authorization to create new tests; regular users are restricted from using POST-based methods. - - :param dynamic_test_request: (required) - :type dynamic_test_request: DynamicTestRequest - :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._post_dynamic_test_serialize( - dynamic_test_request=dynamic_test_request, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "DynamicTest", - '400': "ValidationError", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "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.endpoint_tests.models, - ).data - - - @validate_call - def post_dynamic_test_with_http_info( - self, - dynamic_test_request: DynamicTestRequest, - 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[DynamicTest]: - """Create endpoint dynamic test - - Create a new endpoint dynamic test in ThousandEyes using properties specified in the POST data. Please note that only Account Admins have the authorization to create new tests; regular users are restricted from using POST-based methods. - - :param dynamic_test_request: (required) - :type dynamic_test_request: DynamicTestRequest - :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._post_dynamic_test_serialize( - dynamic_test_request=dynamic_test_request, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "DynamicTest", - '400': "ValidationError", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "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.endpoint_tests.models, - ) - - - @validate_call - def post_dynamic_test_without_preload_content( - self, - dynamic_test_request: DynamicTestRequest, - 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: - """Create endpoint dynamic test - - Create a new endpoint dynamic test in ThousandEyes using properties specified in the POST data. Please note that only Account Admins have the authorization to create new tests; regular users are restricted from using POST-based methods. - - :param dynamic_test_request: (required) - :type dynamic_test_request: DynamicTestRequest - :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._post_dynamic_test_serialize( - dynamic_test_request=dynamic_test_request, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "DynamicTest", - '400': "ValidationError", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _post_dynamic_test_serialize( - self, - dynamic_test_request, - 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 - if dynamic_test_request is not None: - _body_params = dynamic_test_request - - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/hal+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] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/v7/endpoint/tests/dynamic-tests/agent-to-server', - 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 update_endpoint_dynamic_test_detail( + def update_agent_to_server_endpoint_dynamic_test( self, test_id: Annotated[StrictStr, Field(description="Unique ID of endpoint test.")], endpoint_dynamic_test_update: EndpointDynamicTestUpdate, @@ -1279,7 +1285,7 @@ class DynamicTestsAgentToServerApi: :return: Returns the result object. """ # noqa: E501 - _param = self._update_endpoint_dynamic_test_detail_serialize( + _param = self._update_agent_to_server_endpoint_dynamic_test_serialize( test_id=test_id, endpoint_dynamic_test_update=endpoint_dynamic_test_update, aid=aid, @@ -1312,7 +1318,7 @@ class DynamicTestsAgentToServerApi: @validate_call - def update_endpoint_dynamic_test_detail_with_http_info( + def update_agent_to_server_endpoint_dynamic_test_with_http_info( self, test_id: Annotated[StrictStr, Field(description="Unique ID of endpoint test.")], endpoint_dynamic_test_update: EndpointDynamicTestUpdate, @@ -1362,7 +1368,7 @@ class DynamicTestsAgentToServerApi: :return: Returns the result object. """ # noqa: E501 - _param = self._update_endpoint_dynamic_test_detail_serialize( + _param = self._update_agent_to_server_endpoint_dynamic_test_serialize( test_id=test_id, endpoint_dynamic_test_update=endpoint_dynamic_test_update, aid=aid, @@ -1395,7 +1401,7 @@ class DynamicTestsAgentToServerApi: @validate_call - def update_endpoint_dynamic_test_detail_without_preload_content( + def update_agent_to_server_endpoint_dynamic_test_without_preload_content( self, test_id: Annotated[StrictStr, Field(description="Unique ID of endpoint test.")], endpoint_dynamic_test_update: EndpointDynamicTestUpdate, @@ -1445,7 +1451,7 @@ class DynamicTestsAgentToServerApi: :return: Returns the result object. """ # noqa: E501 - _param = self._update_endpoint_dynamic_test_detail_serialize( + _param = self._update_agent_to_server_endpoint_dynamic_test_serialize( test_id=test_id, endpoint_dynamic_test_update=endpoint_dynamic_test_update, aid=aid, @@ -1472,7 +1478,7 @@ class DynamicTestsAgentToServerApi: return response_data.response - def _update_endpoint_dynamic_test_detail_serialize( + def _update_agent_to_server_endpoint_dynamic_test_serialize( self, test_id, endpoint_dynamic_test_update, @@ -1514,6 +1520,7 @@ class DynamicTestsAgentToServerApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/api/list_endpoint_scheduled_tests_api.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/api/list_endpoint_scheduled_tests_api.py index 5f4863d1..05ccfeb1 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/api/list_endpoint_scheduled_tests_api.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/api/list_endpoint_scheduled_tests_api.py @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -26,6 +26,7 @@ from thousandeyes_sdk.endpoint_tests.models.endpoint_tests import EndpointTests from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class ListEndpointScheduledTestsApi: @@ -38,11 +39,12 @@ class ListEndpointScheduledTestsApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @validate_call - def get_endpoint_tests_list( + def get_endpoint_scheduled_tests( 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[ @@ -86,7 +88,7 @@ class ListEndpointScheduledTestsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_endpoint_tests_list_serialize( + _param = self._get_endpoint_scheduled_tests_serialize( aid=aid, _request_auth=_request_auth, _content_type=_content_type, @@ -115,7 +117,7 @@ class ListEndpointScheduledTestsApi: @validate_call - def get_endpoint_tests_list_with_http_info( + def get_endpoint_scheduled_tests_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[ @@ -159,7 +161,7 @@ class ListEndpointScheduledTestsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_endpoint_tests_list_serialize( + _param = self._get_endpoint_scheduled_tests_serialize( aid=aid, _request_auth=_request_auth, _content_type=_content_type, @@ -188,7 +190,7 @@ class ListEndpointScheduledTestsApi: @validate_call - def get_endpoint_tests_list_without_preload_content( + def get_endpoint_scheduled_tests_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[ @@ -232,7 +234,7 @@ class ListEndpointScheduledTestsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_endpoint_tests_list_serialize( + _param = self._get_endpoint_scheduled_tests_serialize( aid=aid, _request_auth=_request_auth, _content_type=_content_type, @@ -255,7 +257,7 @@ class ListEndpointScheduledTestsApi: return response_data.response - def _get_endpoint_tests_list_serialize( + def _get_endpoint_scheduled_tests_serialize( self, aid, _request_auth, @@ -291,6 +293,7 @@ class ListEndpointScheduledTestsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/api/scheduled_tests_agent_to_server_api.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/api/scheduled_tests_agent_to_server_api.py index ce05716e..699962b4 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/api/scheduled_tests_agent_to_server_api.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/api/scheduled_tests_agent_to_server_api.py @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -29,6 +29,7 @@ from thousandeyes_sdk.endpoint_tests.models.endpoint_network_test_update import from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class ScheduledTestsAgentToServerApi: @@ -41,11 +42,325 @@ class ScheduledTestsAgentToServerApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @validate_call - def delete_endpoint_agent_to_server_test( + def create_agent_to_server_endpoint_scheduled_test( + self, + endpoint_agent_to_server_test_request: EndpointAgentToServerTestRequest, + 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, + ) -> EndpointAgentToServerTest: + """Creates agent to server endpoint scheduled test + + Creates a new endpoint test in ThousandEyes using properties specified in the POST data. Please note that only Account Admins have the authorization to create new tests; regular users are restricted from using POST-based methods. + + :param endpoint_agent_to_server_test_request: (required) + :type endpoint_agent_to_server_test_request: EndpointAgentToServerTestRequest + :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._create_agent_to_server_endpoint_scheduled_test_serialize( + endpoint_agent_to_server_test_request=endpoint_agent_to_server_test_request, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "EndpointAgentToServerTest", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "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.endpoint_tests.models, + ).data + + + @validate_call + def create_agent_to_server_endpoint_scheduled_test_with_http_info( + self, + endpoint_agent_to_server_test_request: EndpointAgentToServerTestRequest, + 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[EndpointAgentToServerTest]: + """Creates agent to server endpoint scheduled test + + Creates a new endpoint test in ThousandEyes using properties specified in the POST data. Please note that only Account Admins have the authorization to create new tests; regular users are restricted from using POST-based methods. + + :param endpoint_agent_to_server_test_request: (required) + :type endpoint_agent_to_server_test_request: EndpointAgentToServerTestRequest + :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._create_agent_to_server_endpoint_scheduled_test_serialize( + endpoint_agent_to_server_test_request=endpoint_agent_to_server_test_request, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "EndpointAgentToServerTest", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "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.endpoint_tests.models, + ) + + + @validate_call + def create_agent_to_server_endpoint_scheduled_test_without_preload_content( + self, + endpoint_agent_to_server_test_request: EndpointAgentToServerTestRequest, + 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: + """Creates agent to server endpoint scheduled test + + Creates a new endpoint test in ThousandEyes using properties specified in the POST data. Please note that only Account Admins have the authorization to create new tests; regular users are restricted from using POST-based methods. + + :param endpoint_agent_to_server_test_request: (required) + :type endpoint_agent_to_server_test_request: EndpointAgentToServerTestRequest + :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._create_agent_to_server_endpoint_scheduled_test_serialize( + endpoint_agent_to_server_test_request=endpoint_agent_to_server_test_request, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "EndpointAgentToServerTest", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_agent_to_server_endpoint_scheduled_test_serialize( + self, + endpoint_agent_to_server_test_request, + 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 + if endpoint_agent_to_server_test_request is not None: + _body_params = endpoint_agent_to_server_test_request + + + # 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] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v7/endpoint/tests/scheduled-tests/agent-to-server', + 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 delete_agent_to_server_endpoint_scheduled_test( self, test_id: Annotated[StrictStr, Field(description="Unique ID of endpoint test.")], 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, @@ -92,7 +407,7 @@ class ScheduledTestsAgentToServerApi: :return: Returns the result object. """ # noqa: E501 - _param = self._delete_endpoint_agent_to_server_test_serialize( + _param = self._delete_agent_to_server_endpoint_scheduled_test_serialize( test_id=test_id, aid=aid, _request_auth=_request_auth, @@ -124,7 +439,7 @@ class ScheduledTestsAgentToServerApi: @validate_call - def delete_endpoint_agent_to_server_test_with_http_info( + def delete_agent_to_server_endpoint_scheduled_test_with_http_info( self, test_id: Annotated[StrictStr, Field(description="Unique ID of endpoint test.")], 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, @@ -171,7 +486,7 @@ class ScheduledTestsAgentToServerApi: :return: Returns the result object. """ # noqa: E501 - _param = self._delete_endpoint_agent_to_server_test_serialize( + _param = self._delete_agent_to_server_endpoint_scheduled_test_serialize( test_id=test_id, aid=aid, _request_auth=_request_auth, @@ -203,7 +518,7 @@ class ScheduledTestsAgentToServerApi: @validate_call - def delete_endpoint_agent_to_server_test_without_preload_content( + def delete_agent_to_server_endpoint_scheduled_test_without_preload_content( self, test_id: Annotated[StrictStr, Field(description="Unique ID of endpoint test.")], 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, @@ -250,7 +565,7 @@ class ScheduledTestsAgentToServerApi: :return: Returns the result object. """ # noqa: E501 - _param = self._delete_endpoint_agent_to_server_test_serialize( + _param = self._delete_agent_to_server_endpoint_scheduled_test_serialize( test_id=test_id, aid=aid, _request_auth=_request_auth, @@ -276,7 +591,7 @@ class ScheduledTestsAgentToServerApi: return response_data.response - def _delete_endpoint_agent_to_server_test_serialize( + def _delete_agent_to_server_endpoint_scheduled_test_serialize( self, test_id, aid, @@ -314,6 +629,7 @@ class ScheduledTestsAgentToServerApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ + 'application/json', 'application/problem+json' ] ) @@ -343,7 +659,7 @@ class ScheduledTestsAgentToServerApi: @validate_call - def get_endpoint_agent_to_server_detail( + def get_agent_to_server_endpoint_scheduled_test( self, test_id: Annotated[StrictStr, Field(description="Unique ID of endpoint test.")], 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, @@ -390,7 +706,7 @@ class ScheduledTestsAgentToServerApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_endpoint_agent_to_server_detail_serialize( + _param = self._get_agent_to_server_endpoint_scheduled_test_serialize( test_id=test_id, aid=aid, _request_auth=_request_auth, @@ -421,7 +737,7 @@ class ScheduledTestsAgentToServerApi: @validate_call - def get_endpoint_agent_to_server_detail_with_http_info( + def get_agent_to_server_endpoint_scheduled_test_with_http_info( self, test_id: Annotated[StrictStr, Field(description="Unique ID of endpoint test.")], 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, @@ -468,7 +784,7 @@ class ScheduledTestsAgentToServerApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_endpoint_agent_to_server_detail_serialize( + _param = self._get_agent_to_server_endpoint_scheduled_test_serialize( test_id=test_id, aid=aid, _request_auth=_request_auth, @@ -499,7 +815,7 @@ class ScheduledTestsAgentToServerApi: @validate_call - def get_endpoint_agent_to_server_detail_without_preload_content( + def get_agent_to_server_endpoint_scheduled_test_without_preload_content( self, test_id: Annotated[StrictStr, Field(description="Unique ID of endpoint test.")], 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, @@ -546,7 +862,7 @@ class ScheduledTestsAgentToServerApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_endpoint_agent_to_server_detail_serialize( + _param = self._get_agent_to_server_endpoint_scheduled_test_serialize( test_id=test_id, aid=aid, _request_auth=_request_auth, @@ -571,7 +887,7 @@ class ScheduledTestsAgentToServerApi: return response_data.response - def _get_endpoint_agent_to_server_detail_serialize( + def _get_agent_to_server_endpoint_scheduled_test_serialize( self, test_id, aid, @@ -610,6 +926,7 @@ class ScheduledTestsAgentToServerApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -639,7 +956,7 @@ class ScheduledTestsAgentToServerApi: @validate_call - def get_endpoint_agent_to_server_tests_list( + def get_agent_to_server_endpoint_scheduled_tests( 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[ @@ -683,7 +1000,7 @@ class ScheduledTestsAgentToServerApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_endpoint_agent_to_server_tests_list_serialize( + _param = self._get_agent_to_server_endpoint_scheduled_tests_serialize( aid=aid, _request_auth=_request_auth, _content_type=_content_type, @@ -712,7 +1029,7 @@ class ScheduledTestsAgentToServerApi: @validate_call - def get_endpoint_agent_to_server_tests_list_with_http_info( + def get_agent_to_server_endpoint_scheduled_tests_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[ @@ -756,7 +1073,7 @@ class ScheduledTestsAgentToServerApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_endpoint_agent_to_server_tests_list_serialize( + _param = self._get_agent_to_server_endpoint_scheduled_tests_serialize( aid=aid, _request_auth=_request_auth, _content_type=_content_type, @@ -785,7 +1102,7 @@ class ScheduledTestsAgentToServerApi: @validate_call - def get_endpoint_agent_to_server_tests_list_without_preload_content( + def get_agent_to_server_endpoint_scheduled_tests_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[ @@ -829,7 +1146,7 @@ class ScheduledTestsAgentToServerApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_endpoint_agent_to_server_tests_list_serialize( + _param = self._get_agent_to_server_endpoint_scheduled_tests_serialize( aid=aid, _request_auth=_request_auth, _content_type=_content_type, @@ -852,7 +1169,7 @@ class ScheduledTestsAgentToServerApi: return response_data.response - def _get_endpoint_agent_to_server_tests_list_serialize( + def _get_agent_to_server_endpoint_scheduled_tests_serialize( self, aid, _request_auth, @@ -888,6 +1205,7 @@ class ScheduledTestsAgentToServerApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -917,319 +1235,7 @@ class ScheduledTestsAgentToServerApi: @validate_call - def post_endpoint_agent_to_server_test( - self, - endpoint_agent_to_server_test_request: EndpointAgentToServerTestRequest, - 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, - ) -> EndpointAgentToServerTest: - """Creates agent to server endpoint scheduled test - - Creates a new endpoint test in ThousandEyes using properties specified in the POST data. Please note that only Account Admins have the authorization to create new tests; regular users are restricted from using POST-based methods. - - :param endpoint_agent_to_server_test_request: (required) - :type endpoint_agent_to_server_test_request: EndpointAgentToServerTestRequest - :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._post_endpoint_agent_to_server_test_serialize( - endpoint_agent_to_server_test_request=endpoint_agent_to_server_test_request, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "EndpointAgentToServerTest", - '400': "ValidationError", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "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.endpoint_tests.models, - ).data - - - @validate_call - def post_endpoint_agent_to_server_test_with_http_info( - self, - endpoint_agent_to_server_test_request: EndpointAgentToServerTestRequest, - 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[EndpointAgentToServerTest]: - """Creates agent to server endpoint scheduled test - - Creates a new endpoint test in ThousandEyes using properties specified in the POST data. Please note that only Account Admins have the authorization to create new tests; regular users are restricted from using POST-based methods. - - :param endpoint_agent_to_server_test_request: (required) - :type endpoint_agent_to_server_test_request: EndpointAgentToServerTestRequest - :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._post_endpoint_agent_to_server_test_serialize( - endpoint_agent_to_server_test_request=endpoint_agent_to_server_test_request, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "EndpointAgentToServerTest", - '400': "ValidationError", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "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.endpoint_tests.models, - ) - - - @validate_call - def post_endpoint_agent_to_server_test_without_preload_content( - self, - endpoint_agent_to_server_test_request: EndpointAgentToServerTestRequest, - 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: - """Creates agent to server endpoint scheduled test - - Creates a new endpoint test in ThousandEyes using properties specified in the POST data. Please note that only Account Admins have the authorization to create new tests; regular users are restricted from using POST-based methods. - - :param endpoint_agent_to_server_test_request: (required) - :type endpoint_agent_to_server_test_request: EndpointAgentToServerTestRequest - :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._post_endpoint_agent_to_server_test_serialize( - endpoint_agent_to_server_test_request=endpoint_agent_to_server_test_request, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "EndpointAgentToServerTest", - '400': "ValidationError", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _post_endpoint_agent_to_server_test_serialize( - self, - endpoint_agent_to_server_test_request, - 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 - if endpoint_agent_to_server_test_request is not None: - _body_params = endpoint_agent_to_server_test_request - - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/hal+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] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/v7/endpoint/tests/scheduled-tests/agent-to-server', - 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 update_endpoint_agent_to_server_detail( + def update_agent_to_server_endpoint_scheduled_test( self, test_id: Annotated[StrictStr, Field(description="Unique ID of endpoint test.")], endpoint_network_test_update: EndpointNetworkTestUpdate, @@ -1279,7 +1285,7 @@ class ScheduledTestsAgentToServerApi: :return: Returns the result object. """ # noqa: E501 - _param = self._update_endpoint_agent_to_server_detail_serialize( + _param = self._update_agent_to_server_endpoint_scheduled_test_serialize( test_id=test_id, endpoint_network_test_update=endpoint_network_test_update, aid=aid, @@ -1312,7 +1318,7 @@ class ScheduledTestsAgentToServerApi: @validate_call - def update_endpoint_agent_to_server_detail_with_http_info( + def update_agent_to_server_endpoint_scheduled_test_with_http_info( self, test_id: Annotated[StrictStr, Field(description="Unique ID of endpoint test.")], endpoint_network_test_update: EndpointNetworkTestUpdate, @@ -1362,7 +1368,7 @@ class ScheduledTestsAgentToServerApi: :return: Returns the result object. """ # noqa: E501 - _param = self._update_endpoint_agent_to_server_detail_serialize( + _param = self._update_agent_to_server_endpoint_scheduled_test_serialize( test_id=test_id, endpoint_network_test_update=endpoint_network_test_update, aid=aid, @@ -1395,7 +1401,7 @@ class ScheduledTestsAgentToServerApi: @validate_call - def update_endpoint_agent_to_server_detail_without_preload_content( + def update_agent_to_server_endpoint_scheduled_test_without_preload_content( self, test_id: Annotated[StrictStr, Field(description="Unique ID of endpoint test.")], endpoint_network_test_update: EndpointNetworkTestUpdate, @@ -1445,7 +1451,7 @@ class ScheduledTestsAgentToServerApi: :return: Returns the result object. """ # noqa: E501 - _param = self._update_endpoint_agent_to_server_detail_serialize( + _param = self._update_agent_to_server_endpoint_scheduled_test_serialize( test_id=test_id, endpoint_network_test_update=endpoint_network_test_update, aid=aid, @@ -1472,7 +1478,7 @@ class ScheduledTestsAgentToServerApi: return response_data.response - def _update_endpoint_agent_to_server_detail_serialize( + def _update_agent_to_server_endpoint_scheduled_test_serialize( self, test_id, endpoint_network_test_update, @@ -1514,6 +1520,7 @@ class ScheduledTestsAgentToServerApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/api/scheduled_tests_http_server_api.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/api/scheduled_tests_http_server_api.py index 5e321219..643ab29a 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/api/scheduled_tests_http_server_api.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/api/scheduled_tests_http_server_api.py @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -29,6 +29,7 @@ from thousandeyes_sdk.endpoint_tests.models.endpoint_http_test_update import End from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class ScheduledTestsHTTPServerApi: @@ -41,11 +42,325 @@ class ScheduledTestsHTTPServerApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @validate_call - def delete_endpoint_http_server_test( + def create_http_server_endpoint_scheduled_test( + self, + endpoint_http_server_test_request: EndpointHttpServerTestRequest, + 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, + ) -> EndpointHttpServerTest: + """Create HTTP server endpoint scheduled test + + Creates a new HTTP server endpoint test in ThousandEyes, using properties specified in the POST data. Please note that only users with Account Admin privileges have the authorization to create new tests; regular users are restricted from using POST-based methods. + + :param endpoint_http_server_test_request: (required) + :type endpoint_http_server_test_request: EndpointHttpServerTestRequest + :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._create_http_server_endpoint_scheduled_test_serialize( + endpoint_http_server_test_request=endpoint_http_server_test_request, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "EndpointHttpServerTest", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "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.endpoint_tests.models, + ).data + + + @validate_call + def create_http_server_endpoint_scheduled_test_with_http_info( + self, + endpoint_http_server_test_request: EndpointHttpServerTestRequest, + 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[EndpointHttpServerTest]: + """Create HTTP server endpoint scheduled test + + Creates a new HTTP server endpoint test in ThousandEyes, using properties specified in the POST data. Please note that only users with Account Admin privileges have the authorization to create new tests; regular users are restricted from using POST-based methods. + + :param endpoint_http_server_test_request: (required) + :type endpoint_http_server_test_request: EndpointHttpServerTestRequest + :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._create_http_server_endpoint_scheduled_test_serialize( + endpoint_http_server_test_request=endpoint_http_server_test_request, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "EndpointHttpServerTest", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "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.endpoint_tests.models, + ) + + + @validate_call + def create_http_server_endpoint_scheduled_test_without_preload_content( + self, + endpoint_http_server_test_request: EndpointHttpServerTestRequest, + 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: + """Create HTTP server endpoint scheduled test + + Creates a new HTTP server endpoint test in ThousandEyes, using properties specified in the POST data. Please note that only users with Account Admin privileges have the authorization to create new tests; regular users are restricted from using POST-based methods. + + :param endpoint_http_server_test_request: (required) + :type endpoint_http_server_test_request: EndpointHttpServerTestRequest + :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._create_http_server_endpoint_scheduled_test_serialize( + endpoint_http_server_test_request=endpoint_http_server_test_request, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "EndpointHttpServerTest", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_http_server_endpoint_scheduled_test_serialize( + self, + endpoint_http_server_test_request, + 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 + if endpoint_http_server_test_request is not None: + _body_params = endpoint_http_server_test_request + + + # 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] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v7/endpoint/tests/scheduled-tests/http-server', + 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 delete_http_server_endpoint_scheduled_test( self, test_id: Annotated[StrictStr, Field(description="Unique ID of endpoint test.")], 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, @@ -92,7 +407,7 @@ class ScheduledTestsHTTPServerApi: :return: Returns the result object. """ # noqa: E501 - _param = self._delete_endpoint_http_server_test_serialize( + _param = self._delete_http_server_endpoint_scheduled_test_serialize( test_id=test_id, aid=aid, _request_auth=_request_auth, @@ -124,7 +439,7 @@ class ScheduledTestsHTTPServerApi: @validate_call - def delete_endpoint_http_server_test_with_http_info( + def delete_http_server_endpoint_scheduled_test_with_http_info( self, test_id: Annotated[StrictStr, Field(description="Unique ID of endpoint test.")], 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, @@ -171,7 +486,7 @@ class ScheduledTestsHTTPServerApi: :return: Returns the result object. """ # noqa: E501 - _param = self._delete_endpoint_http_server_test_serialize( + _param = self._delete_http_server_endpoint_scheduled_test_serialize( test_id=test_id, aid=aid, _request_auth=_request_auth, @@ -203,7 +518,7 @@ class ScheduledTestsHTTPServerApi: @validate_call - def delete_endpoint_http_server_test_without_preload_content( + def delete_http_server_endpoint_scheduled_test_without_preload_content( self, test_id: Annotated[StrictStr, Field(description="Unique ID of endpoint test.")], 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, @@ -250,7 +565,7 @@ class ScheduledTestsHTTPServerApi: :return: Returns the result object. """ # noqa: E501 - _param = self._delete_endpoint_http_server_test_serialize( + _param = self._delete_http_server_endpoint_scheduled_test_serialize( test_id=test_id, aid=aid, _request_auth=_request_auth, @@ -276,7 +591,7 @@ class ScheduledTestsHTTPServerApi: return response_data.response - def _delete_endpoint_http_server_test_serialize( + def _delete_http_server_endpoint_scheduled_test_serialize( self, test_id, aid, @@ -314,6 +629,7 @@ class ScheduledTestsHTTPServerApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ + 'application/json', 'application/problem+json' ] ) @@ -343,7 +659,7 @@ class ScheduledTestsHTTPServerApi: @validate_call - def get_endpoint_httpserver_test_detail( + def get_http_server_endpoint_scheduled_test( self, test_id: Annotated[StrictStr, Field(description="Unique ID of endpoint test.")], 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, @@ -390,7 +706,7 @@ class ScheduledTestsHTTPServerApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_endpoint_httpserver_test_detail_serialize( + _param = self._get_http_server_endpoint_scheduled_test_serialize( test_id=test_id, aid=aid, _request_auth=_request_auth, @@ -421,7 +737,7 @@ class ScheduledTestsHTTPServerApi: @validate_call - def get_endpoint_httpserver_test_detail_with_http_info( + def get_http_server_endpoint_scheduled_test_with_http_info( self, test_id: Annotated[StrictStr, Field(description="Unique ID of endpoint test.")], 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, @@ -468,7 +784,7 @@ class ScheduledTestsHTTPServerApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_endpoint_httpserver_test_detail_serialize( + _param = self._get_http_server_endpoint_scheduled_test_serialize( test_id=test_id, aid=aid, _request_auth=_request_auth, @@ -499,7 +815,7 @@ class ScheduledTestsHTTPServerApi: @validate_call - def get_endpoint_httpserver_test_detail_without_preload_content( + def get_http_server_endpoint_scheduled_test_without_preload_content( self, test_id: Annotated[StrictStr, Field(description="Unique ID of endpoint test.")], 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, @@ -546,7 +862,7 @@ class ScheduledTestsHTTPServerApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_endpoint_httpserver_test_detail_serialize( + _param = self._get_http_server_endpoint_scheduled_test_serialize( test_id=test_id, aid=aid, _request_auth=_request_auth, @@ -571,7 +887,7 @@ class ScheduledTestsHTTPServerApi: return response_data.response - def _get_endpoint_httpserver_test_detail_serialize( + def _get_http_server_endpoint_scheduled_test_serialize( self, test_id, aid, @@ -610,6 +926,7 @@ class ScheduledTestsHTTPServerApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -639,7 +956,7 @@ class ScheduledTestsHTTPServerApi: @validate_call - def get_endpoint_httpserver_tests_list( + def get_http_server_endpoint_scheduled_tests( 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[ @@ -683,7 +1000,7 @@ class ScheduledTestsHTTPServerApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_endpoint_httpserver_tests_list_serialize( + _param = self._get_http_server_endpoint_scheduled_tests_serialize( aid=aid, _request_auth=_request_auth, _content_type=_content_type, @@ -712,7 +1029,7 @@ class ScheduledTestsHTTPServerApi: @validate_call - def get_endpoint_httpserver_tests_list_with_http_info( + def get_http_server_endpoint_scheduled_tests_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[ @@ -756,7 +1073,7 @@ class ScheduledTestsHTTPServerApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_endpoint_httpserver_tests_list_serialize( + _param = self._get_http_server_endpoint_scheduled_tests_serialize( aid=aid, _request_auth=_request_auth, _content_type=_content_type, @@ -785,7 +1102,7 @@ class ScheduledTestsHTTPServerApi: @validate_call - def get_endpoint_httpserver_tests_list_without_preload_content( + def get_http_server_endpoint_scheduled_tests_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[ @@ -829,7 +1146,7 @@ class ScheduledTestsHTTPServerApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_endpoint_httpserver_tests_list_serialize( + _param = self._get_http_server_endpoint_scheduled_tests_serialize( aid=aid, _request_auth=_request_auth, _content_type=_content_type, @@ -852,7 +1169,7 @@ class ScheduledTestsHTTPServerApi: return response_data.response - def _get_endpoint_httpserver_tests_list_serialize( + def _get_http_server_endpoint_scheduled_tests_serialize( self, aid, _request_auth, @@ -888,6 +1205,7 @@ class ScheduledTestsHTTPServerApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -917,319 +1235,7 @@ class ScheduledTestsHTTPServerApi: @validate_call - def post_endpoint_httpserver_test( - self, - endpoint_http_server_test_request: EndpointHttpServerTestRequest, - 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, - ) -> EndpointHttpServerTest: - """Create HTTP server endpoint scheduled test - - Creates a new HTTP server endpoint test in ThousandEyes, using properties specified in the POST data. Please note that only users with Account Admin privileges have the authorization to create new tests; regular users are restricted from using POST-based methods. - - :param endpoint_http_server_test_request: (required) - :type endpoint_http_server_test_request: EndpointHttpServerTestRequest - :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._post_endpoint_httpserver_test_serialize( - endpoint_http_server_test_request=endpoint_http_server_test_request, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "EndpointHttpServerTest", - '400': "ValidationError", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "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.endpoint_tests.models, - ).data - - - @validate_call - def post_endpoint_httpserver_test_with_http_info( - self, - endpoint_http_server_test_request: EndpointHttpServerTestRequest, - 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[EndpointHttpServerTest]: - """Create HTTP server endpoint scheduled test - - Creates a new HTTP server endpoint test in ThousandEyes, using properties specified in the POST data. Please note that only users with Account Admin privileges have the authorization to create new tests; regular users are restricted from using POST-based methods. - - :param endpoint_http_server_test_request: (required) - :type endpoint_http_server_test_request: EndpointHttpServerTestRequest - :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._post_endpoint_httpserver_test_serialize( - endpoint_http_server_test_request=endpoint_http_server_test_request, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "EndpointHttpServerTest", - '400': "ValidationError", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "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.endpoint_tests.models, - ) - - - @validate_call - def post_endpoint_httpserver_test_without_preload_content( - self, - endpoint_http_server_test_request: EndpointHttpServerTestRequest, - 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: - """Create HTTP server endpoint scheduled test - - Creates a new HTTP server endpoint test in ThousandEyes, using properties specified in the POST data. Please note that only users with Account Admin privileges have the authorization to create new tests; regular users are restricted from using POST-based methods. - - :param endpoint_http_server_test_request: (required) - :type endpoint_http_server_test_request: EndpointHttpServerTestRequest - :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._post_endpoint_httpserver_test_serialize( - endpoint_http_server_test_request=endpoint_http_server_test_request, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "EndpointHttpServerTest", - '400': "ValidationError", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _post_endpoint_httpserver_test_serialize( - self, - endpoint_http_server_test_request, - 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 - if endpoint_http_server_test_request is not None: - _body_params = endpoint_http_server_test_request - - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/hal+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] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/v7/endpoint/tests/scheduled-tests/http-server', - 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 update_endpoint_http_server_detail( + def update_http_server_endpoint_scheduled_test( self, test_id: Annotated[StrictStr, Field(description="Unique ID of endpoint test.")], endpoint_http_test_update: EndpointHttpTestUpdate, @@ -1279,7 +1285,7 @@ class ScheduledTestsHTTPServerApi: :return: Returns the result object. """ # noqa: E501 - _param = self._update_endpoint_http_server_detail_serialize( + _param = self._update_http_server_endpoint_scheduled_test_serialize( test_id=test_id, endpoint_http_test_update=endpoint_http_test_update, aid=aid, @@ -1312,7 +1318,7 @@ class ScheduledTestsHTTPServerApi: @validate_call - def update_endpoint_http_server_detail_with_http_info( + def update_http_server_endpoint_scheduled_test_with_http_info( self, test_id: Annotated[StrictStr, Field(description="Unique ID of endpoint test.")], endpoint_http_test_update: EndpointHttpTestUpdate, @@ -1362,7 +1368,7 @@ class ScheduledTestsHTTPServerApi: :return: Returns the result object. """ # noqa: E501 - _param = self._update_endpoint_http_server_detail_serialize( + _param = self._update_http_server_endpoint_scheduled_test_serialize( test_id=test_id, endpoint_http_test_update=endpoint_http_test_update, aid=aid, @@ -1395,7 +1401,7 @@ class ScheduledTestsHTTPServerApi: @validate_call - def update_endpoint_http_server_detail_without_preload_content( + def update_http_server_endpoint_scheduled_test_without_preload_content( self, test_id: Annotated[StrictStr, Field(description="Unique ID of endpoint test.")], endpoint_http_test_update: EndpointHttpTestUpdate, @@ -1445,7 +1451,7 @@ class ScheduledTestsHTTPServerApi: :return: Returns the result object. """ # noqa: E501 - _param = self._update_endpoint_http_server_detail_serialize( + _param = self._update_http_server_endpoint_scheduled_test_serialize( test_id=test_id, endpoint_http_test_update=endpoint_http_test_update, aid=aid, @@ -1472,7 +1478,7 @@ class ScheduledTestsHTTPServerApi: return response_data.response - def _update_endpoint_http_server_detail_serialize( + def _update_http_server_endpoint_scheduled_test_serialize( self, test_id, endpoint_http_test_update, @@ -1514,6 +1520,7 @@ class ScheduledTestsHTTPServerApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/__init__.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/__init__.py index c2e926d1..c88dfae6 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/__init__.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/__init__.py @@ -6,7 +6,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/alert_direction.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/alert_direction.py index ba0d68d3..0011e530 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/alert_direction.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/alert_direction.py @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/alert_rounds_violation_mode.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/alert_rounds_violation_mode.py index 5e00e906..e8f6ff4a 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/alert_rounds_violation_mode.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/alert_rounds_violation_mode.py @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/alert_rule.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/alert_rule.py index 66c106ab..45e61158 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/alert_rule.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/alert_rule.py @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -48,6 +48,7 @@ class AlertRule(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -58,7 +59,7 @@ class AlertRule(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/alert_type.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/alert_type.py index 8f90209e..0c7c6444 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/alert_type.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/alert_type.py @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/dynamic_test.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/dynamic_test.py index e1b8a333..c13bd2c5 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/dynamic_test.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/dynamic_test.py @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -56,6 +56,7 @@ class DynamicTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -66,7 +67,7 @@ class DynamicTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/dynamic_test_links.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/dynamic_test_links.py index 02cdf257..fba84fa4 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/dynamic_test_links.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/dynamic_test_links.py @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class DynamicTestLinks(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class DynamicTestLinks(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/dynamic_test_request.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/dynamic_test_request.py index 4ea1e1c8..8ba5c341 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/dynamic_test_request.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/dynamic_test_request.py @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -62,6 +62,7 @@ class DynamicTestRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -72,7 +73,7 @@ class DynamicTestRequest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/dynamic_test_self_link.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/dynamic_test_self_link.py index 24f3c3e6..a35a4df1 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/dynamic_test_self_link.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/dynamic_test_self_link.py @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -40,6 +40,7 @@ class DynamicTestSelfLink(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -50,7 +51,7 @@ class DynamicTestSelfLink(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/dynamic_tests.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/dynamic_tests.py index 654be951..81adc8a8 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/dynamic_tests.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/dynamic_tests.py @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class DynamicTests(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class DynamicTests(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_agent_labels_selector_config.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_agent_labels_selector_config.py index d6bdbbd5..9b46960f 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_agent_labels_selector_config.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_agent_labels_selector_config.py @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -43,6 +43,7 @@ class EndpointAgentLabelsSelectorConfig(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -53,7 +54,7 @@ class EndpointAgentLabelsSelectorConfig(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_agent_selector_config.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_agent_selector_config.py index 8b97884d..e0d75ba6 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_agent_selector_config.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_agent_selector_config.py @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -20,7 +20,7 @@ from typing import Any, List, Optional from thousandeyes_sdk.endpoint_tests.models.endpoint_agent_labels_selector_config import EndpointAgentLabelsSelectorConfig from thousandeyes_sdk.endpoint_tests.models.endpoint_all_agents_selector_config import EndpointAllAgentsSelectorConfig from thousandeyes_sdk.endpoint_tests.models.endpoint_specific_agents_selector_config import EndpointSpecificAgentsSelectorConfig -from pydantic import StrictStr, Field +from pydantic import StrictStr, Field, model_serializer from typing import Union, List, Set, Optional, Dict from typing_extensions import Literal, Self @@ -126,6 +126,10 @@ class EndpointAgentSelectorConfig(BaseModel): 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: diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_agent_to_server_instant_test.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_agent_to_server_instant_test.py index 053ba5de..41b626de 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_agent_to_server_instant_test.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_agent_to_server_instant_test.py @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -43,6 +43,7 @@ class EndpointAgentToServerInstantTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -53,7 +54,7 @@ class EndpointAgentToServerInstantTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_agent_to_server_test.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_agent_to_server_test.py index bd9b8aa7..37196851 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_agent_to_server_test.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_agent_to_server_test.py @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -67,6 +67,7 @@ class EndpointAgentToServerTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -77,7 +78,7 @@ class EndpointAgentToServerTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_agent_to_server_test_request.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_agent_to_server_test_request.py index 7b0e3d49..76c26630 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_agent_to_server_test_request.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_agent_to_server_test_request.py @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -45,6 +45,7 @@ class EndpointAgentToServerTestRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -55,7 +56,7 @@ class EndpointAgentToServerTestRequest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_agent_to_server_tests.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_agent_to_server_tests.py index facad1ab..57c2f43b 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_agent_to_server_tests.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_agent_to_server_tests.py @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class EndpointAgentToServerTests(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class EndpointAgentToServerTests(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_all_agents_selector_config.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_all_agents_selector_config.py index a7f32ae4..cd822412 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_all_agents_selector_config.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_all_agents_selector_config.py @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -42,6 +42,7 @@ class EndpointAllAgentsSelectorConfig(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -52,7 +53,7 @@ class EndpointAllAgentsSelectorConfig(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_dynamic_test_update.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_dynamic_test_update.py index 0fc0de45..c38ddd86 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_dynamic_test_update.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_dynamic_test_update.py @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -41,6 +41,7 @@ class EndpointDynamicTestUpdate(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -51,7 +52,7 @@ class EndpointDynamicTestUpdate(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_http_server_base_test.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_http_server_base_test.py index 0b99dcf2..719fc1b9 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_http_server_base_test.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_http_server_base_test.py @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -45,6 +45,7 @@ class EndpointHttpServerBaseTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -55,7 +56,7 @@ class EndpointHttpServerBaseTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_http_server_instant_test.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_http_server_instant_test.py index 775722d9..4284e600 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_http_server_instant_test.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_http_server_instant_test.py @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -57,6 +57,7 @@ class EndpointHttpServerInstantTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -67,7 +68,7 @@ class EndpointHttpServerInstantTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_http_server_test.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_http_server_test.py index fa52b160..3a364e3f 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_http_server_test.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_http_server_test.py @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -62,7 +62,7 @@ class EndpointHttpServerTest(BaseModel): ssl_version_id: Optional[TestSslVersionId] = Field(default=None, alias="sslVersionId") verify_certificate: Optional[StrictBool] = Field(default=None, description="Flag indicating if a certificate should be verified.", alias="verifyCertificate") content_regex: Optional[StrictStr] = Field(default=None, description="Content regex, this field does not require escaping.", alias="contentRegex") - follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to false.", alias="followRedirects") + follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`.", alias="followRedirects") http_target_time: Optional[Annotated[int, Field(le=5000, strict=True, ge=100)]] = Field(default=None, description="Target time for HTTP server completion, specified in milliseconds.", alias="httpTargetTime") http_version: Optional[Annotated[int, Field(le=2, strict=True, ge=1)]] = Field(default=2, description="HTTP protocol version. Set to '2' to prefer HTTP/2, or '1' to use only HTTP/1.1.", alias="httpVersion") post_body: Optional[StrictStr] = Field(default=None, description="Enter the body for the HTTP POST request in this field. No special escaping is necessary. If the post body is provided with content, the `requestMethod` is automatically set to POST.", alias="postBody") @@ -83,6 +83,7 @@ class EndpointHttpServerTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -93,7 +94,7 @@ class EndpointHttpServerTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_http_server_test_request.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_http_server_test_request.py index 379261ff..9381fb6b 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_http_server_test_request.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_http_server_test_request.py @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -59,6 +59,7 @@ class EndpointHttpServerTestRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -69,7 +70,7 @@ class EndpointHttpServerTestRequest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_http_server_tests.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_http_server_tests.py index 8ee20014..30031da9 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_http_server_tests.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_http_server_tests.py @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class EndpointHttpServerTests(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class EndpointHttpServerTests(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_http_test_update.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_http_test_update.py index 4231d02b..1f24d9b2 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_http_test_update.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_http_test_update.py @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -41,6 +41,7 @@ class EndpointHttpTestUpdate(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -51,7 +52,7 @@ class EndpointHttpTestUpdate(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_instant_test.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_instant_test.py index f97666dc..9ed060ce 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_instant_test.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_instant_test.py @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -42,6 +42,7 @@ class EndpointInstantTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -52,7 +53,7 @@ class EndpointInstantTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_network_test_update.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_network_test_update.py index 1b410eab..1fe34f2f 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_network_test_update.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_network_test_update.py @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -43,6 +43,7 @@ class EndpointNetworkTestUpdate(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -53,7 +54,7 @@ class EndpointNetworkTestUpdate(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_scheduled_test_type.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_scheduled_test_type.py index 34a9eed5..cb9c7d2c 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_scheduled_test_type.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_scheduled_test_type.py @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_specific_agents_selector_config.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_specific_agents_selector_config.py index e8783ec4..44de3dc4 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_specific_agents_selector_config.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_specific_agents_selector_config.py @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -43,6 +43,7 @@ class EndpointSpecificAgentsSelectorConfig(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -53,7 +54,7 @@ class EndpointSpecificAgentsSelectorConfig(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_test.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_test.py index 757d08bd..f3806f8c 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_test.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_test.py @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -58,6 +58,7 @@ class EndpointTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -68,7 +69,7 @@ class EndpointTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_test_agent_selector_type.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_test_agent_selector_type.py index 57962fc2..dc23b78f 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_test_agent_selector_type.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_test_agent_selector_type.py @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_test_auth_type.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_test_auth_type.py index 48d70eaf..c1bd7f84 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_test_auth_type.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_test_auth_type.py @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_test_links.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_test_links.py index 83841c20..f89f7871 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_test_links.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_test_links.py @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class EndpointTestLinks(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class EndpointTestLinks(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_test_protocol.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_test_protocol.py index c2e284b9..6471c709 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_test_protocol.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_test_protocol.py @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_test_self_link.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_test_self_link.py index 3a4ac301..45720b29 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_test_self_link.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_test_self_link.py @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -40,6 +40,7 @@ class EndpointTestSelfLink(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -50,7 +51,7 @@ class EndpointTestSelfLink(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_tests.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_tests.py index b0a9b40f..6f236501 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_tests.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/endpoint_tests.py @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class EndpointTests(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class EndpointTests(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/error.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/error.py index ec66eac2..8bf7748b 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/error.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/error.py @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -37,6 +37,7 @@ class Error(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -47,7 +48,7 @@ class Error(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/link.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/link.py index 4ecae2a9..bf7fc476 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/link.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/link.py @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -40,6 +40,7 @@ class Link(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -50,7 +51,7 @@ class Link(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/self_links.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/self_links.py index 913df3fe..478eadb5 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/self_links.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/self_links.py @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class SelfLinks(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class SelfLinks(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/severity.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/severity.py index 4d7d344b..14b1cab5 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/severity.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/severity.py @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/test_interval.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/test_interval.py index 7f953a71..6d2058ce 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/test_interval.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/test_interval.py @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/test_label.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/test_label.py index fe4e1a1e..aef9e94c 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/test_label.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/test_label.py @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class TestLabel(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class TestLabel(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/test_probe_mode.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/test_probe_mode.py index ecfb0acd..f1918228 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/test_probe_mode.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/test_probe_mode.py @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/test_probe_mode_response.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/test_probe_mode_response.py index 8db40253..e3596133 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/test_probe_mode_response.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/test_probe_mode_response.py @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/test_ssl_version_id.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/test_ssl_version_id.py index 67dc7475..472795da 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/test_ssl_version_id.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/test_ssl_version_id.py @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/test_update.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/test_update.py index ca4a45c1..31b84bf8 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/test_update.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/test_update.py @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -40,6 +40,7 @@ class TestUpdate(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -50,7 +51,7 @@ class TestUpdate(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/unauthorized_error.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/unauthorized_error.py index 858b6bb5..cefb10ad 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/unauthorized_error.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/unauthorized_error.py @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class UnauthorizedError(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class UnauthorizedError(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/validation_error.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/validation_error.py index 70ddc481..c8758915 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/validation_error.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/validation_error.py @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -39,6 +39,7 @@ class ValidationError(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -49,7 +50,7 @@ class ValidationError(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/validation_error_item.py b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/validation_error_item.py index 1bed46ac..6621c50f 100644 --- a/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/validation_error_item.py +++ b/thousandeyes-sdk-endpoint-tests/src/thousandeyes_sdk/endpoint_tests/models/validation_error_item.py @@ -5,7 +5,7 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,7 +17,7 @@ import pprint import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +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 @@ -27,7 +27,7 @@ class ValidationErrorItem(BaseModel): ValidationErrorItem """ # noqa: E501 code: Optional[StrictStr] = Field(default=None, description="(Optional) A unique error type/code that can be referenced in the documentation for further details.") - var_field: Optional[StrictInt] = Field(default=None, description="Identifies the field that triggered this particular error.", alias="field") + var_field: Optional[StrictStr] = Field(default=None, description="Identifies the field that triggered this particular error.", alias="field") message: Optional[StrictStr] = Field(default=None, description="A short, human-readable summary of the error.") __properties: ClassVar[List[str]] = ["code", "field", "message"] @@ -35,6 +35,7 @@ class ValidationErrorItem(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class ValidationErrorItem(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-endpoint-tests/test/test_dynamic_tests_agent_to_server_api.py b/thousandeyes-sdk-endpoint-tests/test/test_dynamic_tests_agent_to_server_api.py new file mode 100644 index 00000000..56a663a8 --- /dev/null +++ b/thousandeyes-sdk-endpoint-tests/test/test_dynamic_tests_agent_to_server_api.py @@ -0,0 +1,385 @@ +# coding: utf-8 + +""" + Endpoint Tests API + + Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.endpoint_tests.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.endpoint_tests.api.dynamic_tests_agent_to_server_api import DynamicTestsAgentToServerApi + + +class TestDynamicTestsAgentToServerApi(unittest.TestCase): + """DynamicTestsAgentToServerApi unit test stubs""" + + def setUp(self) -> None: + self.api = DynamicTestsAgentToServerApi() + + def tearDown(self) -> None: + pass + + def test_create_agent_to_server_endpoint_dynamic_test_models_validation(self) -> None: + """Test case for create_agent_to_server_endpoint_dynamic_test request and response models""" + request_body_json = """ + { + "hasPing" : true, + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/endpoint/test-results/dynamic-tests/281474976710706/network/filter" + }, { + "href" : "https://api.thousandeyes.com/v7/endpoint/test-results/dynamic-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" + } + }, + "agentSelectorType" : "all-agents", + "maxMachines" : 250, + "networkMeasurements" : true, + "tcpProbeMode" : "auto", + "endpointAgentLabels" : [ "567", "214" ], + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "agents" : [ "0a3b9998-dc3a-4ff2-b50d-ac4a7cd986e1", "66eec0f1-72b4-4755-aa83-3aed61d17f3c" ], + "protocol" : "icmp", + "createdDate" : "2022-07-17T22:00:54Z", + "application" : "webex", + "hasTraceroute" : true, + "isEnabled" : true, + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "aid" : "1234", + "agentSelectorConfig" : { + "agentSelectorType" : "all-agents", + "maxMachines" : 10 + }, + "hasPathTraceInSession" : true, + "testName" : "Test name" + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.endpoint_tests.models.DynamicTestRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "hasPing" : true, + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/endpoint/test-results/dynamic-tests/281474976710706/network/filter" + }, { + "href" : "https://api.thousandeyes.com/v7/endpoint/test-results/dynamic-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" + } + }, + "networkMeasurements" : true, + "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", + "application" : "webex", + "hasTraceroute" : true, + "isEnabled" : true, + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "aid" : "1234", + "agentSelectorConfig" : { + "agentSelectorType" : "all-agents", + "maxMachines" : 10 + }, + "hasPathTraceInSession" : true, + "testName" : "Test name" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.endpoint_tests.models.DynamicTest.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_delete_agent_to_server_endpoint_dynamic_test_models_validation(self) -> None: + """Test case for delete_agent_to_server_endpoint_dynamic_test request and response models""" + + + def test_get_agent_to_server_endpoint_dynamic_test_models_validation(self) -> None: + """Test case for get_agent_to_server_endpoint_dynamic_test request and response models""" + + response_body_json = """ + { + "hasPing" : true, + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/endpoint/test-results/dynamic-tests/281474976710706/network/filter" + }, { + "href" : "https://api.thousandeyes.com/v7/endpoint/test-results/dynamic-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" + } + }, + "networkMeasurements" : true, + "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", + "application" : "webex", + "hasTraceroute" : true, + "isEnabled" : true, + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "aid" : "1234", + "agentSelectorConfig" : { + "agentSelectorType" : "all-agents", + "maxMachines" : 10 + }, + "hasPathTraceInSession" : true, + "testName" : "Test name" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.endpoint_tests.models.DynamicTest.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_agent_to_server_endpoint_dynamic_tests_models_validation(self) -> None: + """Test case for get_agent_to_server_endpoint_dynamic_tests request and response models""" + + response_body_json = """ + { + "tests" : [ { + "hasPing" : true, + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/endpoint/test-results/dynamic-tests/281474976710706/network/filter" + }, { + "href" : "https://api.thousandeyes.com/v7/endpoint/test-results/dynamic-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" + } + }, + "networkMeasurements" : true, + "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", + "application" : "webex", + "hasTraceroute" : true, + "isEnabled" : true, + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "aid" : "1234", + "agentSelectorConfig" : { + "agentSelectorType" : "all-agents", + "maxMachines" : 10 + }, + "hasPathTraceInSession" : true, + "testName" : "Test name" + }, { + "hasPing" : true, + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/endpoint/test-results/dynamic-tests/281474976710706/network/filter" + }, { + "href" : "https://api.thousandeyes.com/v7/endpoint/test-results/dynamic-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" + } + }, + "networkMeasurements" : true, + "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", + "application" : "webex", + "hasTraceroute" : true, + "isEnabled" : true, + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "aid" : "1234", + "agentSelectorConfig" : { + "agentSelectorType" : "all-agents", + "maxMachines" : 10 + }, + "hasPathTraceInSession" : true, + "testName" : "Test name" + } ], + "_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" + } + } + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.endpoint_tests.models.DynamicTests.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_update_agent_to_server_endpoint_dynamic_test_models_validation(self) -> None: + """Test case for update_agent_to_server_endpoint_dynamic_test request and response models""" + request_body_json = """ + { + "protocol" : "icmp", + "application" : "webex", + "isEnabled" : true, + "interval" : 120, + "tcpProbeMode" : "auto", + "testName" : "Test name" + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.endpoint_tests.models.EndpointDynamicTestUpdate.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "hasPing" : true, + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/endpoint/test-results/dynamic-tests/281474976710706/network/filter" + }, { + "href" : "https://api.thousandeyes.com/v7/endpoint/test-results/dynamic-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" + } + }, + "networkMeasurements" : true, + "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", + "application" : "webex", + "hasTraceroute" : true, + "isEnabled" : true, + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "aid" : "1234", + "agentSelectorConfig" : { + "agentSelectorType" : "all-agents", + "maxMachines" : 10 + }, + "hasPathTraceInSession" : true, + "testName" : "Test name" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.endpoint_tests.models.DynamicTest.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-endpoint-tests/test/test_list_endpoint_scheduled_tests_api.py b/thousandeyes-sdk-endpoint-tests/test/test_list_endpoint_scheduled_tests_api.py new file mode 100644 index 00000000..31dd2263 --- /dev/null +++ b/thousandeyes-sdk-endpoint-tests/test/test_list_endpoint_scheduled_tests_api.py @@ -0,0 +1,186 @@ +# coding: utf-8 + +""" + Endpoint Tests API + + Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.endpoint_tests.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.endpoint_tests.api.list_endpoint_scheduled_tests_api import ListEndpointScheduledTestsApi + + +class TestListEndpointScheduledTestsApi(unittest.TestCase): + """ListEndpointScheduledTestsApi unit test stubs""" + + def setUp(self) -> None: + self.api = ListEndpointScheduledTestsApi() + + def tearDown(self) -> None: + pass + + def test_get_endpoint_scheduled_tests_models_validation(self) -> None: + """Test case for get_endpoint_scheduled_tests request and response models""" + + response_body_json = """ + { + "tests" : [ { + "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" + } + }, + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "networkMeasurements" : true, + "type" : "agent-to-server", + "tcpProbeMode" : "auto", + "protocol" : "icmp", + "createdDate" : "2022-07-17T22:00:54Z", + "port" : 80, + "isEnabled" : true, + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "aid" : "1234", + "agentSelectorConfig" : { + "agentSelectorType" : "all-agents", + "maxMachines" : 10 + }, + "hasPathTraceInSession" : true, + "testName" : "Test name" + }, { + "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" + } + }, + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "networkMeasurements" : true, + "type" : "agent-to-server", + "tcpProbeMode" : "auto", + "protocol" : "icmp", + "createdDate" : "2022-07-17T22:00:54Z", + "port" : 80, + "isEnabled" : true, + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "aid" : "1234", + "agentSelectorConfig" : { + "agentSelectorType" : "all-agents", + "maxMachines" : 10 + }, + "hasPathTraceInSession" : true, + "testName" : "Test name" + } ], + "_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" + } + } + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.endpoint_tests.models.EndpointTests.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-endpoint-tests/test/test_scheduled_tests_agent_to_server_api.py b/thousandeyes-sdk-endpoint-tests/test/test_scheduled_tests_agent_to_server_api.py new file mode 100644 index 00000000..ccf4ce9a --- /dev/null +++ b/thousandeyes-sdk-endpoint-tests/test/test_scheduled_tests_agent_to_server_api.py @@ -0,0 +1,488 @@ +# coding: utf-8 + +""" + Endpoint Tests API + + Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.endpoint_tests.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.endpoint_tests.api.scheduled_tests_agent_to_server_api import ScheduledTestsAgentToServerApi + + +class TestScheduledTestsAgentToServerApi(unittest.TestCase): + """ScheduledTestsAgentToServerApi unit test stubs""" + + def setUp(self) -> None: + self.api = ScheduledTestsAgentToServerApi() + + def tearDown(self) -> None: + pass + + def test_create_agent_to_server_endpoint_scheduled_test_models_validation(self) -> None: + """Test case for create_agent_to_server_endpoint_scheduled_test request and response models""" + request_body_json = """ + { + "hasPing" : true, + "port" : 80, + "agentSelectorType" : "all-agents", + "hasTraceroute" : true, + "maxMachines" : 10, + "serverName" : "www.example.com", + "interval" : 120, + "endpointAgentLabels" : [ "567", "214" ], + "agents" : [ "0a3b9998-dc3a-4ff2-b50d-ac4a7cd986e1", "66eec0f1-72b4-4755-aa83-3aed61d17f3c" ], + "testName" : "Test name" + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.endpoint_tests.models.EndpointAgentToServerTestRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "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" + } + }, + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "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", + "port" : 80, + "isEnabled" : true, + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "aid" : "1234", + "agentSelectorConfig" : { + "agentSelectorType" : "all-agents", + "maxMachines" : 10 + }, + "hasPathTraceInSession" : true, + "testName" : "Test name" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.endpoint_tests.models.EndpointAgentToServerTest.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_delete_agent_to_server_endpoint_scheduled_test_models_validation(self) -> None: + """Test case for delete_agent_to_server_endpoint_scheduled_test request and response models""" + + + def test_get_agent_to_server_endpoint_scheduled_test_models_validation(self) -> None: + """Test case for get_agent_to_server_endpoint_scheduled_test request and response models""" + + response_body_json = """ + { + "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" + } + }, + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "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", + "port" : 80, + "isEnabled" : true, + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "aid" : "1234", + "agentSelectorConfig" : { + "agentSelectorType" : "all-agents", + "maxMachines" : 10 + }, + "hasPathTraceInSession" : true, + "testName" : "Test name" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.endpoint_tests.models.EndpointAgentToServerTest.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_agent_to_server_endpoint_scheduled_tests_models_validation(self) -> None: + """Test case for get_agent_to_server_endpoint_scheduled_tests request and response models""" + + response_body_json = """ + { + "tests" : [ { + "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" + } + }, + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "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", + "port" : 80, + "isEnabled" : true, + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "aid" : "1234", + "agentSelectorConfig" : { + "agentSelectorType" : "all-agents", + "maxMachines" : 10 + }, + "hasPathTraceInSession" : true, + "testName" : "Test name" + }, { + "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" + } + }, + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "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", + "port" : 80, + "isEnabled" : true, + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "aid" : "1234", + "agentSelectorConfig" : { + "agentSelectorType" : "all-agents", + "maxMachines" : 10 + }, + "hasPathTraceInSession" : true, + "testName" : "Test name" + } ], + "_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" + } + } + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.endpoint_tests.models.EndpointAgentToServerTests.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_update_agent_to_server_endpoint_scheduled_test_models_validation(self) -> None: + """Test case for update_agent_to_server_endpoint_scheduled_test request and response models""" + request_body_json = """ + { + "server" : "www.example.com", + "protocol" : "icmp", + "port" : 49153, + "isEnabled" : true, + "interval" : 120, + "tcpProbeMode" : "auto", + "testName" : "Test name" + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.endpoint_tests.models.EndpointNetworkTestUpdate.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "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" + } + }, + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "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", + "port" : 80, + "isEnabled" : true, + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "aid" : "1234", + "agentSelectorConfig" : { + "agentSelectorType" : "all-agents", + "maxMachines" : 10 + }, + "hasPathTraceInSession" : true, + "testName" : "Test name" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.endpoint_tests.models.EndpointAgentToServerTest.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-endpoint-tests/test/test_scheduled_tests_http_server_api.py b/thousandeyes-sdk-endpoint-tests/test/test_scheduled_tests_http_server_api.py new file mode 100644 index 00000000..ca25562b --- /dev/null +++ b/thousandeyes-sdk-endpoint-tests/test/test_scheduled_tests_http_server_api.py @@ -0,0 +1,567 @@ +# coding: utf-8 + +""" + Endpoint Tests API + + Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.endpoint_tests.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.endpoint_tests.api.scheduled_tests_http_server_api import ScheduledTestsHTTPServerApi + + +class TestScheduledTestsHTTPServerApi(unittest.TestCase): + """ScheduledTestsHTTPServerApi unit test stubs""" + + def setUp(self) -> None: + self.api = ScheduledTestsHTTPServerApi() + + def tearDown(self) -> None: + pass + + def test_create_http_server_endpoint_scheduled_test_models_validation(self) -> None: + """Test case for create_http_server_endpoint_scheduled_test request and response models""" + request_body_json = """ + { + "hasPing" : true, + "verifyCertificate" : false, + "agentSelectorType" : "all-agents", + "maxMachines" : 10, + "httpTimeLimit" : 5000, + "endpointAgentLabels" : [ "567", "214" ], + "url" : "www.example.com", + "tcpProbeMode" : "auto", + "agents" : [ "0a3b9998-dc3a-4ff2-b50d-ac4a7cd986e1", "66eec0f1-72b4-4755-aa83-3aed61d17f3c" ], + "protocol" : "icmp", + "password" : "password", + "port" : 80, + "hasTraceroute" : true, + "targetResponseTime" : 1000, + "interval" : 120, + "authType" : "none", + "hasPathTraceInSession" : true, + "testName" : "Test name", + "username" : "username", + "sslVersionId" : "0" + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.endpoint_tests.models.EndpointHttpServerTestRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "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" + } + }, + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "httpTimeLimit" : 5000, + "type" : "http-server", + "protocol" : "icmp", + "httpVersion" : 2, + "followRedirects" : true, + "contentRegex" : "(regex)+", + "authType" : "none", + "testName" : "Test name", + "verifyCertificate" : false, + "userAgent" : "curl", + "networkMeasurements" : true, + "tcpProbeMode" : "auto", + "url" : "www.example.com", + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "postBody" : "body", + "port" : 80, + "isEnabled" : true, + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "aid" : "1234", + "agentSelectorConfig" : { + "agentSelectorType" : "all-agents", + "maxMachines" : 10 + }, + "hasPathTraceInSession" : true, + "httpTargetTime" : 100, + "username" : "username", + "sslVersionId" : "0" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.endpoint_tests.models.EndpointHttpServerTest.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_delete_http_server_endpoint_scheduled_test_models_validation(self) -> None: + """Test case for delete_http_server_endpoint_scheduled_test request and response models""" + + + def test_get_http_server_endpoint_scheduled_test_models_validation(self) -> None: + """Test case for get_http_server_endpoint_scheduled_test request and response models""" + + response_body_json = """ + { + "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" + } + }, + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "httpTimeLimit" : 5000, + "type" : "http-server", + "protocol" : "icmp", + "httpVersion" : 2, + "followRedirects" : true, + "contentRegex" : "(regex)+", + "authType" : "none", + "testName" : "Test name", + "verifyCertificate" : false, + "userAgent" : "curl", + "networkMeasurements" : true, + "tcpProbeMode" : "auto", + "url" : "www.example.com", + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "postBody" : "body", + "port" : 80, + "isEnabled" : true, + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "aid" : "1234", + "agentSelectorConfig" : { + "agentSelectorType" : "all-agents", + "maxMachines" : 10 + }, + "hasPathTraceInSession" : true, + "httpTargetTime" : 100, + "username" : "username", + "sslVersionId" : "0" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.endpoint_tests.models.EndpointHttpServerTest.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_http_server_endpoint_scheduled_tests_models_validation(self) -> None: + """Test case for get_http_server_endpoint_scheduled_tests request and response models""" + + response_body_json = """ + { + "tests" : [ { + "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" + } + }, + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "httpTimeLimit" : 5000, + "type" : "http-server", + "protocol" : "icmp", + "httpVersion" : 2, + "followRedirects" : true, + "contentRegex" : "(regex)+", + "authType" : "none", + "testName" : "Test name", + "verifyCertificate" : false, + "userAgent" : "curl", + "networkMeasurements" : true, + "tcpProbeMode" : "auto", + "url" : "www.example.com", + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "postBody" : "body", + "port" : 80, + "isEnabled" : true, + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "aid" : "1234", + "agentSelectorConfig" : { + "agentSelectorType" : "all-agents", + "maxMachines" : 10 + }, + "hasPathTraceInSession" : true, + "httpTargetTime" : 100, + "username" : "username", + "sslVersionId" : "0" + }, { + "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" + } + }, + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "httpTimeLimit" : 5000, + "type" : "http-server", + "protocol" : "icmp", + "httpVersion" : 2, + "followRedirects" : true, + "contentRegex" : "(regex)+", + "authType" : "none", + "testName" : "Test name", + "verifyCertificate" : false, + "userAgent" : "curl", + "networkMeasurements" : true, + "tcpProbeMode" : "auto", + "url" : "www.example.com", + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "postBody" : "body", + "port" : 80, + "isEnabled" : true, + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "aid" : "1234", + "agentSelectorConfig" : { + "agentSelectorType" : "all-agents", + "maxMachines" : 10 + }, + "hasPathTraceInSession" : true, + "httpTargetTime" : 100, + "username" : "username", + "sslVersionId" : "0" + } ], + "_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" + } + } + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.endpoint_tests.models.EndpointHttpServerTests.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_update_http_server_endpoint_scheduled_test_models_validation(self) -> None: + """Test case for update_http_server_endpoint_scheduled_test request and response models""" + request_body_json = """ + { + "protocol" : "icmp", + "isEnabled" : true, + "interval" : 120, + "tcpProbeMode" : "auto", + "url" : "www.thousandeyes.com", + "testName" : "Test name" + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.endpoint_tests.models.EndpointHttpTestUpdate.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "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" + } + }, + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "httpTimeLimit" : 5000, + "type" : "http-server", + "protocol" : "icmp", + "httpVersion" : 2, + "followRedirects" : true, + "contentRegex" : "(regex)+", + "authType" : "none", + "testName" : "Test name", + "verifyCertificate" : false, + "userAgent" : "curl", + "networkMeasurements" : true, + "tcpProbeMode" : "auto", + "url" : "www.example.com", + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "postBody" : "body", + "port" : 80, + "isEnabled" : true, + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "aid" : "1234", + "agentSelectorConfig" : { + "agentSelectorType" : "all-agents", + "maxMachines" : 10 + }, + "hasPathTraceInSession" : true, + "httpTargetTime" : 100, + "username" : "username", + "sslVersionId" : "0" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.endpoint_tests.models.EndpointHttpServerTest.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-endpoint-tests/test/test_utils.py b/thousandeyes-sdk-endpoint-tests/test/test_utils.py new file mode 100644 index 00000000..930528d9 --- /dev/null +++ b/thousandeyes-sdk-endpoint-tests/test/test_utils.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +import json +import unittest + +from pydantic import BaseModel + + +def assert_constructed_model_matches_example_json(model: BaseModel, loaded_json: dict): + test_case = unittest.TestCase() + test_case.maxDiff = None + test_case.assertIsNotNone(model) + constructed_json = json.loads(model.to_json()) + sorted_loaded_json = json.dumps(loaded_json, sort_keys=True) + sorted_constructed_json = json.dumps(constructed_json, sort_keys=True) + test_case.assertEqual(sorted_loaded_json, sorted_constructed_json) diff --git a/thousandeyes-sdk-instant-tests/.openapi-generator/FILES b/thousandeyes-sdk-instant-tests/.openapi-generator/FILES index d2ac1bd6..3ad5ff25 100644 --- a/thousandeyes-sdk-instant-tests/.openapi-generator/FILES +++ b/thousandeyes-sdk-instant-tests/.openapi-generator/FILES @@ -201,87 +201,17 @@ src/thousandeyes_sdk/instant_tests/models/web_transaction_instant_test_request.p src/thousandeyes_sdk/instant_tests/models/web_transaction_properties.py src/thousandeyes_sdk/instant_tests/py.typed test/__init__.py -test/test_agent.py -test/test_agent_base.py -test/test_agent_to_agent_instant_test.py -test/test_agent_to_agent_instant_test_request.py -test/test_agent_to_agent_properties.py -test/test_agent_to_agent_test_protocol.py -test/test_agent_to_server_instant_test.py -test/test_agent_to_server_instant_test_request.py -test/test_agent_to_server_properties.py -test/test_api_instant_test.py -test/test_api_instant_test_request.py -test/test_api_predefined_variable.py -test/test_api_properties.py -test/test_api_request.py -test/test_api_request_assertion.py -test/test_api_request_assertion_name.py -test/test_api_request_assertion_operator.py -test/test_api_request_auth_type.py -test/test_api_request_header.py -test/test_api_request_method.py -test/test_api_request_variable.py -test/test_cloud_enterprise_agent_type.py -test/test_dns_query_class.py -test/test_dns_sec_instant_test.py -test/test_dns_sec_instant_test_request.py -test/test_dns_sec_properties.py -test/test_dns_server_instant_test.py -test/test_dns_server_instant_test_request.py -test/test_dns_server_properties.py -test/test_dns_servers_request.py -test/test_dns_trace_instant_test.py -test/test_dns_trace_instant_test_request.py -test/test_dns_trace_properties.py -test/test_error.py -test/test_expand.py -test/test_ftp_server_instant_test.py -test/test_ftp_server_properties.py -test/test_ftp_server_request_type.py -test/test_http_server_instant_test.py -test/test_http_server_instant_test_request.py -test/test_http_server_properties.py -test/test_instant_test.py -test/test_instant_test_request.py -test/test_link.py -test/test_page_load_instant_test.py -test/test_page_load_instant_test_request.py -test/test_page_load_properties.py -test/test_server_instant_test_request.py -test/test_shared_with_account.py -test/test_simple_agent.py -test/test_sip_server_instant_test.py -test/test_sip_server_instant_test_request.py -test/test_sip_server_instant_test_request1.py -test/test_sip_server_instant_test_response.py -test/test_sip_server_properties.py -test/test_sip_test_protocol.py -test/test_test_agent.py -test/test_test_auth_type.py -test/test_test_custom_headers.py -test/test_test_direction.py -test/test_test_dns_server.py -test/test_test_dns_transport_protocol.py -test/test_test_dscp_id.py -test/test_test_ipv6_policy.py -test/test_test_label.py -test/test_test_links.py -test/test_test_page_loading_strategy.py -test/test_test_path_trace_mode.py -test/test_test_probe_mode.py -test/test_test_protocol.py -test/test_test_self_link.py -test/test_test_sip_credentials.py -test/test_test_ssl_version_id.py -test/test_test_type.py -test/test_unauthorized_error.py -test/test_unexpanded_instant_test.py -test/test_validation_error.py -test/test_validation_error_item.py -test/test_voice_instant_test.py -test/test_voice_instant_test_request.py -test/test_voice_properties.py -test/test_web_transaction_instant_test.py -test/test_web_transaction_instant_test_request.py -test/test_web_transaction_properties.py +test/test_agent_to_agent_api.py +test/test_agent_to_server_api.py +test/test_api_api.py +test/test_dns_security_api.py +test/test_dns_server_api.py +test/test_dns_trace_api.py +test/test_ftp_server_api.py +test/test_http_page_load_api.py +test/test_http_server_api.py +test/test_run_api.py +test/test_sip_server_api.py +test/test_utils.py +test/test_voice_api.py +test/test_web_transaction_api.py diff --git a/thousandeyes-sdk-instant-tests/README.md b/thousandeyes-sdk-instant-tests/README.md index a21a0e7b..c8967442 100644 --- a/thousandeyes-sdk-instant-tests/README.md +++ b/thousandeyes-sdk-instant-tests/README.md @@ -8,8 +8,7 @@ The response does not include the immediate test results. Use the Test Results e This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.4 -- Package version: 1.0.0 +- API version: 7.0.6 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator @@ -23,9 +22,9 @@ Python 3.7+ If the python package is hosted on a repository, you can install directly using: ```sh -pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +pip install -e git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git#egg=thousandeyes-sdk-instant-tests\&subdirectory=thousandeyes-sdk-instant-tests ``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) +(you may need to run `pip` with root permission: `sudo pip install -e git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git#egg=thousandeyes-sdk-instant-tests\&subdirectory=thousandeyes-sdk-instant-tests`) Then import the package: ```python @@ -88,11 +87,11 @@ with thousandeyes_sdk.client.ApiClient(configuration) as api_client: try: # Create API instant test - api_response = api_instance.post_instant_api(api_instant_test_request, aid=aid, expand=expand) - print("The response of APIApi->post_instant_api:\n") + api_response = api_instance.create_api_instant_test(api_instant_test_request, aid=aid, expand=expand) + print("The response of APIApi->create_api_instant_test:\n") pprint(api_response) except ApiException as e: - print("Exception when calling APIApi->post_instant_api: %s\n" % e) + print("Exception when calling APIApi->create_api_instant_test: %s\n" % e) ``` @@ -102,19 +101,19 @@ All URIs are relative to *https://api.thousandeyes.com* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*APIApi* | [**post_instant_api**](docs/APIApi.md#post_instant_api) | **POST** /v7/tests/api/instant | Create API instant test -*AgentToAgentApi* | [**post_instant_test_agent_to_agent**](docs/AgentToAgentApi.md#post_instant_test_agent_to_agent) | **POST** /v7/tests/agent-to-agent/instant | Create agent-to-agent instant test -*AgentToServerApi* | [**post_instant_agent_to_server**](docs/AgentToServerApi.md#post_instant_agent_to_server) | **POST** /v7/tests/agent-to-server/instant | Create agent-to-server instant test -*DNSSecurityApi* | [**post_instant_dns_sec**](docs/DNSSecurityApi.md#post_instant_dns_sec) | **POST** /v7/tests/dnssec/instant | Create DNS security instant test -*DNSServerApi* | [**post_instant_dns_server**](docs/DNSServerApi.md#post_instant_dns_server) | **POST** /v7/tests/dns-server/instant | Create DNS server instant test -*DNSTraceApi* | [**post_instant_dns_trace**](docs/DNSTraceApi.md#post_instant_dns_trace) | **POST** /v7/tests/dns-trace/instant | Create DNS trace instant test -*FTPServerApi* | [**post_instant_ftp_server**](docs/FTPServerApi.md#post_instant_ftp_server) | **POST** /v7/tests/ftp-server/instant | Create FTP server instant test -*HTTPPageLoadApi* | [**post_instant_http_page_load**](docs/HTTPPageLoadApi.md#post_instant_http_page_load) | **POST** /v7/tests/page-load/instant | Create HTTP page load instant test -*HTTPServerApi* | [**post_instant_http_server**](docs/HTTPServerApi.md#post_instant_http_server) | **POST** /v7/tests/http-server/instant | Create HTTP server instant test -*RunApi* | [**post_instant_run**](docs/RunApi.md#post_instant_run) | **POST** /v7/tests/{testId}/run | Run instant test -*SIPServerApi* | [**post_instant_sip_server**](docs/SIPServerApi.md#post_instant_sip_server) | **POST** /v7/tests/sip-server/instant | Create SIP server instant test -*VoiceApi* | [**post_instant_voice**](docs/VoiceApi.md#post_instant_voice) | **POST** /v7/tests/voice/instant | Create voice instant test -*WebTransactionApi* | [**post_instant_web_transactions**](docs/WebTransactionApi.md#post_instant_web_transactions) | **POST** /v7/tests/web-transactions/instant | Create web transactions instant test +*APIApi* | [**create_api_instant_test**](docs/APIApi.md#create_api_instant_test) | **POST** /v7/tests/api/instant | Create API instant test +*AgentToAgentApi* | [**create_agent_to_agent_instant_test**](docs/AgentToAgentApi.md#create_agent_to_agent_instant_test) | **POST** /v7/tests/agent-to-agent/instant | Create agent-to-agent instant test +*AgentToServerApi* | [**create_agent_to_server_instant_test**](docs/AgentToServerApi.md#create_agent_to_server_instant_test) | **POST** /v7/tests/agent-to-server/instant | Create agent-to-server instant test +*DNSSecurityApi* | [**create_dns_sec_instant_test**](docs/DNSSecurityApi.md#create_dns_sec_instant_test) | **POST** /v7/tests/dnssec/instant | Create DNS security instant test +*DNSServerApi* | [**create_dns_server_instant_test**](docs/DNSServerApi.md#create_dns_server_instant_test) | **POST** /v7/tests/dns-server/instant | Create DNS server instant test +*DNSTraceApi* | [**create_dns_trace_instant_test**](docs/DNSTraceApi.md#create_dns_trace_instant_test) | **POST** /v7/tests/dns-trace/instant | Create DNS trace instant test +*FTPServerApi* | [**create_ftp_server_instant_test**](docs/FTPServerApi.md#create_ftp_server_instant_test) | **POST** /v7/tests/ftp-server/instant | Create FTP server instant test +*HTTPPageLoadApi* | [**create_page_load_instant_test**](docs/HTTPPageLoadApi.md#create_page_load_instant_test) | **POST** /v7/tests/page-load/instant | Create HTTP page load instant test +*HTTPServerApi* | [**create_http_server_instant_test**](docs/HTTPServerApi.md#create_http_server_instant_test) | **POST** /v7/tests/http-server/instant | Create HTTP server instant test +*RunApi* | [**run_instant_test**](docs/RunApi.md#run_instant_test) | **POST** /v7/tests/{testId}/run | Run instant test +*SIPServerApi* | [**create_sip_server_instant_test**](docs/SIPServerApi.md#create_sip_server_instant_test) | **POST** /v7/tests/sip-server/instant | Create SIP server instant test +*VoiceApi* | [**create_voice_instant_test**](docs/VoiceApi.md#create_voice_instant_test) | **POST** /v7/tests/voice/instant | Create voice instant test +*WebTransactionApi* | [**create_web_transaction_instant_test**](docs/WebTransactionApi.md#create_web_transaction_instant_test) | **POST** /v7/tests/web-transactions/instant | Create web transactions instant test ## Documentation For Models diff --git a/thousandeyes-sdk-instant-tests/docs/APIApi.md b/thousandeyes-sdk-instant-tests/docs/APIApi.md index d189c122..3079068c 100644 --- a/thousandeyes-sdk-instant-tests/docs/APIApi.md +++ b/thousandeyes-sdk-instant-tests/docs/APIApi.md @@ -4,11 +4,11 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**post_instant_api**](APIApi.md#post_instant_api) | **POST** /v7/tests/api/instant | Create API instant test +[**create_api_instant_test**](APIApi.md#create_api_instant_test) | **POST** /v7/tests/api/instant | Create API instant test -# **post_instant_api** -> ApiInstantTest post_instant_api(api_instant_test_request, aid=aid, expand=expand) +# **create_api_instant_test** +> ApiInstantTest create_api_instant_test(api_instant_test_request, aid=aid, expand=expand) Create API instant test @@ -52,11 +52,11 @@ with thousandeyes_sdk.instant_tests.ApiClient(configuration) as api_client: try: # Create API instant test - api_response = api_instance.post_instant_api(api_instant_test_request, aid=aid, expand=expand) - print("The response of APIApi->post_instant_api:\n") + api_response = api_instance.create_api_instant_test(api_instant_test_request, aid=aid, expand=expand) + print("The response of APIApi->create_api_instant_test:\n") pprint(api_response) except Exception as e: - print("Exception when calling APIApi->post_instant_api: %s\n" % e) + print("Exception when calling APIApi->create_api_instant_test: %s\n" % e) ``` @@ -81,7 +81,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-instant-tests/docs/AgentToAgentApi.md b/thousandeyes-sdk-instant-tests/docs/AgentToAgentApi.md index be7a45dd..4a4c103b 100644 --- a/thousandeyes-sdk-instant-tests/docs/AgentToAgentApi.md +++ b/thousandeyes-sdk-instant-tests/docs/AgentToAgentApi.md @@ -4,11 +4,11 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**post_instant_test_agent_to_agent**](AgentToAgentApi.md#post_instant_test_agent_to_agent) | **POST** /v7/tests/agent-to-agent/instant | Create agent-to-agent instant test +[**create_agent_to_agent_instant_test**](AgentToAgentApi.md#create_agent_to_agent_instant_test) | **POST** /v7/tests/agent-to-agent/instant | Create agent-to-agent instant test -# **post_instant_test_agent_to_agent** -> AgentToAgentInstantTest post_instant_test_agent_to_agent(agent_to_agent_instant_test_request, aid=aid, expand=expand) +# **create_agent_to_agent_instant_test** +> AgentToAgentInstantTest create_agent_to_agent_instant_test(agent_to_agent_instant_test_request, aid=aid, expand=expand) Create agent-to-agent instant test @@ -52,11 +52,11 @@ with thousandeyes_sdk.instant_tests.ApiClient(configuration) as api_client: try: # Create agent-to-agent instant test - api_response = api_instance.post_instant_test_agent_to_agent(agent_to_agent_instant_test_request, aid=aid, expand=expand) - print("The response of AgentToAgentApi->post_instant_test_agent_to_agent:\n") + api_response = api_instance.create_agent_to_agent_instant_test(agent_to_agent_instant_test_request, aid=aid, expand=expand) + print("The response of AgentToAgentApi->create_agent_to_agent_instant_test:\n") pprint(api_response) except Exception as e: - print("Exception when calling AgentToAgentApi->post_instant_test_agent_to_agent: %s\n" % e) + print("Exception when calling AgentToAgentApi->create_agent_to_agent_instant_test: %s\n" % e) ``` @@ -81,7 +81,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-instant-tests/docs/AgentToServerApi.md b/thousandeyes-sdk-instant-tests/docs/AgentToServerApi.md index 152151ea..68aa884b 100644 --- a/thousandeyes-sdk-instant-tests/docs/AgentToServerApi.md +++ b/thousandeyes-sdk-instant-tests/docs/AgentToServerApi.md @@ -4,11 +4,11 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**post_instant_agent_to_server**](AgentToServerApi.md#post_instant_agent_to_server) | **POST** /v7/tests/agent-to-server/instant | Create agent-to-server instant test +[**create_agent_to_server_instant_test**](AgentToServerApi.md#create_agent_to_server_instant_test) | **POST** /v7/tests/agent-to-server/instant | Create agent-to-server instant test -# **post_instant_agent_to_server** -> AgentToServerInstantTest post_instant_agent_to_server(agent_to_server_instant_test_request, aid=aid, expand=expand) +# **create_agent_to_server_instant_test** +> AgentToServerInstantTest create_agent_to_server_instant_test(agent_to_server_instant_test_request, aid=aid, expand=expand) Create agent-to-server instant test @@ -52,11 +52,11 @@ with thousandeyes_sdk.instant_tests.ApiClient(configuration) as api_client: try: # Create agent-to-server instant test - api_response = api_instance.post_instant_agent_to_server(agent_to_server_instant_test_request, aid=aid, expand=expand) - print("The response of AgentToServerApi->post_instant_agent_to_server:\n") + api_response = api_instance.create_agent_to_server_instant_test(agent_to_server_instant_test_request, aid=aid, expand=expand) + print("The response of AgentToServerApi->create_agent_to_server_instant_test:\n") pprint(api_response) except Exception as e: - print("Exception when calling AgentToServerApi->post_instant_agent_to_server: %s\n" % e) + print("Exception when calling AgentToServerApi->create_agent_to_server_instant_test: %s\n" % e) ``` @@ -81,7 +81,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-instant-tests/docs/ApiInstantTest.md b/thousandeyes-sdk-instant-tests/docs/ApiInstantTest.md index 166b0065..d5a6c2af 100644 --- a/thousandeyes-sdk-instant-tests/docs/ApiInstantTest.md +++ b/thousandeyes-sdk-instant-tests/docs/ApiInstantTest.md @@ -18,7 +18,7 @@ Name | Type | Description | Notes **links** | [**TestLinks**](TestLinks.md) | | [optional] **labels** | [**List[TestLabel]**](TestLabel.md) | | [optional] [readonly] **shared_with_accounts** | [**List[SharedWithAccount]**](SharedWithAccount.md) | | [optional] [readonly] -**follow_redirects** | **bool** | Indicates if HTTP/301 or HTTP/302 redirect directives should be followed. To disable following redirects, set this parameter to false. | [optional] [default to True] +**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`. | [optional] [default to True] **mtu_measurements** | **bool** | Set `true` to measure MTU sizes on network from agents to the target. | [optional] **network_measurements** | **bool** | Enable or disable network measurements. Set to true to enable or false to disable network measurements. | [optional] [default to True] **num_path_traces** | **int** | Number of path traces executed by the agent. | [optional] [default to 3] diff --git a/thousandeyes-sdk-instant-tests/docs/ApiInstantTestRequest.md b/thousandeyes-sdk-instant-tests/docs/ApiInstantTestRequest.md index 141f3f79..5aaecce5 100644 --- a/thousandeyes-sdk-instant-tests/docs/ApiInstantTestRequest.md +++ b/thousandeyes-sdk-instant-tests/docs/ApiInstantTestRequest.md @@ -18,7 +18,7 @@ Name | Type | Description | Notes **links** | [**TestLinks**](TestLinks.md) | | [optional] **labels** | **List[str]** | A list of test label identifiers (get `labelId` from `/labels` endpoint). | [optional] **shared_with_accounts** | **List[str]** | A list of account group identifiers that the test is shared with (get `aid` from `/account-groups` endpoint). | [optional] -**follow_redirects** | **bool** | Indicates if HTTP/301 or HTTP/302 redirect directives should be followed. To disable following redirects, set this parameter to false. | [optional] [default to True] +**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`. | [optional] [default to True] **mtu_measurements** | **bool** | Set `true` to measure MTU sizes on network from agents to the target. | [optional] **network_measurements** | **bool** | Enable or disable network measurements. Set to true to enable or false to disable network measurements. | [optional] [default to True] **num_path_traces** | **int** | Number of path traces executed by the agent. | [optional] [default to 3] diff --git a/thousandeyes-sdk-instant-tests/docs/ApiProperties.md b/thousandeyes-sdk-instant-tests/docs/ApiProperties.md index e44e363b..c45753c3 100644 --- a/thousandeyes-sdk-instant-tests/docs/ApiProperties.md +++ b/thousandeyes-sdk-instant-tests/docs/ApiProperties.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**follow_redirects** | **bool** | Indicates if HTTP/301 or HTTP/302 redirect directives should be followed. To disable following redirects, set this parameter to false. | [optional] [default to True] +**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`. | [optional] [default to True] **mtu_measurements** | **bool** | Set `true` to measure MTU sizes on network from agents to the target. | [optional] **network_measurements** | **bool** | Enable or disable network measurements. Set to true to enable or false to disable network measurements. | [optional] [default to True] **num_path_traces** | **int** | Number of path traces executed by the agent. | [optional] [default to 3] diff --git a/thousandeyes-sdk-instant-tests/docs/ApiRequest.md b/thousandeyes-sdk-instant-tests/docs/ApiRequest.md index ffc91093..771dde90 100644 --- a/thousandeyes-sdk-instant-tests/docs/ApiRequest.md +++ b/thousandeyes-sdk-instant-tests/docs/ApiRequest.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **auth_type** | [**ApiRequestAuthType**](ApiRequestAuthType.md) | | [optional] **bearer_token** | **str** | The bearer token if `authType = bearer-token`. | [optional] **body** | **str** | POST/PUT request body. Must be in JSON format. | [optional] -**collect_api_response** | **str** | Set to `true` if API response body should be collected and saved. Set to `false` if API response body should not be saved. | [optional] [default to 'true'] +**collect_api_response** | **bool** | Set to `true` if API response body should be collected and saved. Set to `false` if API response body should not be saved. | [optional] [default to True] **headers** | [**List[ApiRequestHeader]**](ApiRequestHeader.md) | Array of API Request Header objects. | [optional] **method** | [**ApiRequestMethod**](ApiRequestMethod.md) | | [optional] **name** | **str** | API step name, must be unique. | @@ -17,7 +17,7 @@ Name | Type | Description | Notes **url** | **str** | Request url. Supports variables in the format `{{variableName}}`. | **username** | **str** | The username if `authType = basic`. | [optional] **variables** | [**List[ApiRequestVariable]**](ApiRequestVariable.md) | Array of API post request variable objects. | [optional] -**wait_time_ms** | **float** | Post request delay before executing the next API requests, in milliseconds. | [optional] +**wait_time_ms** | **int** | Post request delay before executing the next API requests, in milliseconds. | [optional] ## Example diff --git a/thousandeyes-sdk-instant-tests/docs/DNSSecurityApi.md b/thousandeyes-sdk-instant-tests/docs/DNSSecurityApi.md index 2f53d58c..7e43c640 100644 --- a/thousandeyes-sdk-instant-tests/docs/DNSSecurityApi.md +++ b/thousandeyes-sdk-instant-tests/docs/DNSSecurityApi.md @@ -4,11 +4,11 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**post_instant_dns_sec**](DNSSecurityApi.md#post_instant_dns_sec) | **POST** /v7/tests/dnssec/instant | Create DNS security instant test +[**create_dns_sec_instant_test**](DNSSecurityApi.md#create_dns_sec_instant_test) | **POST** /v7/tests/dnssec/instant | Create DNS security instant test -# **post_instant_dns_sec** -> DnsSecInstantTest post_instant_dns_sec(dns_sec_instant_test_request, aid=aid, expand=expand) +# **create_dns_sec_instant_test** +> DnsSecInstantTest create_dns_sec_instant_test(dns_sec_instant_test_request, aid=aid, expand=expand) Create DNS security instant test @@ -52,11 +52,11 @@ with thousandeyes_sdk.instant_tests.ApiClient(configuration) as api_client: try: # Create DNS security instant test - api_response = api_instance.post_instant_dns_sec(dns_sec_instant_test_request, aid=aid, expand=expand) - print("The response of DNSSecurityApi->post_instant_dns_sec:\n") + api_response = api_instance.create_dns_sec_instant_test(dns_sec_instant_test_request, aid=aid, expand=expand) + print("The response of DNSSecurityApi->create_dns_sec_instant_test:\n") pprint(api_response) except Exception as e: - print("Exception when calling DNSSecurityApi->post_instant_dns_sec: %s\n" % e) + print("Exception when calling DNSSecurityApi->create_dns_sec_instant_test: %s\n" % e) ``` @@ -81,7 +81,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-instant-tests/docs/DNSServerApi.md b/thousandeyes-sdk-instant-tests/docs/DNSServerApi.md index 68bf3d9d..9f0f17ee 100644 --- a/thousandeyes-sdk-instant-tests/docs/DNSServerApi.md +++ b/thousandeyes-sdk-instant-tests/docs/DNSServerApi.md @@ -4,11 +4,11 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**post_instant_dns_server**](DNSServerApi.md#post_instant_dns_server) | **POST** /v7/tests/dns-server/instant | Create DNS server instant test +[**create_dns_server_instant_test**](DNSServerApi.md#create_dns_server_instant_test) | **POST** /v7/tests/dns-server/instant | Create DNS server instant test -# **post_instant_dns_server** -> DnsServerInstantTest post_instant_dns_server(dns_server_instant_test_request, aid=aid, expand=expand) +# **create_dns_server_instant_test** +> DnsServerInstantTest create_dns_server_instant_test(dns_server_instant_test_request, aid=aid, expand=expand) Create DNS server instant test @@ -52,11 +52,11 @@ with thousandeyes_sdk.instant_tests.ApiClient(configuration) as api_client: try: # Create DNS server instant test - api_response = api_instance.post_instant_dns_server(dns_server_instant_test_request, aid=aid, expand=expand) - print("The response of DNSServerApi->post_instant_dns_server:\n") + api_response = api_instance.create_dns_server_instant_test(dns_server_instant_test_request, aid=aid, expand=expand) + print("The response of DNSServerApi->create_dns_server_instant_test:\n") pprint(api_response) except Exception as e: - print("Exception when calling DNSServerApi->post_instant_dns_server: %s\n" % e) + print("Exception when calling DNSServerApi->create_dns_server_instant_test: %s\n" % e) ``` @@ -81,7 +81,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-instant-tests/docs/DNSTraceApi.md b/thousandeyes-sdk-instant-tests/docs/DNSTraceApi.md index 6c8c3ed1..4694d9a2 100644 --- a/thousandeyes-sdk-instant-tests/docs/DNSTraceApi.md +++ b/thousandeyes-sdk-instant-tests/docs/DNSTraceApi.md @@ -4,11 +4,11 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**post_instant_dns_trace**](DNSTraceApi.md#post_instant_dns_trace) | **POST** /v7/tests/dns-trace/instant | Create DNS trace instant test +[**create_dns_trace_instant_test**](DNSTraceApi.md#create_dns_trace_instant_test) | **POST** /v7/tests/dns-trace/instant | Create DNS trace instant test -# **post_instant_dns_trace** -> DnsTraceInstantTest post_instant_dns_trace(dns_trace_instant_test_request, aid=aid, expand=expand) +# **create_dns_trace_instant_test** +> DnsTraceInstantTest create_dns_trace_instant_test(dns_trace_instant_test_request, aid=aid, expand=expand) Create DNS trace instant test @@ -52,11 +52,11 @@ with thousandeyes_sdk.instant_tests.ApiClient(configuration) as api_client: try: # Create DNS trace instant test - api_response = api_instance.post_instant_dns_trace(dns_trace_instant_test_request, aid=aid, expand=expand) - print("The response of DNSTraceApi->post_instant_dns_trace:\n") + api_response = api_instance.create_dns_trace_instant_test(dns_trace_instant_test_request, aid=aid, expand=expand) + print("The response of DNSTraceApi->create_dns_trace_instant_test:\n") pprint(api_response) except Exception as e: - print("Exception when calling DNSTraceApi->post_instant_dns_trace: %s\n" % e) + print("Exception when calling DNSTraceApi->create_dns_trace_instant_test: %s\n" % e) ``` @@ -81,7 +81,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-instant-tests/docs/FTPServerApi.md b/thousandeyes-sdk-instant-tests/docs/FTPServerApi.md index f836bae5..746e343b 100644 --- a/thousandeyes-sdk-instant-tests/docs/FTPServerApi.md +++ b/thousandeyes-sdk-instant-tests/docs/FTPServerApi.md @@ -4,11 +4,11 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**post_instant_ftp_server**](FTPServerApi.md#post_instant_ftp_server) | **POST** /v7/tests/ftp-server/instant | Create FTP server instant test +[**create_ftp_server_instant_test**](FTPServerApi.md#create_ftp_server_instant_test) | **POST** /v7/tests/ftp-server/instant | Create FTP server instant test -# **post_instant_ftp_server** -> FtpServerInstantTest post_instant_ftp_server(server_instant_test_request, aid=aid, expand=expand) +# **create_ftp_server_instant_test** +> FtpServerInstantTest create_ftp_server_instant_test(server_instant_test_request, aid=aid, expand=expand) Create FTP server instant test @@ -52,11 +52,11 @@ with thousandeyes_sdk.instant_tests.ApiClient(configuration) as api_client: try: # Create FTP server instant test - api_response = api_instance.post_instant_ftp_server(server_instant_test_request, aid=aid, expand=expand) - print("The response of FTPServerApi->post_instant_ftp_server:\n") + api_response = api_instance.create_ftp_server_instant_test(server_instant_test_request, aid=aid, expand=expand) + print("The response of FTPServerApi->create_ftp_server_instant_test:\n") pprint(api_response) except Exception as e: - print("Exception when calling FTPServerApi->post_instant_ftp_server: %s\n" % e) + print("Exception when calling FTPServerApi->create_ftp_server_instant_test: %s\n" % e) ``` @@ -81,7 +81,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-instant-tests/docs/HTTPPageLoadApi.md b/thousandeyes-sdk-instant-tests/docs/HTTPPageLoadApi.md index d4f36c8f..5dfaa423 100644 --- a/thousandeyes-sdk-instant-tests/docs/HTTPPageLoadApi.md +++ b/thousandeyes-sdk-instant-tests/docs/HTTPPageLoadApi.md @@ -4,11 +4,11 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**post_instant_http_page_load**](HTTPPageLoadApi.md#post_instant_http_page_load) | **POST** /v7/tests/page-load/instant | Create HTTP page load instant test +[**create_page_load_instant_test**](HTTPPageLoadApi.md#create_page_load_instant_test) | **POST** /v7/tests/page-load/instant | Create HTTP page load instant test -# **post_instant_http_page_load** -> PageLoadInstantTest post_instant_http_page_load(page_load_instant_test_request, aid=aid, expand=expand) +# **create_page_load_instant_test** +> PageLoadInstantTest create_page_load_instant_test(page_load_instant_test_request, aid=aid, expand=expand) Create HTTP page load instant test @@ -52,11 +52,11 @@ with thousandeyes_sdk.instant_tests.ApiClient(configuration) as api_client: try: # Create HTTP page load instant test - api_response = api_instance.post_instant_http_page_load(page_load_instant_test_request, aid=aid, expand=expand) - print("The response of HTTPPageLoadApi->post_instant_http_page_load:\n") + api_response = api_instance.create_page_load_instant_test(page_load_instant_test_request, aid=aid, expand=expand) + print("The response of HTTPPageLoadApi->create_page_load_instant_test:\n") pprint(api_response) except Exception as e: - print("Exception when calling HTTPPageLoadApi->post_instant_http_page_load: %s\n" % e) + print("Exception when calling HTTPPageLoadApi->create_page_load_instant_test: %s\n" % e) ``` @@ -81,7 +81,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-instant-tests/docs/HTTPServerApi.md b/thousandeyes-sdk-instant-tests/docs/HTTPServerApi.md index 637f46f8..964318df 100644 --- a/thousandeyes-sdk-instant-tests/docs/HTTPServerApi.md +++ b/thousandeyes-sdk-instant-tests/docs/HTTPServerApi.md @@ -4,11 +4,11 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**post_instant_http_server**](HTTPServerApi.md#post_instant_http_server) | **POST** /v7/tests/http-server/instant | Create HTTP server instant test +[**create_http_server_instant_test**](HTTPServerApi.md#create_http_server_instant_test) | **POST** /v7/tests/http-server/instant | Create HTTP server instant test -# **post_instant_http_server** -> HttpServerInstantTest post_instant_http_server(http_server_instant_test_request, aid=aid, expand=expand) +# **create_http_server_instant_test** +> HttpServerInstantTest create_http_server_instant_test(http_server_instant_test_request, aid=aid, expand=expand) Create HTTP server instant test @@ -52,11 +52,11 @@ with thousandeyes_sdk.instant_tests.ApiClient(configuration) as api_client: try: # Create HTTP server instant test - api_response = api_instance.post_instant_http_server(http_server_instant_test_request, aid=aid, expand=expand) - print("The response of HTTPServerApi->post_instant_http_server:\n") + api_response = api_instance.create_http_server_instant_test(http_server_instant_test_request, aid=aid, expand=expand) + print("The response of HTTPServerApi->create_http_server_instant_test:\n") pprint(api_response) except Exception as e: - print("Exception when calling HTTPServerApi->post_instant_http_server: %s\n" % e) + print("Exception when calling HTTPServerApi->create_http_server_instant_test: %s\n" % e) ``` @@ -81,7 +81,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-instant-tests/docs/PageLoadInstantTest.md b/thousandeyes-sdk-instant-tests/docs/PageLoadInstantTest.md index fd46aafe..730d0911 100644 --- a/thousandeyes-sdk-instant-tests/docs/PageLoadInstantTest.md +++ b/thousandeyes-sdk-instant-tests/docs/PageLoadInstantTest.md @@ -25,7 +25,7 @@ Name | Type | Description | Notes **custom_headers** | [**TestCustomHeaders**](TestCustomHeaders.md) | | [optional] **desired_status_code** | **str** | Specify the HTTP status code value that indicates a successful response. | [optional] [default to '200'] **emulated_device_id** | **str** | id of the emulated device, if one was given when the test was created | [optional] -**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to false. | [optional] [default to True] +**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`. | [optional] [default to True] **http_target_time** | **int** | Target time for HTTP server completion, specified in milliseconds. | [optional] **http_time_limit** | **int** | HTTP time limit in seconds. | [optional] [default to 5] **http_version** | **int** | HTTP protocol version. Set to '2' to prefer HTTP/2, or '1' to use only HTTP/1.1. | [optional] [default to 2] diff --git a/thousandeyes-sdk-instant-tests/docs/PageLoadInstantTestRequest.md b/thousandeyes-sdk-instant-tests/docs/PageLoadInstantTestRequest.md index ba55d446..efad821f 100644 --- a/thousandeyes-sdk-instant-tests/docs/PageLoadInstantTestRequest.md +++ b/thousandeyes-sdk-instant-tests/docs/PageLoadInstantTestRequest.md @@ -25,7 +25,7 @@ Name | Type | Description | Notes **custom_headers** | [**TestCustomHeaders**](TestCustomHeaders.md) | | [optional] **desired_status_code** | **str** | Specify the HTTP status code value that indicates a successful response. | [optional] [default to '200'] **emulated_device_id** | **str** | id of the emulated device, if one was given when the test was created | [optional] -**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to false. | [optional] [default to True] +**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`. | [optional] [default to True] **http_target_time** | **int** | Target time for HTTP server completion, specified in milliseconds. | [optional] **http_time_limit** | **int** | HTTP time limit in seconds. | [optional] [default to 5] **http_version** | **int** | HTTP protocol version. Set to '2' to prefer HTTP/2, or '1' to use only HTTP/1.1. | [optional] [default to 2] diff --git a/thousandeyes-sdk-instant-tests/docs/PageLoadProperties.md b/thousandeyes-sdk-instant-tests/docs/PageLoadProperties.md index 844f76be..e5e2b53f 100644 --- a/thousandeyes-sdk-instant-tests/docs/PageLoadProperties.md +++ b/thousandeyes-sdk-instant-tests/docs/PageLoadProperties.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes **custom_headers** | [**TestCustomHeaders**](TestCustomHeaders.md) | | [optional] **desired_status_code** | **str** | Specify the HTTP status code value that indicates a successful response. | [optional] [default to '200'] **emulated_device_id** | **str** | id of the emulated device, if one was given when the test was created | [optional] -**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to false. | [optional] [default to True] +**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`. | [optional] [default to True] **http_target_time** | **int** | Target time for HTTP server completion, specified in milliseconds. | [optional] **http_time_limit** | **int** | HTTP time limit in seconds. | [optional] [default to 5] **http_version** | **int** | HTTP protocol version. Set to '2' to prefer HTTP/2, or '1' to use only HTTP/1.1. | [optional] [default to 2] diff --git a/thousandeyes-sdk-instant-tests/docs/RunApi.md b/thousandeyes-sdk-instant-tests/docs/RunApi.md index b60dd7e3..97aacb8b 100644 --- a/thousandeyes-sdk-instant-tests/docs/RunApi.md +++ b/thousandeyes-sdk-instant-tests/docs/RunApi.md @@ -4,11 +4,11 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**post_instant_run**](RunApi.md#post_instant_run) | **POST** /v7/tests/{testId}/run | Run instant test +[**run_instant_test**](RunApi.md#run_instant_test) | **POST** /v7/tests/{testId}/run | Run instant test -# **post_instant_run** -> post_instant_run(test_id, aid=aid) +# **run_instant_test** +> run_instant_test(test_id, aid=aid) Run instant test @@ -48,9 +48,9 @@ with thousandeyes_sdk.instant_tests.ApiClient(configuration) as api_client: try: # Run instant test - api_instance.post_instant_run(test_id, aid=aid) + api_instance.run_instant_test(test_id, aid=aid) except Exception as e: - print("Exception when calling RunApi->post_instant_run: %s\n" % e) + print("Exception when calling RunApi->run_instant_test: %s\n" % e) ``` @@ -74,7 +74,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/problem+json + - **Accept**: application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-instant-tests/docs/SIPServerApi.md b/thousandeyes-sdk-instant-tests/docs/SIPServerApi.md index 815512a8..06cb78b9 100644 --- a/thousandeyes-sdk-instant-tests/docs/SIPServerApi.md +++ b/thousandeyes-sdk-instant-tests/docs/SIPServerApi.md @@ -4,11 +4,11 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**post_instant_sip_server**](SIPServerApi.md#post_instant_sip_server) | **POST** /v7/tests/sip-server/instant | Create SIP server instant test +[**create_sip_server_instant_test**](SIPServerApi.md#create_sip_server_instant_test) | **POST** /v7/tests/sip-server/instant | Create SIP server instant test -# **post_instant_sip_server** -> SipServerInstantTestResponse post_instant_sip_server(sip_server_instant_test_request, aid=aid, expand=expand) +# **create_sip_server_instant_test** +> SipServerInstantTestResponse create_sip_server_instant_test(sip_server_instant_test_request, aid=aid, expand=expand) Create SIP server instant test @@ -52,11 +52,11 @@ with thousandeyes_sdk.instant_tests.ApiClient(configuration) as api_client: try: # Create SIP server instant test - api_response = api_instance.post_instant_sip_server(sip_server_instant_test_request, aid=aid, expand=expand) - print("The response of SIPServerApi->post_instant_sip_server:\n") + api_response = api_instance.create_sip_server_instant_test(sip_server_instant_test_request, aid=aid, expand=expand) + print("The response of SIPServerApi->create_sip_server_instant_test:\n") pprint(api_response) except Exception as e: - print("Exception when calling SIPServerApi->post_instant_sip_server: %s\n" % e) + print("Exception when calling SIPServerApi->create_sip_server_instant_test: %s\n" % e) ``` @@ -81,7 +81,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-instant-tests/docs/ValidationErrorItem.md b/thousandeyes-sdk-instant-tests/docs/ValidationErrorItem.md index dcf7ec6d..17da3638 100644 --- a/thousandeyes-sdk-instant-tests/docs/ValidationErrorItem.md +++ b/thousandeyes-sdk-instant-tests/docs/ValidationErrorItem.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **code** | **str** | (Optional) A unique error type/code that can be referenced in the documentation for further details. | [optional] -**var_field** | **int** | Identifies the field that triggered this particular error. | [optional] +**var_field** | **str** | Identifies the field that triggered this particular error. | [optional] **message** | **str** | A short, human-readable summary of the error. | [optional] ## Example diff --git a/thousandeyes-sdk-instant-tests/docs/VoiceApi.md b/thousandeyes-sdk-instant-tests/docs/VoiceApi.md index 9ef72100..f7411d6f 100644 --- a/thousandeyes-sdk-instant-tests/docs/VoiceApi.md +++ b/thousandeyes-sdk-instant-tests/docs/VoiceApi.md @@ -4,11 +4,11 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**post_instant_voice**](VoiceApi.md#post_instant_voice) | **POST** /v7/tests/voice/instant | Create voice instant test +[**create_voice_instant_test**](VoiceApi.md#create_voice_instant_test) | **POST** /v7/tests/voice/instant | Create voice instant test -# **post_instant_voice** -> VoiceInstantTest post_instant_voice(voice_instant_test_request, aid=aid, expand=expand) +# **create_voice_instant_test** +> VoiceInstantTest create_voice_instant_test(voice_instant_test_request, aid=aid, expand=expand) Create voice instant test @@ -52,11 +52,11 @@ with thousandeyes_sdk.instant_tests.ApiClient(configuration) as api_client: try: # Create voice instant test - api_response = api_instance.post_instant_voice(voice_instant_test_request, aid=aid, expand=expand) - print("The response of VoiceApi->post_instant_voice:\n") + api_response = api_instance.create_voice_instant_test(voice_instant_test_request, aid=aid, expand=expand) + print("The response of VoiceApi->create_voice_instant_test:\n") pprint(api_response) except Exception as e: - print("Exception when calling VoiceApi->post_instant_voice: %s\n" % e) + print("Exception when calling VoiceApi->create_voice_instant_test: %s\n" % e) ``` @@ -81,7 +81,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-instant-tests/docs/WebTransactionApi.md b/thousandeyes-sdk-instant-tests/docs/WebTransactionApi.md index bbed1fd1..86690bee 100644 --- a/thousandeyes-sdk-instant-tests/docs/WebTransactionApi.md +++ b/thousandeyes-sdk-instant-tests/docs/WebTransactionApi.md @@ -4,11 +4,11 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**post_instant_web_transactions**](WebTransactionApi.md#post_instant_web_transactions) | **POST** /v7/tests/web-transactions/instant | Create web transactions instant test +[**create_web_transaction_instant_test**](WebTransactionApi.md#create_web_transaction_instant_test) | **POST** /v7/tests/web-transactions/instant | Create web transactions instant test -# **post_instant_web_transactions** -> WebTransactionInstantTest post_instant_web_transactions(web_transaction_instant_test_request, aid=aid, expand=expand) +# **create_web_transaction_instant_test** +> WebTransactionInstantTest create_web_transaction_instant_test(web_transaction_instant_test_request, aid=aid, expand=expand) Create web transactions instant test @@ -52,11 +52,11 @@ with thousandeyes_sdk.instant_tests.ApiClient(configuration) as api_client: try: # Create web transactions instant test - api_response = api_instance.post_instant_web_transactions(web_transaction_instant_test_request, aid=aid, expand=expand) - print("The response of WebTransactionApi->post_instant_web_transactions:\n") + api_response = api_instance.create_web_transaction_instant_test(web_transaction_instant_test_request, aid=aid, expand=expand) + print("The response of WebTransactionApi->create_web_transaction_instant_test:\n") pprint(api_response) except Exception as e: - print("Exception when calling WebTransactionApi->post_instant_web_transactions: %s\n" % e) + print("Exception when calling WebTransactionApi->create_web_transaction_instant_test: %s\n" % e) ``` @@ -81,7 +81,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-instant-tests/docs/WebTransactionInstantTest.md b/thousandeyes-sdk-instant-tests/docs/WebTransactionInstantTest.md index c36c7a73..b2fe6e74 100644 --- a/thousandeyes-sdk-instant-tests/docs/WebTransactionInstantTest.md +++ b/thousandeyes-sdk-instant-tests/docs/WebTransactionInstantTest.md @@ -25,7 +25,7 @@ Name | Type | Description | Notes **custom_headers** | [**TestCustomHeaders**](TestCustomHeaders.md) | | [optional] **desired_status_code** | **str** | Specify the HTTP status code value that indicates a successful response. | [optional] [default to '200'] **emulated_device_id** | **str** | id of the emulated device, if one was given when the test was created | [optional] -**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to false. | [optional] [default to True] +**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`. | [optional] [default to True] **http_target_time** | **int** | Target time for HTTP server completion, specified in milliseconds. | [optional] **http_time_limit** | **int** | HTTP time limit in seconds. | [optional] [default to 5] **http_version** | **int** | HTTP protocol version. Set to '2' to prefer HTTP/2, or '1' to use only HTTP/1.1. | [optional] [default to 2] diff --git a/thousandeyes-sdk-instant-tests/docs/WebTransactionInstantTestRequest.md b/thousandeyes-sdk-instant-tests/docs/WebTransactionInstantTestRequest.md index 55d9a8fe..fedf49de 100644 --- a/thousandeyes-sdk-instant-tests/docs/WebTransactionInstantTestRequest.md +++ b/thousandeyes-sdk-instant-tests/docs/WebTransactionInstantTestRequest.md @@ -25,7 +25,7 @@ Name | Type | Description | Notes **custom_headers** | [**TestCustomHeaders**](TestCustomHeaders.md) | | [optional] **desired_status_code** | **str** | Specify the HTTP status code value that indicates a successful response. | [optional] [default to '200'] **emulated_device_id** | **str** | id of the emulated device, if one was given when the test was created | [optional] -**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to false. | [optional] [default to True] +**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`. | [optional] [default to True] **http_target_time** | **int** | Target time for HTTP server completion, specified in milliseconds. | [optional] **http_time_limit** | **int** | HTTP time limit in seconds. | [optional] [default to 5] **http_version** | **int** | HTTP protocol version. Set to '2' to prefer HTTP/2, or '1' to use only HTTP/1.1. | [optional] [default to 2] diff --git a/thousandeyes-sdk-instant-tests/docs/WebTransactionProperties.md b/thousandeyes-sdk-instant-tests/docs/WebTransactionProperties.md index 88776c25..2375e584 100644 --- a/thousandeyes-sdk-instant-tests/docs/WebTransactionProperties.md +++ b/thousandeyes-sdk-instant-tests/docs/WebTransactionProperties.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes **custom_headers** | [**TestCustomHeaders**](TestCustomHeaders.md) | | [optional] **desired_status_code** | **str** | Specify the HTTP status code value that indicates a successful response. | [optional] [default to '200'] **emulated_device_id** | **str** | id of the emulated device, if one was given when the test was created | [optional] -**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to false. | [optional] [default to True] +**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`. | [optional] [default to True] **http_target_time** | **int** | Target time for HTTP server completion, specified in milliseconds. | [optional] **http_time_limit** | **int** | HTTP time limit in seconds. | [optional] [default to 5] **http_version** | **int** | HTTP protocol version. Set to '2' to prefer HTTP/2, or '1' to use only HTTP/1.1. | [optional] [default to 2] diff --git a/thousandeyes-sdk-instant-tests/pyproject.toml b/thousandeyes-sdk-instant-tests/pyproject.toml index 55108aea..059cce6e 100644 --- a/thousandeyes-sdk-instant-tests/pyproject.toml +++ b/thousandeyes-sdk-instant-tests/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "thousandeyes-sdk-instant-tests" -version = "1.0.0" +dynamic = ["version"] authors = [ { name = "ThousandEyes API Team", email = "api-team@thousandeyes.com" } ] @@ -11,9 +11,12 @@ dependencies = [ "python-dateutil >=2.8.2", "pydantic >=2", "typing-extensions >=4.7.1", - "thousandeyes-sdk-client==1.0.0", + "thousandeyes-sdk-core", ] +[tool.setuptools.dynamic] +version = {attr = "thousandeyes_sdk.client.__version__"} + [project.optional-dependencies] test = [ "pytest~=7.1.3", 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 e23e9619..09a2b9ba 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 @@ -7,15 +7,13 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 -__version__ = "1.0.0" - # import apis into sdk package from thousandeyes_sdk.instant_tests.api.api_api import APIApi from thousandeyes_sdk.instant_tests.api.agent_to_agent_api import AgentToAgentApi diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/agent_to_agent_api.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/agent_to_agent_api.py index a0be78be..44ee2dd3 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/agent_to_agent_api.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/agent_to_agent_api.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -28,6 +28,7 @@ from thousandeyes_sdk.instant_tests.models.expand import Expand from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class AgentToAgentApi: @@ -40,11 +41,12 @@ class AgentToAgentApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @validate_call - def post_instant_test_agent_to_agent( + def create_agent_to_agent_instant_test( self, agent_to_agent_instant_test_request: AgentToAgentInstantTestRequest, 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, @@ -94,7 +96,7 @@ class AgentToAgentApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_instant_test_agent_to_agent_serialize( + _param = self._create_agent_to_agent_instant_test_serialize( agent_to_agent_instant_test_request=agent_to_agent_instant_test_request, aid=aid, expand=expand, @@ -127,7 +129,7 @@ class AgentToAgentApi: @validate_call - def post_instant_test_agent_to_agent_with_http_info( + def create_agent_to_agent_instant_test_with_http_info( self, agent_to_agent_instant_test_request: AgentToAgentInstantTestRequest, 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, @@ -177,7 +179,7 @@ class AgentToAgentApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_instant_test_agent_to_agent_serialize( + _param = self._create_agent_to_agent_instant_test_serialize( agent_to_agent_instant_test_request=agent_to_agent_instant_test_request, aid=aid, expand=expand, @@ -210,7 +212,7 @@ class AgentToAgentApi: @validate_call - def post_instant_test_agent_to_agent_without_preload_content( + def create_agent_to_agent_instant_test_without_preload_content( self, agent_to_agent_instant_test_request: AgentToAgentInstantTestRequest, 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, @@ -260,7 +262,7 @@ class AgentToAgentApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_instant_test_agent_to_agent_serialize( + _param = self._create_agent_to_agent_instant_test_serialize( agent_to_agent_instant_test_request=agent_to_agent_instant_test_request, aid=aid, expand=expand, @@ -287,7 +289,7 @@ class AgentToAgentApi: return response_data.response - def _post_instant_test_agent_to_agent_serialize( + def _create_agent_to_agent_instant_test_serialize( self, agent_to_agent_instant_test_request, aid, @@ -332,6 +334,7 @@ class AgentToAgentApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/agent_to_server_api.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/agent_to_server_api.py index 4fca870b..413a92ed 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/agent_to_server_api.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/agent_to_server_api.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -28,6 +28,7 @@ from thousandeyes_sdk.instant_tests.models.expand import Expand from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class AgentToServerApi: @@ -40,11 +41,12 @@ class AgentToServerApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @validate_call - def post_instant_agent_to_server( + def create_agent_to_server_instant_test( self, agent_to_server_instant_test_request: AgentToServerInstantTestRequest, 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, @@ -94,7 +96,7 @@ class AgentToServerApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_instant_agent_to_server_serialize( + _param = self._create_agent_to_server_instant_test_serialize( agent_to_server_instant_test_request=agent_to_server_instant_test_request, aid=aid, expand=expand, @@ -127,7 +129,7 @@ class AgentToServerApi: @validate_call - def post_instant_agent_to_server_with_http_info( + def create_agent_to_server_instant_test_with_http_info( self, agent_to_server_instant_test_request: AgentToServerInstantTestRequest, 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, @@ -177,7 +179,7 @@ class AgentToServerApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_instant_agent_to_server_serialize( + _param = self._create_agent_to_server_instant_test_serialize( agent_to_server_instant_test_request=agent_to_server_instant_test_request, aid=aid, expand=expand, @@ -210,7 +212,7 @@ class AgentToServerApi: @validate_call - def post_instant_agent_to_server_without_preload_content( + def create_agent_to_server_instant_test_without_preload_content( self, agent_to_server_instant_test_request: AgentToServerInstantTestRequest, 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, @@ -260,7 +262,7 @@ class AgentToServerApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_instant_agent_to_server_serialize( + _param = self._create_agent_to_server_instant_test_serialize( agent_to_server_instant_test_request=agent_to_server_instant_test_request, aid=aid, expand=expand, @@ -287,7 +289,7 @@ class AgentToServerApi: return response_data.response - def _post_instant_agent_to_server_serialize( + def _create_agent_to_server_instant_test_serialize( self, agent_to_server_instant_test_request, aid, @@ -332,6 +334,7 @@ class AgentToServerApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/api_api.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/api_api.py index 031ae6c0..4b4bea3e 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/api_api.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/api_api.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -28,6 +28,7 @@ from thousandeyes_sdk.instant_tests.models.expand import Expand from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class APIApi: @@ -40,11 +41,12 @@ class APIApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @validate_call - def post_instant_api( + def create_api_instant_test( self, api_instant_test_request: ApiInstantTestRequest, 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, @@ -94,7 +96,7 @@ class APIApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_instant_api_serialize( + _param = self._create_api_instant_test_serialize( api_instant_test_request=api_instant_test_request, aid=aid, expand=expand, @@ -127,7 +129,7 @@ class APIApi: @validate_call - def post_instant_api_with_http_info( + def create_api_instant_test_with_http_info( self, api_instant_test_request: ApiInstantTestRequest, 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, @@ -177,7 +179,7 @@ class APIApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_instant_api_serialize( + _param = self._create_api_instant_test_serialize( api_instant_test_request=api_instant_test_request, aid=aid, expand=expand, @@ -210,7 +212,7 @@ class APIApi: @validate_call - def post_instant_api_without_preload_content( + def create_api_instant_test_without_preload_content( self, api_instant_test_request: ApiInstantTestRequest, 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, @@ -260,7 +262,7 @@ class APIApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_instant_api_serialize( + _param = self._create_api_instant_test_serialize( api_instant_test_request=api_instant_test_request, aid=aid, expand=expand, @@ -287,7 +289,7 @@ class APIApi: return response_data.response - def _post_instant_api_serialize( + def _create_api_instant_test_serialize( self, api_instant_test_request, aid, @@ -332,6 +334,7 @@ class APIApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/dns_security_api.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/dns_security_api.py index 043d678d..ed740597 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/dns_security_api.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/dns_security_api.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -28,6 +28,7 @@ from thousandeyes_sdk.instant_tests.models.expand import Expand from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class DNSSecurityApi: @@ -40,11 +41,12 @@ class DNSSecurityApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @validate_call - def post_instant_dns_sec( + def create_dns_sec_instant_test( self, dns_sec_instant_test_request: DnsSecInstantTestRequest, 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, @@ -94,7 +96,7 @@ class DNSSecurityApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_instant_dns_sec_serialize( + _param = self._create_dns_sec_instant_test_serialize( dns_sec_instant_test_request=dns_sec_instant_test_request, aid=aid, expand=expand, @@ -127,7 +129,7 @@ class DNSSecurityApi: @validate_call - def post_instant_dns_sec_with_http_info( + def create_dns_sec_instant_test_with_http_info( self, dns_sec_instant_test_request: DnsSecInstantTestRequest, 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, @@ -177,7 +179,7 @@ class DNSSecurityApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_instant_dns_sec_serialize( + _param = self._create_dns_sec_instant_test_serialize( dns_sec_instant_test_request=dns_sec_instant_test_request, aid=aid, expand=expand, @@ -210,7 +212,7 @@ class DNSSecurityApi: @validate_call - def post_instant_dns_sec_without_preload_content( + def create_dns_sec_instant_test_without_preload_content( self, dns_sec_instant_test_request: DnsSecInstantTestRequest, 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, @@ -260,7 +262,7 @@ class DNSSecurityApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_instant_dns_sec_serialize( + _param = self._create_dns_sec_instant_test_serialize( dns_sec_instant_test_request=dns_sec_instant_test_request, aid=aid, expand=expand, @@ -287,7 +289,7 @@ class DNSSecurityApi: return response_data.response - def _post_instant_dns_sec_serialize( + def _create_dns_sec_instant_test_serialize( self, dns_sec_instant_test_request, aid, @@ -332,6 +334,7 @@ class DNSSecurityApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/dns_server_api.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/dns_server_api.py index 3b21b21c..948e9cc2 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/dns_server_api.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/dns_server_api.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -28,6 +28,7 @@ from thousandeyes_sdk.instant_tests.models.expand import Expand from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class DNSServerApi: @@ -40,11 +41,12 @@ class DNSServerApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @validate_call - def post_instant_dns_server( + def create_dns_server_instant_test( self, dns_server_instant_test_request: DnsServerInstantTestRequest, 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, @@ -94,7 +96,7 @@ class DNSServerApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_instant_dns_server_serialize( + _param = self._create_dns_server_instant_test_serialize( dns_server_instant_test_request=dns_server_instant_test_request, aid=aid, expand=expand, @@ -127,7 +129,7 @@ class DNSServerApi: @validate_call - def post_instant_dns_server_with_http_info( + def create_dns_server_instant_test_with_http_info( self, dns_server_instant_test_request: DnsServerInstantTestRequest, 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, @@ -177,7 +179,7 @@ class DNSServerApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_instant_dns_server_serialize( + _param = self._create_dns_server_instant_test_serialize( dns_server_instant_test_request=dns_server_instant_test_request, aid=aid, expand=expand, @@ -210,7 +212,7 @@ class DNSServerApi: @validate_call - def post_instant_dns_server_without_preload_content( + def create_dns_server_instant_test_without_preload_content( self, dns_server_instant_test_request: DnsServerInstantTestRequest, 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, @@ -260,7 +262,7 @@ class DNSServerApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_instant_dns_server_serialize( + _param = self._create_dns_server_instant_test_serialize( dns_server_instant_test_request=dns_server_instant_test_request, aid=aid, expand=expand, @@ -287,7 +289,7 @@ class DNSServerApi: return response_data.response - def _post_instant_dns_server_serialize( + def _create_dns_server_instant_test_serialize( self, dns_server_instant_test_request, aid, @@ -332,6 +334,7 @@ class DNSServerApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/dns_trace_api.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/dns_trace_api.py index 84da8075..a0e6eadd 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/dns_trace_api.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/dns_trace_api.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -28,6 +28,7 @@ from thousandeyes_sdk.instant_tests.models.expand import Expand from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class DNSTraceApi: @@ -40,11 +41,12 @@ class DNSTraceApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @validate_call - def post_instant_dns_trace( + def create_dns_trace_instant_test( self, dns_trace_instant_test_request: DnsTraceInstantTestRequest, 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, @@ -94,7 +96,7 @@ class DNSTraceApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_instant_dns_trace_serialize( + _param = self._create_dns_trace_instant_test_serialize( dns_trace_instant_test_request=dns_trace_instant_test_request, aid=aid, expand=expand, @@ -127,7 +129,7 @@ class DNSTraceApi: @validate_call - def post_instant_dns_trace_with_http_info( + def create_dns_trace_instant_test_with_http_info( self, dns_trace_instant_test_request: DnsTraceInstantTestRequest, 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, @@ -177,7 +179,7 @@ class DNSTraceApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_instant_dns_trace_serialize( + _param = self._create_dns_trace_instant_test_serialize( dns_trace_instant_test_request=dns_trace_instant_test_request, aid=aid, expand=expand, @@ -210,7 +212,7 @@ class DNSTraceApi: @validate_call - def post_instant_dns_trace_without_preload_content( + def create_dns_trace_instant_test_without_preload_content( self, dns_trace_instant_test_request: DnsTraceInstantTestRequest, 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, @@ -260,7 +262,7 @@ class DNSTraceApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_instant_dns_trace_serialize( + _param = self._create_dns_trace_instant_test_serialize( dns_trace_instant_test_request=dns_trace_instant_test_request, aid=aid, expand=expand, @@ -287,7 +289,7 @@ class DNSTraceApi: return response_data.response - def _post_instant_dns_trace_serialize( + def _create_dns_trace_instant_test_serialize( self, dns_trace_instant_test_request, aid, @@ -332,6 +334,7 @@ class DNSTraceApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/ftp_server_api.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/ftp_server_api.py index 31acc1aa..1c728098 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/ftp_server_api.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/ftp_server_api.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -28,6 +28,7 @@ from thousandeyes_sdk.instant_tests.models.server_instant_test_request import Se from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class FTPServerApi: @@ -40,11 +41,12 @@ class FTPServerApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @validate_call - def post_instant_ftp_server( + def create_ftp_server_instant_test( self, server_instant_test_request: ServerInstantTestRequest, 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, @@ -94,7 +96,7 @@ class FTPServerApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_instant_ftp_server_serialize( + _param = self._create_ftp_server_instant_test_serialize( server_instant_test_request=server_instant_test_request, aid=aid, expand=expand, @@ -127,7 +129,7 @@ class FTPServerApi: @validate_call - def post_instant_ftp_server_with_http_info( + def create_ftp_server_instant_test_with_http_info( self, server_instant_test_request: ServerInstantTestRequest, 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, @@ -177,7 +179,7 @@ class FTPServerApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_instant_ftp_server_serialize( + _param = self._create_ftp_server_instant_test_serialize( server_instant_test_request=server_instant_test_request, aid=aid, expand=expand, @@ -210,7 +212,7 @@ class FTPServerApi: @validate_call - def post_instant_ftp_server_without_preload_content( + def create_ftp_server_instant_test_without_preload_content( self, server_instant_test_request: ServerInstantTestRequest, 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, @@ -260,7 +262,7 @@ class FTPServerApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_instant_ftp_server_serialize( + _param = self._create_ftp_server_instant_test_serialize( server_instant_test_request=server_instant_test_request, aid=aid, expand=expand, @@ -287,7 +289,7 @@ class FTPServerApi: return response_data.response - def _post_instant_ftp_server_serialize( + def _create_ftp_server_instant_test_serialize( self, server_instant_test_request, aid, @@ -332,6 +334,7 @@ class FTPServerApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/http_page_load_api.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/http_page_load_api.py index a5fbaf34..de7ac8c9 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/http_page_load_api.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/http_page_load_api.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -28,6 +28,7 @@ from thousandeyes_sdk.instant_tests.models.page_load_instant_test_request import from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class HTTPPageLoadApi: @@ -40,11 +41,12 @@ class HTTPPageLoadApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @validate_call - def post_instant_http_page_load( + def create_page_load_instant_test( self, page_load_instant_test_request: PageLoadInstantTestRequest, 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, @@ -94,7 +96,7 @@ class HTTPPageLoadApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_instant_http_page_load_serialize( + _param = self._create_page_load_instant_test_serialize( page_load_instant_test_request=page_load_instant_test_request, aid=aid, expand=expand, @@ -127,7 +129,7 @@ class HTTPPageLoadApi: @validate_call - def post_instant_http_page_load_with_http_info( + def create_page_load_instant_test_with_http_info( self, page_load_instant_test_request: PageLoadInstantTestRequest, 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, @@ -177,7 +179,7 @@ class HTTPPageLoadApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_instant_http_page_load_serialize( + _param = self._create_page_load_instant_test_serialize( page_load_instant_test_request=page_load_instant_test_request, aid=aid, expand=expand, @@ -210,7 +212,7 @@ class HTTPPageLoadApi: @validate_call - def post_instant_http_page_load_without_preload_content( + def create_page_load_instant_test_without_preload_content( self, page_load_instant_test_request: PageLoadInstantTestRequest, 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, @@ -260,7 +262,7 @@ class HTTPPageLoadApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_instant_http_page_load_serialize( + _param = self._create_page_load_instant_test_serialize( page_load_instant_test_request=page_load_instant_test_request, aid=aid, expand=expand, @@ -287,7 +289,7 @@ class HTTPPageLoadApi: return response_data.response - def _post_instant_http_page_load_serialize( + def _create_page_load_instant_test_serialize( self, page_load_instant_test_request, aid, @@ -332,6 +334,7 @@ class HTTPPageLoadApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/http_server_api.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/http_server_api.py index e1126b2a..0942285e 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/http_server_api.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/http_server_api.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -28,6 +28,7 @@ from thousandeyes_sdk.instant_tests.models.http_server_instant_test_request impo from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class HTTPServerApi: @@ -40,11 +41,12 @@ class HTTPServerApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @validate_call - def post_instant_http_server( + def create_http_server_instant_test( self, http_server_instant_test_request: HttpServerInstantTestRequest, 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, @@ -94,7 +96,7 @@ class HTTPServerApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_instant_http_server_serialize( + _param = self._create_http_server_instant_test_serialize( http_server_instant_test_request=http_server_instant_test_request, aid=aid, expand=expand, @@ -127,7 +129,7 @@ class HTTPServerApi: @validate_call - def post_instant_http_server_with_http_info( + def create_http_server_instant_test_with_http_info( self, http_server_instant_test_request: HttpServerInstantTestRequest, 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, @@ -177,7 +179,7 @@ class HTTPServerApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_instant_http_server_serialize( + _param = self._create_http_server_instant_test_serialize( http_server_instant_test_request=http_server_instant_test_request, aid=aid, expand=expand, @@ -210,7 +212,7 @@ class HTTPServerApi: @validate_call - def post_instant_http_server_without_preload_content( + def create_http_server_instant_test_without_preload_content( self, http_server_instant_test_request: HttpServerInstantTestRequest, 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, @@ -260,7 +262,7 @@ class HTTPServerApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_instant_http_server_serialize( + _param = self._create_http_server_instant_test_serialize( http_server_instant_test_request=http_server_instant_test_request, aid=aid, expand=expand, @@ -287,7 +289,7 @@ class HTTPServerApi: return response_data.response - def _post_instant_http_server_serialize( + def _create_http_server_instant_test_serialize( self, http_server_instant_test_request, aid, @@ -332,6 +334,7 @@ class HTTPServerApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/run_api.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/run_api.py index a22df0e9..d54e88f7 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/run_api.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/run_api.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -25,6 +25,7 @@ from typing_extensions import Annotated from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class RunApi: @@ -37,11 +38,12 @@ class RunApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @validate_call - def post_instant_run( + def run_instant_test( self, test_id: Annotated[StrictStr, Field(description="Identifier for the instant test you wish to rerun.")], 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, @@ -88,7 +90,7 @@ class RunApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_instant_run_serialize( + _param = self._run_instant_test_serialize( test_id=test_id, aid=aid, _request_auth=_request_auth, @@ -119,7 +121,7 @@ class RunApi: @validate_call - def post_instant_run_with_http_info( + def run_instant_test_with_http_info( self, test_id: Annotated[StrictStr, Field(description="Identifier for the instant test you wish to rerun.")], 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, @@ -166,7 +168,7 @@ class RunApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_instant_run_serialize( + _param = self._run_instant_test_serialize( test_id=test_id, aid=aid, _request_auth=_request_auth, @@ -197,7 +199,7 @@ class RunApi: @validate_call - def post_instant_run_without_preload_content( + def run_instant_test_without_preload_content( self, test_id: Annotated[StrictStr, Field(description="Identifier for the instant test you wish to rerun.")], 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, @@ -244,7 +246,7 @@ class RunApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_instant_run_serialize( + _param = self._run_instant_test_serialize( test_id=test_id, aid=aid, _request_auth=_request_auth, @@ -269,7 +271,7 @@ class RunApi: return response_data.response - def _post_instant_run_serialize( + def _run_instant_test_serialize( self, test_id, aid, @@ -307,6 +309,7 @@ class RunApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/sip_server_api.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/sip_server_api.py index f9dca1b1..98594252 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/sip_server_api.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/sip_server_api.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -28,6 +28,7 @@ from thousandeyes_sdk.instant_tests.models.sip_server_instant_test_response impo from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class SIPServerApi: @@ -40,11 +41,12 @@ class SIPServerApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @validate_call - def post_instant_sip_server( + def create_sip_server_instant_test( self, sip_server_instant_test_request: SipServerInstantTestRequest, 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, @@ -94,7 +96,7 @@ class SIPServerApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_instant_sip_server_serialize( + _param = self._create_sip_server_instant_test_serialize( sip_server_instant_test_request=sip_server_instant_test_request, aid=aid, expand=expand, @@ -127,7 +129,7 @@ class SIPServerApi: @validate_call - def post_instant_sip_server_with_http_info( + def create_sip_server_instant_test_with_http_info( self, sip_server_instant_test_request: SipServerInstantTestRequest, 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, @@ -177,7 +179,7 @@ class SIPServerApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_instant_sip_server_serialize( + _param = self._create_sip_server_instant_test_serialize( sip_server_instant_test_request=sip_server_instant_test_request, aid=aid, expand=expand, @@ -210,7 +212,7 @@ class SIPServerApi: @validate_call - def post_instant_sip_server_without_preload_content( + def create_sip_server_instant_test_without_preload_content( self, sip_server_instant_test_request: SipServerInstantTestRequest, 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, @@ -260,7 +262,7 @@ class SIPServerApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_instant_sip_server_serialize( + _param = self._create_sip_server_instant_test_serialize( sip_server_instant_test_request=sip_server_instant_test_request, aid=aid, expand=expand, @@ -287,7 +289,7 @@ class SIPServerApi: return response_data.response - def _post_instant_sip_server_serialize( + def _create_sip_server_instant_test_serialize( self, sip_server_instant_test_request, aid, @@ -332,6 +334,7 @@ class SIPServerApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/voice_api.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/voice_api.py index 03ba941c..d0481be2 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/voice_api.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/voice_api.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -28,6 +28,7 @@ from thousandeyes_sdk.instant_tests.models.voice_instant_test_request import Voi from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class VoiceApi: @@ -40,11 +41,12 @@ class VoiceApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @validate_call - def post_instant_voice( + def create_voice_instant_test( self, voice_instant_test_request: VoiceInstantTestRequest, 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, @@ -94,7 +96,7 @@ class VoiceApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_instant_voice_serialize( + _param = self._create_voice_instant_test_serialize( voice_instant_test_request=voice_instant_test_request, aid=aid, expand=expand, @@ -127,7 +129,7 @@ class VoiceApi: @validate_call - def post_instant_voice_with_http_info( + def create_voice_instant_test_with_http_info( self, voice_instant_test_request: VoiceInstantTestRequest, 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, @@ -177,7 +179,7 @@ class VoiceApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_instant_voice_serialize( + _param = self._create_voice_instant_test_serialize( voice_instant_test_request=voice_instant_test_request, aid=aid, expand=expand, @@ -210,7 +212,7 @@ class VoiceApi: @validate_call - def post_instant_voice_without_preload_content( + def create_voice_instant_test_without_preload_content( self, voice_instant_test_request: VoiceInstantTestRequest, 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, @@ -260,7 +262,7 @@ class VoiceApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_instant_voice_serialize( + _param = self._create_voice_instant_test_serialize( voice_instant_test_request=voice_instant_test_request, aid=aid, expand=expand, @@ -287,7 +289,7 @@ class VoiceApi: return response_data.response - def _post_instant_voice_serialize( + def _create_voice_instant_test_serialize( self, voice_instant_test_request, aid, @@ -332,6 +334,7 @@ class VoiceApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/web_transaction_api.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/web_transaction_api.py index 2d4894bf..a44bb76c 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/web_transaction_api.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/api/web_transaction_api.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -28,6 +28,7 @@ from thousandeyes_sdk.instant_tests.models.web_transaction_instant_test_request from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class WebTransactionApi: @@ -40,11 +41,12 @@ class WebTransactionApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @validate_call - def post_instant_web_transactions( + def create_web_transaction_instant_test( self, web_transaction_instant_test_request: WebTransactionInstantTestRequest, 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, @@ -94,7 +96,7 @@ class WebTransactionApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_instant_web_transactions_serialize( + _param = self._create_web_transaction_instant_test_serialize( web_transaction_instant_test_request=web_transaction_instant_test_request, aid=aid, expand=expand, @@ -127,7 +129,7 @@ class WebTransactionApi: @validate_call - def post_instant_web_transactions_with_http_info( + def create_web_transaction_instant_test_with_http_info( self, web_transaction_instant_test_request: WebTransactionInstantTestRequest, 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, @@ -177,7 +179,7 @@ class WebTransactionApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_instant_web_transactions_serialize( + _param = self._create_web_transaction_instant_test_serialize( web_transaction_instant_test_request=web_transaction_instant_test_request, aid=aid, expand=expand, @@ -210,7 +212,7 @@ class WebTransactionApi: @validate_call - def post_instant_web_transactions_without_preload_content( + def create_web_transaction_instant_test_without_preload_content( self, web_transaction_instant_test_request: WebTransactionInstantTestRequest, 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, @@ -260,7 +262,7 @@ class WebTransactionApi: :return: Returns the result object. """ # noqa: E501 - _param = self._post_instant_web_transactions_serialize( + _param = self._create_web_transaction_instant_test_serialize( web_transaction_instant_test_request=web_transaction_instant_test_request, aid=aid, expand=expand, @@ -287,7 +289,7 @@ class WebTransactionApi: return response_data.response - def _post_instant_web_transactions_serialize( + def _create_web_transaction_instant_test_serialize( self, web_transaction_instant_test_request, aid, @@ -332,6 +334,7 @@ class WebTransactionApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) 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 02225974..10f1aacf 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 @@ -6,7 +6,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent.py index 547595c7..b2cc10c6 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -44,6 +44,7 @@ class Agent(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -54,7 +55,7 @@ class Agent(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent_base.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent_base.py index d6a9f34c..0ea5995e 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent_base.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent_base.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class AgentBase(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class AgentBase(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent_to_agent_instant_test.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent_to_agent_instant_test.py index aa2d89af..c6d994ff 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent_to_agent_instant_test.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent_to_agent_instant_test.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -69,6 +69,7 @@ class AgentToAgentInstantTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -79,7 +80,7 @@ class AgentToAgentInstantTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent_to_agent_instant_test_request.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent_to_agent_instant_test_request.py index d7d1a1c4..b18327a9 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent_to_agent_instant_test_request.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent_to_agent_instant_test_request.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -67,6 +67,7 @@ class AgentToAgentInstantTestRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -77,7 +78,7 @@ class AgentToAgentInstantTestRequest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent_to_agent_properties.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent_to_agent_properties.py index 3d9efd23..c81c5dc5 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent_to_agent_properties.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent_to_agent_properties.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -51,6 +51,7 @@ class AgentToAgentProperties(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -61,7 +62,7 @@ class AgentToAgentProperties(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent_to_agent_test_protocol.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent_to_agent_test_protocol.py index 7e5b3c86..a6cb9007 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent_to_agent_test_protocol.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent_to_agent_test_protocol.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent_to_server_instant_test.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent_to_server_instant_test.py index 27dd8b72..da8de105 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent_to_server_instant_test.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent_to_server_instant_test.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -72,6 +72,7 @@ class AgentToServerInstantTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -82,7 +83,7 @@ class AgentToServerInstantTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent_to_server_instant_test_request.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent_to_server_instant_test_request.py index 3e69310d..bc7ceee3 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent_to_server_instant_test_request.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent_to_server_instant_test_request.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -70,6 +70,7 @@ class AgentToServerInstantTestRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -80,7 +81,7 @@ class AgentToServerInstantTestRequest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent_to_server_properties.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent_to_server_properties.py index e893dfaf..829520bd 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent_to_server_properties.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/agent_to_server_properties.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -54,6 +54,7 @@ class AgentToServerProperties(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -64,7 +65,7 @@ class AgentToServerProperties(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_instant_test.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_instant_test.py index 81e39083..d868959d 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_instant_test.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_instant_test.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -51,7 +51,7 @@ class ApiInstantTest(BaseModel): links: Optional[TestLinks] = Field(default=None, alias="_links") labels: Optional[List[TestLabel]] = None shared_with_accounts: Optional[List[SharedWithAccount]] = Field(default=None, alias="sharedWithAccounts") - follow_redirects: Optional[StrictBool] = Field(default=True, description="Indicates if HTTP/301 or HTTP/302 redirect directives should be followed. To disable following redirects, set this parameter to false.", alias="followRedirects") + follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`.", alias="followRedirects") mtu_measurements: Optional[StrictBool] = Field(default=None, description="Set `true` to measure MTU sizes on network from agents to the target.", alias="mtuMeasurements") network_measurements: Optional[StrictBool] = Field(default=True, description="Enable or disable network measurements. Set to true to enable or false to disable network measurements.", alias="networkMeasurements") num_path_traces: Optional[Annotated[int, Field(le=10, strict=True, ge=1)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") @@ -72,6 +72,7 @@ class ApiInstantTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -82,7 +83,7 @@ class ApiInstantTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_instant_test_request.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_instant_test_request.py index f8ea840f..e4cb3e33 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_instant_test_request.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_instant_test_request.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -49,7 +49,7 @@ class ApiInstantTestRequest(BaseModel): links: Optional[TestLinks] = Field(default=None, alias="_links") labels: Optional[List[StrictStr]] = Field(default=None, description="A list of test label identifiers (get `labelId` from `/labels` endpoint).") shared_with_accounts: Optional[List[StrictStr]] = Field(default=None, description="A list of account group identifiers that the test is shared with (get `aid` from `/account-groups` endpoint).", alias="sharedWithAccounts") - follow_redirects: Optional[StrictBool] = Field(default=True, description="Indicates if HTTP/301 or HTTP/302 redirect directives should be followed. To disable following redirects, set this parameter to false.", alias="followRedirects") + follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`.", alias="followRedirects") mtu_measurements: Optional[StrictBool] = Field(default=None, description="Set `true` to measure MTU sizes on network from agents to the target.", alias="mtuMeasurements") network_measurements: Optional[StrictBool] = Field(default=True, description="Enable or disable network measurements. Set to true to enable or false to disable network measurements.", alias="networkMeasurements") num_path_traces: Optional[Annotated[int, Field(le=10, strict=True, ge=1)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") @@ -70,6 +70,7 @@ class ApiInstantTestRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -80,7 +81,7 @@ class ApiInstantTestRequest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_predefined_variable.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_predefined_variable.py index 66198107..f514aa0c 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_predefined_variable.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_predefined_variable.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class ApiPredefinedVariable(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class ApiPredefinedVariable(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_properties.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_properties.py index cd348c8e..2cb96c7c 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_properties.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_properties.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -33,7 +33,7 @@ class ApiProperties(BaseModel): """ ApiProperties """ # noqa: E501 - follow_redirects: Optional[StrictBool] = Field(default=True, description="Indicates if HTTP/301 or HTTP/302 redirect directives should be followed. To disable following redirects, set this parameter to false.", alias="followRedirects") + follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`.", alias="followRedirects") mtu_measurements: Optional[StrictBool] = Field(default=None, description="Set `true` to measure MTU sizes on network from agents to the target.", alias="mtuMeasurements") network_measurements: Optional[StrictBool] = Field(default=True, description="Enable or disable network measurements. Set to true to enable or false to disable network measurements.", alias="networkMeasurements") num_path_traces: Optional[Annotated[int, Field(le=10, strict=True, ge=1)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") @@ -53,6 +53,7 @@ class ApiProperties(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -63,7 +64,7 @@ class ApiProperties(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_request.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_request.py index 0f601610..2858fbf3 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_request.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_request.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,8 +17,8 @@ import pprint import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional from thousandeyes_sdk.instant_tests.models.api_request_assertion import ApiRequestAssertion from thousandeyes_sdk.instant_tests.models.api_request_auth_type import ApiRequestAuthType from thousandeyes_sdk.instant_tests.models.api_request_header import ApiRequestHeader @@ -35,7 +35,7 @@ class ApiRequest(BaseModel): auth_type: Optional[ApiRequestAuthType] = Field(default=None, alias="authType") bearer_token: Optional[StrictStr] = Field(default=None, description="The bearer token if `authType = bearer-token`.", alias="bearerToken") body: Optional[StrictStr] = Field(default=None, description="POST/PUT request body. Must be in JSON format.") - collect_api_response: Optional[StrictStr] = Field(default='true', description="Set to `true` if API response body should be collected and saved. Set to `false` if API response body should not be saved.", alias="collectApiResponse") + collect_api_response: Optional[StrictBool] = Field(default=True, description="Set to `true` if API response body should be collected and saved. Set to `false` if API response body should not be saved.", alias="collectApiResponse") headers: Optional[List[ApiRequestHeader]] = Field(default=None, description="Array of API Request Header objects.") method: Optional[ApiRequestMethod] = None name: StrictStr = Field(description="API step name, must be unique.") @@ -43,13 +43,14 @@ class ApiRequest(BaseModel): url: StrictStr = Field(description="Request url. Supports variables in the format `{{variableName}}`.") username: Optional[StrictStr] = Field(default=None, description="The username if `authType = basic`.") variables: Optional[List[ApiRequestVariable]] = Field(default=None, description="Array of API post request variable objects.") - wait_time_ms: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Post request delay before executing the next API requests, in milliseconds.", alias="waitTimeMs") + wait_time_ms: Optional[StrictInt] = Field(default=None, description="Post request delay before executing the next API requests, in milliseconds.", alias="waitTimeMs") __properties: ClassVar[List[str]] = ["assertions", "authType", "bearerToken", "body", "collectApiResponse", "headers", "method", "name", "password", "url", "username", "variables", "waitTimeMs"] model_config = ConfigDict( populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -60,7 +61,7 @@ class ApiRequest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -122,7 +123,7 @@ class ApiRequest(BaseModel): "authType": obj.get("authType"), "bearerToken": obj.get("bearerToken"), "body": obj.get("body"), - "collectApiResponse": obj.get("collectApiResponse") if obj.get("collectApiResponse") is not None else 'true', + "collectApiResponse": obj.get("collectApiResponse") if obj.get("collectApiResponse") is not None else True, "headers": [ApiRequestHeader.from_dict(_item) for _item in obj["headers"]] if obj.get("headers") is not None else None, "method": obj.get("method"), "name": obj.get("name"), diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_request_assertion.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_request_assertion.py index 3c83d87a..86a86255 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_request_assertion.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_request_assertion.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -37,6 +37,7 @@ class ApiRequestAssertion(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -47,7 +48,7 @@ class ApiRequestAssertion(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_request_assertion_name.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_request_assertion_name.py index 79168ffb..caa22586 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_request_assertion_name.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_request_assertion_name.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_request_assertion_operator.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_request_assertion_operator.py index f7961ad9..d6424ab7 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_request_assertion_operator.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_request_assertion_operator.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_request_auth_type.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_request_auth_type.py index 7248ccc5..1a86f1a6 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_request_auth_type.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_request_auth_type.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_request_header.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_request_header.py index 60180807..bbf6bdb5 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_request_header.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_request_header.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class ApiRequestHeader(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class ApiRequestHeader(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_request_method.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_request_method.py index 2627dcea..c4816083 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_request_method.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_request_method.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_request_variable.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_request_variable.py index f52dc23d..4f2da401 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_request_variable.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/api_request_variable.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class ApiRequestVariable(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class ApiRequestVariable(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/cloud_enterprise_agent_type.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/cloud_enterprise_agent_type.py index 67e0084d..7831096e 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/cloud_enterprise_agent_type.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/cloud_enterprise_agent_type.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_query_class.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_query_class.py index 1618c17f..cf348f99 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_query_class.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_query_class.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_sec_instant_test.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_sec_instant_test.py index 0754a705..8b6ecb6f 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_sec_instant_test.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_sec_instant_test.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -54,6 +54,7 @@ class DnsSecInstantTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -64,7 +65,7 @@ class DnsSecInstantTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_sec_instant_test_request.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_sec_instant_test_request.py index 9e615ece..21cbeb20 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_sec_instant_test_request.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_sec_instant_test_request.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -52,6 +52,7 @@ class DnsSecInstantTestRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -62,7 +63,7 @@ class DnsSecInstantTestRequest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_sec_properties.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_sec_properties.py index b5a1dc68..53e90ff5 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_sec_properties.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_sec_properties.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class DnsSecProperties(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class DnsSecProperties(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_server_instant_test.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_server_instant_test.py index ec382f8e..f5faf731 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_server_instant_test.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_server_instant_test.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -73,6 +73,7 @@ class DnsServerInstantTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -83,7 +84,7 @@ class DnsServerInstantTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_server_instant_test_request.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_server_instant_test_request.py index f298a5e0..a424c898 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_server_instant_test_request.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_server_instant_test_request.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -70,6 +70,7 @@ class DnsServerInstantTestRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -80,7 +81,7 @@ class DnsServerInstantTestRequest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_server_properties.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_server_properties.py index f6d11016..1db0459b 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_server_properties.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_server_properties.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -55,6 +55,7 @@ class DnsServerProperties(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -65,7 +66,7 @@ class DnsServerProperties(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_servers_request.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_servers_request.py index 54501ed1..e1999982 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_servers_request.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_servers_request.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -33,6 +33,7 @@ class DnsServersRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -43,7 +44,7 @@ class DnsServersRequest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_trace_instant_test.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_trace_instant_test.py index 3ad1f945..808f5951 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_trace_instant_test.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_trace_instant_test.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -56,6 +56,7 @@ class DnsTraceInstantTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -66,7 +67,7 @@ class DnsTraceInstantTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_trace_instant_test_request.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_trace_instant_test_request.py index caee2520..54d2cd35 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_trace_instant_test_request.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_trace_instant_test_request.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -54,6 +54,7 @@ class DnsTraceInstantTestRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -64,7 +65,7 @@ class DnsTraceInstantTestRequest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_trace_properties.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_trace_properties.py index 3428cf02..7d5a2b04 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_trace_properties.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/dns_trace_properties.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -38,6 +38,7 @@ class DnsTraceProperties(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -48,7 +49,7 @@ class DnsTraceProperties(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/error.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/error.py index 2ac47151..52ce7de2 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/error.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/error.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -37,6 +37,7 @@ class Error(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -47,7 +48,7 @@ class Error(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/expand.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/expand.py index d9eb3116..3cfdfeea 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/expand.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/expand.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/ftp_server_instant_test.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/ftp_server_instant_test.py index 6555f5d0..92729fd6 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/ftp_server_instant_test.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/ftp_server_instant_test.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -75,6 +75,7 @@ class FtpServerInstantTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -85,7 +86,7 @@ class FtpServerInstantTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/ftp_server_properties.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/ftp_server_properties.py index 43d4e0d8..fd7db918 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/ftp_server_properties.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/ftp_server_properties.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -57,6 +57,7 @@ class FtpServerProperties(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -67,7 +68,7 @@ class FtpServerProperties(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/ftp_server_request_type.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/ftp_server_request_type.py index 13861acf..f08be4e1 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/ftp_server_request_type.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/ftp_server_request_type.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/http_server_instant_test.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/http_server_instant_test.py index b949330b..52b109fb 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/http_server_instant_test.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/http_server_instant_test.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -91,6 +91,7 @@ class HttpServerInstantTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -101,7 +102,7 @@ class HttpServerInstantTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/http_server_instant_test_request.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/http_server_instant_test_request.py index 9c824a5d..31234446 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/http_server_instant_test_request.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/http_server_instant_test_request.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -89,6 +89,7 @@ class HttpServerInstantTestRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -99,7 +100,7 @@ class HttpServerInstantTestRequest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/http_server_properties.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/http_server_properties.py index b485df6d..41bea196 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/http_server_properties.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/http_server_properties.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -73,6 +73,7 @@ class HttpServerProperties(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -83,7 +84,7 @@ class HttpServerProperties(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/instant_test.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/instant_test.py index 20107d45..580ef982 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/instant_test.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/instant_test.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -50,6 +50,7 @@ class InstantTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -60,7 +61,7 @@ class InstantTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/instant_test_request.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/instant_test_request.py index e45427d3..a125857c 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/instant_test_request.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/instant_test_request.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class InstantTestRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class InstantTestRequest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/link.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/link.py index 77059a69..20d4a5b1 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/link.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/link.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -40,6 +40,7 @@ class Link(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -50,7 +51,7 @@ class Link(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/page_load_instant_test.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/page_load_instant_test.py index da045b61..c6b7893c 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/page_load_instant_test.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/page_load_instant_test.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -59,7 +59,7 @@ class PageLoadInstantTest(BaseModel): custom_headers: Optional[TestCustomHeaders] = Field(default=None, alias="customHeaders") desired_status_code: Optional[StrictStr] = Field(default='200', description="Specify the HTTP status code value that indicates a successful response.", alias="desiredStatusCode") emulated_device_id: Optional[StrictStr] = Field(default=None, description="id of the emulated device, if one was given when the test was created", alias="emulatedDeviceId") - follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to false.", alias="followRedirects") + follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`.", alias="followRedirects") http_target_time: Optional[Annotated[int, Field(le=5000, strict=True, ge=100)]] = Field(default=None, description="Target time for HTTP server completion, specified in milliseconds.", alias="httpTargetTime") http_time_limit: Optional[Annotated[int, Field(le=60, strict=True, ge=5)]] = Field(default=5, description="HTTP time limit in seconds.", alias="httpTimeLimit") http_version: Optional[Annotated[int, Field(le=2, strict=True, ge=1)]] = Field(default=2, description="HTTP protocol version. Set to '2' to prefer HTTP/2, or '1' to use only HTTP/1.1.", alias="httpVersion") @@ -95,6 +95,7 @@ class PageLoadInstantTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -105,7 +106,7 @@ class PageLoadInstantTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/page_load_instant_test_request.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/page_load_instant_test_request.py index f35a4723..1ef134d1 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/page_load_instant_test_request.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/page_load_instant_test_request.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -57,7 +57,7 @@ class PageLoadInstantTestRequest(BaseModel): custom_headers: Optional[TestCustomHeaders] = Field(default=None, alias="customHeaders") desired_status_code: Optional[StrictStr] = Field(default='200', description="Specify the HTTP status code value that indicates a successful response.", alias="desiredStatusCode") emulated_device_id: Optional[StrictStr] = Field(default=None, description="id of the emulated device, if one was given when the test was created", alias="emulatedDeviceId") - follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to false.", alias="followRedirects") + follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`.", alias="followRedirects") http_target_time: Optional[Annotated[int, Field(le=5000, strict=True, ge=100)]] = Field(default=None, description="Target time for HTTP server completion, specified in milliseconds.", alias="httpTargetTime") http_time_limit: Optional[Annotated[int, Field(le=60, strict=True, ge=5)]] = Field(default=5, description="HTTP time limit in seconds.", alias="httpTimeLimit") http_version: Optional[Annotated[int, Field(le=2, strict=True, ge=1)]] = Field(default=2, description="HTTP protocol version. Set to '2' to prefer HTTP/2, or '1' to use only HTTP/1.1.", alias="httpVersion") @@ -93,6 +93,7 @@ class PageLoadInstantTestRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -103,7 +104,7 @@ class PageLoadInstantTestRequest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/page_load_properties.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/page_load_properties.py index 926a560b..6791c03b 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/page_load_properties.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/page_load_properties.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -41,7 +41,7 @@ class PageLoadProperties(BaseModel): custom_headers: Optional[TestCustomHeaders] = Field(default=None, alias="customHeaders") desired_status_code: Optional[StrictStr] = Field(default='200', description="Specify the HTTP status code value that indicates a successful response.", alias="desiredStatusCode") emulated_device_id: Optional[StrictStr] = Field(default=None, description="id of the emulated device, if one was given when the test was created", alias="emulatedDeviceId") - follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to false.", alias="followRedirects") + follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`.", alias="followRedirects") http_target_time: Optional[Annotated[int, Field(le=5000, strict=True, ge=100)]] = Field(default=None, description="Target time for HTTP server completion, specified in milliseconds.", alias="httpTargetTime") http_time_limit: Optional[Annotated[int, Field(le=60, strict=True, ge=5)]] = Field(default=5, description="HTTP time limit in seconds.", alias="httpTimeLimit") http_version: Optional[Annotated[int, Field(le=2, strict=True, ge=1)]] = Field(default=2, description="HTTP protocol version. Set to '2' to prefer HTTP/2, or '1' to use only HTTP/1.1.", alias="httpVersion") @@ -77,6 +77,7 @@ class PageLoadProperties(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -87,7 +88,7 @@ class PageLoadProperties(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/server_instant_test_request.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/server_instant_test_request.py index 01b0e470..f85776d5 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/server_instant_test_request.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/server_instant_test_request.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -73,6 +73,7 @@ class ServerInstantTestRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -83,7 +84,7 @@ class ServerInstantTestRequest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/shared_with_account.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/shared_with_account.py index 6282120c..41940c81 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/shared_with_account.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/shared_with_account.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class SharedWithAccount(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class SharedWithAccount(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/simple_agent.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/simple_agent.py index e463ad6b..76764f7b 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/simple_agent.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/simple_agent.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -42,6 +42,7 @@ class SimpleAgent(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -52,7 +53,7 @@ class SimpleAgent(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/sip_server_instant_test.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/sip_server_instant_test.py index 9a1f1e90..e192e6b6 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/sip_server_instant_test.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/sip_server_instant_test.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -66,6 +66,7 @@ class SipServerInstantTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -76,7 +77,7 @@ class SipServerInstantTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/sip_server_instant_test_request.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/sip_server_instant_test_request.py index 903c1bb5..82d6bea9 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/sip_server_instant_test_request.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/sip_server_instant_test_request.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -66,6 +66,7 @@ class SipServerInstantTestRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -76,7 +77,7 @@ class SipServerInstantTestRequest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/sip_server_instant_test_request1.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/sip_server_instant_test_request1.py index 427a657c..ee18852a 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/sip_server_instant_test_request1.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/sip_server_instant_test_request1.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -68,6 +68,7 @@ class SipServerInstantTestRequest1(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -78,7 +79,7 @@ class SipServerInstantTestRequest1(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: 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 6fbd55aa..5e58c70e 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 @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -73,6 +73,7 @@ class SipServerInstantTestResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -83,7 +84,7 @@ class SipServerInstantTestResponse(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/sip_server_properties.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/sip_server_properties.py index 4ec40182..390733b0 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/sip_server_properties.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/sip_server_properties.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -48,6 +48,7 @@ class SipServerProperties(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -58,7 +59,7 @@ class SipServerProperties(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/sip_test_protocol.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/sip_test_protocol.py index 7baf6f8e..c7dd51f3 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/sip_test_protocol.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/sip_test_protocol.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_agent.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_agent.py index ed9ee45f..108cbb43 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_agent.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_agent.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class TestAgent(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class TestAgent(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_auth_type.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_auth_type.py index d04a2d36..b894ae28 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_auth_type.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_auth_type.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_custom_headers.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_custom_headers.py index 7f5bb07d..2e17778a 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_custom_headers.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_custom_headers.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class TestCustomHeaders(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class TestCustomHeaders(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_direction.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_direction.py index 678ab7e5..b2806e4f 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_direction.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_direction.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_dns_server.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_dns_server.py index 88cc6908..2773ecf4 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_dns_server.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_dns_server.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class TestDnsServer(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class TestDnsServer(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_dns_transport_protocol.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_dns_transport_protocol.py index 7776edcb..68d7536c 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_dns_transport_protocol.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_dns_transport_protocol.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_dscp_id.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_dscp_id.py index efdf9778..340ff7d7 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_dscp_id.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_dscp_id.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_ipv6_policy.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_ipv6_policy.py index 4b666d62..bf01e712 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_ipv6_policy.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_ipv6_policy.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_label.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_label.py index 8f141c05..380af80a 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_label.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_label.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class TestLabel(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class TestLabel(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_links.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_links.py index 1b7d30d6..334ae932 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_links.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_links.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class TestLinks(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class TestLinks(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_page_loading_strategy.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_page_loading_strategy.py index b60b52df..86afbbd9 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_page_loading_strategy.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_page_loading_strategy.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_path_trace_mode.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_path_trace_mode.py index fa5ea1cd..792a3dfd 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_path_trace_mode.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_path_trace_mode.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_probe_mode.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_probe_mode.py index a20f4d49..69bf8282 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_probe_mode.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_probe_mode.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_protocol.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_protocol.py index e9e7dac2..9e163bcd 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_protocol.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_protocol.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_self_link.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_self_link.py index e8947e13..77e90912 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_self_link.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_self_link.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -40,6 +40,7 @@ class TestSelfLink(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -50,7 +51,7 @@ class TestSelfLink(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_sip_credentials.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_sip_credentials.py index d3fce4ae..5dec4072 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_sip_credentials.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_sip_credentials.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -40,6 +40,7 @@ class TestSipCredentials(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -50,7 +51,7 @@ class TestSipCredentials(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_ssl_version_id.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_ssl_version_id.py index 2431d85f..cb5f1dc9 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_ssl_version_id.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_ssl_version_id.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_type.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_type.py index 98c5411c..56652d6c 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_type.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/test_type.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -26,6 +26,7 @@ class TestType(str, Enum): """ allowed enum values """ + API = 'api' AGENT_MINUS_TO_MINUS_AGENT = 'agent-to-agent' AGENT_MINUS_TO_MINUS_SERVER = 'agent-to-server' BGP = 'bgp' diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/unauthorized_error.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/unauthorized_error.py index 77f0e4c5..9c470f8b 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/unauthorized_error.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/unauthorized_error.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class UnauthorizedError(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class UnauthorizedError(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/unexpanded_instant_test.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/unexpanded_instant_test.py index 6f86f623..432dc465 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/unexpanded_instant_test.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/unexpanded_instant_test.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -46,6 +46,7 @@ class UnexpandedInstantTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -56,7 +57,7 @@ class UnexpandedInstantTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/validation_error.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/validation_error.py index ef6d45f5..8ce44783 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/validation_error.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/validation_error.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -39,6 +39,7 @@ class ValidationError(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -49,7 +50,7 @@ class ValidationError(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/validation_error_item.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/validation_error_item.py index 818a3fd7..fbfd86eb 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/validation_error_item.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/validation_error_item.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,7 +17,7 @@ import pprint import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +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 @@ -27,7 +27,7 @@ class ValidationErrorItem(BaseModel): ValidationErrorItem """ # noqa: E501 code: Optional[StrictStr] = Field(default=None, description="(Optional) A unique error type/code that can be referenced in the documentation for further details.") - var_field: Optional[StrictInt] = Field(default=None, description="Identifies the field that triggered this particular error.", alias="field") + var_field: Optional[StrictStr] = Field(default=None, description="Identifies the field that triggered this particular error.", alias="field") message: Optional[StrictStr] = Field(default=None, description="A short, human-readable summary of the error.") __properties: ClassVar[List[str]] = ["code", "field", "message"] @@ -35,6 +35,7 @@ class ValidationErrorItem(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class ValidationErrorItem(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/voice_instant_test.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/voice_instant_test.py index 78183fb4..2d382d65 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/voice_instant_test.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/voice_instant_test.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -62,6 +62,7 @@ class VoiceInstantTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -72,7 +73,7 @@ class VoiceInstantTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/voice_instant_test_request.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/voice_instant_test_request.py index 5beed36c..10b2c1f6 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/voice_instant_test_request.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/voice_instant_test_request.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -60,6 +60,7 @@ class VoiceInstantTestRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -70,7 +71,7 @@ class VoiceInstantTestRequest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/voice_properties.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/voice_properties.py index 36108e0d..10fb6c78 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/voice_properties.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/voice_properties.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -44,6 +44,7 @@ class VoiceProperties(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -54,7 +55,7 @@ class VoiceProperties(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/web_transaction_instant_test.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/web_transaction_instant_test.py index cb9263fe..2aa9e3c9 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/web_transaction_instant_test.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/web_transaction_instant_test.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -59,7 +59,7 @@ class WebTransactionInstantTest(BaseModel): custom_headers: Optional[TestCustomHeaders] = Field(default=None, alias="customHeaders") desired_status_code: Optional[StrictStr] = Field(default='200', description="Specify the HTTP status code value that indicates a successful response.", alias="desiredStatusCode") emulated_device_id: Optional[StrictStr] = Field(default=None, description="id of the emulated device, if one was given when the test was created", alias="emulatedDeviceId") - follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to false.", alias="followRedirects") + follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`.", alias="followRedirects") http_target_time: Optional[Annotated[int, Field(le=5000, strict=True, ge=100)]] = Field(default=None, description="Target time for HTTP server completion, specified in milliseconds.", alias="httpTargetTime") http_time_limit: Optional[Annotated[int, Field(le=60, strict=True, ge=5)]] = Field(default=5, description="HTTP time limit in seconds.", alias="httpTimeLimit") http_version: Optional[Annotated[int, Field(le=2, strict=True, ge=1)]] = Field(default=2, description="HTTP protocol version. Set to '2' to prefer HTTP/2, or '1' to use only HTTP/1.1.", alias="httpVersion") @@ -97,6 +97,7 @@ class WebTransactionInstantTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -107,7 +108,7 @@ class WebTransactionInstantTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/web_transaction_instant_test_request.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/web_transaction_instant_test_request.py index dda73563..696e44bf 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/web_transaction_instant_test_request.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/web_transaction_instant_test_request.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -57,7 +57,7 @@ class WebTransactionInstantTestRequest(BaseModel): custom_headers: Optional[TestCustomHeaders] = Field(default=None, alias="customHeaders") desired_status_code: Optional[StrictStr] = Field(default='200', description="Specify the HTTP status code value that indicates a successful response.", alias="desiredStatusCode") emulated_device_id: Optional[StrictStr] = Field(default=None, description="id of the emulated device, if one was given when the test was created", alias="emulatedDeviceId") - follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to false.", alias="followRedirects") + follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`.", alias="followRedirects") http_target_time: Optional[Annotated[int, Field(le=5000, strict=True, ge=100)]] = Field(default=None, description="Target time for HTTP server completion, specified in milliseconds.", alias="httpTargetTime") http_time_limit: Optional[Annotated[int, Field(le=60, strict=True, ge=5)]] = Field(default=5, description="HTTP time limit in seconds.", alias="httpTimeLimit") http_version: Optional[Annotated[int, Field(le=2, strict=True, ge=1)]] = Field(default=2, description="HTTP protocol version. Set to '2' to prefer HTTP/2, or '1' to use only HTTP/1.1.", alias="httpVersion") @@ -95,6 +95,7 @@ class WebTransactionInstantTestRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -105,7 +106,7 @@ class WebTransactionInstantTestRequest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/web_transaction_properties.py b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/web_transaction_properties.py index 098d4160..1e758a0a 100644 --- a/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/web_transaction_properties.py +++ b/thousandeyes-sdk-instant-tests/src/thousandeyes_sdk/instant_tests/models/web_transaction_properties.py @@ -5,7 +5,7 @@ The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -41,7 +41,7 @@ class WebTransactionProperties(BaseModel): custom_headers: Optional[TestCustomHeaders] = Field(default=None, alias="customHeaders") desired_status_code: Optional[StrictStr] = Field(default='200', description="Specify the HTTP status code value that indicates a successful response.", alias="desiredStatusCode") emulated_device_id: Optional[StrictStr] = Field(default=None, description="id of the emulated device, if one was given when the test was created", alias="emulatedDeviceId") - follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to false.", alias="followRedirects") + follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`.", alias="followRedirects") http_target_time: Optional[Annotated[int, Field(le=5000, strict=True, ge=100)]] = Field(default=None, description="Target time for HTTP server completion, specified in milliseconds.", alias="httpTargetTime") http_time_limit: Optional[Annotated[int, Field(le=60, strict=True, ge=5)]] = Field(default=5, description="HTTP time limit in seconds.", alias="httpTimeLimit") http_version: Optional[Annotated[int, Field(le=2, strict=True, ge=1)]] = Field(default=2, description="HTTP protocol version. Set to '2' to prefer HTTP/2, or '1' to use only HTTP/1.1.", alias="httpVersion") @@ -78,6 +78,7 @@ class WebTransactionProperties(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -88,7 +89,7 @@ class WebTransactionProperties(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-instant-tests/test/test_agent_to_agent_api.py b/thousandeyes-sdk-instant-tests/test/test_agent_to_agent_api.py new file mode 100644 index 00000000..1c17a5cd --- /dev/null +++ b/thousandeyes-sdk-instant-tests/test/test_agent_to_agent_api.py @@ -0,0 +1,182 @@ +# coding: utf-8 + +""" + Instant Tests API + + The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.instant_tests.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.instant_tests.api.agent_to_agent_api import AgentToAgentApi + + +class TestAgentToAgentApi(unittest.TestCase): + """AgentToAgentApi unit test stubs""" + + def setUp(self) -> None: + self.api = AgentToAgentApi() + + def tearDown(self) -> None: + pass + + def test_create_agent_to_agent_instant_test_models_validation(self) -> None: + """Test case for create_agent_to_agent_instant_test request and response models""" + request_body_json = """ + { + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "description" : "ThousandEyes Test", + "type" : "agent-to-agent", + "mss" : 100, + "dscpId" : "0", + "protocol" : "tcp", + "fixedPacketRate" : 50, + "dscp" : "Best Effort (DSCP 0)", + "pathTraceMode" : "classic", + "throughputRate" : 10, + "modifiedBy" : "user@user.com", + "testName" : "ThousandEyes Test", + "direction" : "to-target", + "throughputMeasurements" : false, + "numPathTraces" : 3, + "liveShare" : false, + "savedEvent" : true, + "throughputDuration" : 10000, + "labels" : [ "9842", "1283" ], + "agents" : [ { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + }, { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "port" : 49153, + "modifiedDate" : "2022-07-17T22:00:54Z", + "targetAgentId" : "2954", + "testId" : "281474976710706", + "sharedWithAccounts" : [ "1234", "12345" ] + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.instant_tests.models.AgentToAgentInstantTestRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "description" : "ThousandEyes Test", + "type" : "agent-to-agent", + "mss" : 100, + "dscpId" : "0", + "protocol" : "tcp", + "fixedPacketRate" : 50, + "dscp" : "Best Effort (DSCP 0)", + "pathTraceMode" : "classic", + "throughputRate" : 10, + "modifiedBy" : "user@user.com", + "testName" : "ThousandEyes Test", + "direction" : "to-target", + "throughputMeasurements" : false, + "numPathTraces" : 3, + "liveShare" : false, + "savedEvent" : true, + "throughputDuration" : 10000, + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "agents" : [ { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + }, { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "port" : 49153, + "modifiedDate" : "2022-07-17T22:00:54Z", + "targetAgentId" : "2954", + "testId" : "281474976710706", + "sharedWithAccounts" : [ { + "name" : "Account name", + "aid" : "1234" + }, { + "name" : "Account name", + "aid" : "1234" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.instant_tests.models.AgentToAgentInstantTest.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-instant-tests/test/test_agent_to_server_api.py b/thousandeyes-sdk-instant-tests/test/test_agent_to_server_api.py new file mode 100644 index 00000000..c1350400 --- /dev/null +++ b/thousandeyes-sdk-instant-tests/test/test_agent_to_server_api.py @@ -0,0 +1,186 @@ +# coding: utf-8 + +""" + Instant Tests API + + The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.instant_tests.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.instant_tests.api.agent_to_server_api import AgentToServerApi + + +class TestAgentToServerApi(unittest.TestCase): + """AgentToServerApi unit test stubs""" + + def setUp(self) -> None: + self.api = AgentToServerApi() + + def tearDown(self) -> None: + pass + + def test_create_agent_to_server_instant_test_models_validation(self) -> None: + """Test case for create_agent_to_server_instant_test request and response models""" + request_body_json = """ + { + "server" : "www.thousandeyes.com", + "mtuMeasurements" : false, + "ipv6Policy" : "use-agent-policy", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "bandwidthMeasurements" : true, + "description" : "ThousandEyes Test", + "probeMode" : "auto", + "type" : "agent-to-server", + "dscpId" : "0", + "fixedPacketRate" : 25, + "protocol" : "tcp", + "dscp" : "Best Effort (DSCP 0)", + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "testName" : "ThousandEyes Test", + "numPathTraces" : 3, + "liveShare" : false, + "savedEvent" : true, + "networkMeasurements" : false, + "labels" : [ "9842", "1283" ], + "agents" : [ { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + }, { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "port" : 49153, + "modifiedDate" : "2022-07-17T22:00:54Z", + "testId" : "281474976710706", + "sharedWithAccounts" : [ "1234", "12345" ], + "pingPayloadSize" : 112, + "continuousMode" : false + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.instant_tests.models.AgentToServerInstantTestRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "server" : "www.thousandeyes.com", + "mtuMeasurements" : false, + "ipv6Policy" : "use-agent-policy", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "bandwidthMeasurements" : true, + "description" : "ThousandEyes Test", + "probeMode" : "auto", + "type" : "agent-to-server", + "dscpId" : "0", + "fixedPacketRate" : 25, + "protocol" : "tcp", + "dscp" : "Best Effort (DSCP 0)", + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "testName" : "ThousandEyes Test", + "numPathTraces" : 3, + "liveShare" : false, + "savedEvent" : true, + "networkMeasurements" : false, + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "agents" : [ { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + }, { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "port" : 49153, + "modifiedDate" : "2022-07-17T22:00:54Z", + "testId" : "281474976710706", + "sharedWithAccounts" : [ { + "name" : "Account name", + "aid" : "1234" + }, { + "name" : "Account name", + "aid" : "1234" + } ], + "pingPayloadSize" : 112, + "continuousMode" : false + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.instant_tests.models.AgentToServerInstantTest.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-instant-tests/test/test_api_api.py b/thousandeyes-sdk-instant-tests/test/test_api_api.py new file mode 100644 index 00000000..d5ad155a --- /dev/null +++ b/thousandeyes-sdk-instant-tests/test/test_api_api.py @@ -0,0 +1,332 @@ +# coding: utf-8 + +""" + Instant Tests API + + The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.instant_tests.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.instant_tests.api.api_api import APIApi + + +class TestAPIApi(unittest.TestCase): + """APIApi unit test stubs""" + + def setUp(self) -> None: + self.api = APIApi() + + def tearDown(self) -> None: + pass + + def test_create_api_instant_test_models_validation(self) -> None: + """Test case for create_api_instant_test request and response models""" + request_body_json = """ + { + "mtuMeasurements" : false, + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "credentials" : [ "3247", "1051" ], + "description" : "ThousandEyes Test", + "probeMode" : "auto", + "requests" : [ { + "headers" : [ { + "value" : "keep-alive", + "key" : "x-custom-header" + }, { + "value" : "keep-alive", + "key" : "x-custom-header" + } ], + "variables" : [ { + "name" : "myTestName", + "value" : "tests[0].name" + }, { + "name" : "myTestName", + "value" : "tests[0].name" + } ], + "method" : "get", + "body" : "body", + "url" : "https://api.thousandeyes.com/v7/status", + "password" : "basic_pw123", + "bearerToken" : "abcd-1234-...", + "name" : "Step 1", + "waitTimeMs" : 0, + "assertions" : [ { + "name" : "status-code", + "value" : "200", + "operator" : "is" + }, { + "name" : "status-code", + "value" : "200", + "operator" : "is" + } ], + "authType" : "none", + "collectApiResponse" : true, + "username" : "ThousandEyesUserName" + }, { + "headers" : [ { + "value" : "keep-alive", + "key" : "x-custom-header" + }, { + "value" : "keep-alive", + "key" : "x-custom-header" + } ], + "variables" : [ { + "name" : "myTestName", + "value" : "tests[0].name" + }, { + "name" : "myTestName", + "value" : "tests[0].name" + } ], + "method" : "get", + "body" : "body", + "url" : "https://api.thousandeyes.com/v7/status", + "password" : "basic_pw123", + "bearerToken" : "abcd-1234-...", + "name" : "Step 1", + "waitTimeMs" : 0, + "assertions" : [ { + "name" : "status-code", + "value" : "200", + "operator" : "is" + }, { + "name" : "status-code", + "value" : "200", + "operator" : "is" + } ], + "authType" : "none", + "collectApiResponse" : true, + "username" : "ThousandEyesUserName" + } ], + "type" : "api", + "protocol" : "tcp", + "followRedirects" : true, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "testName" : "ThousandEyes Test", + "numPathTraces" : 3, + "predefinedVariables" : [ { + "name" : "myUsername", + "value" : "ThousandEyesAccountUserName" + }, { + "name" : "myUsername", + "value" : "ThousandEyesAccountUserName" + } ], + "liveShare" : false, + "savedEvent" : true, + "networkMeasurements" : true, + "url" : "www.thousandeyes.com", + "labels" : [ "9842", "1283" ], + "agents" : [ { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + }, { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + } ], + "timeLimit" : 19, + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "testId" : "281474976710706", + "sharedWithAccounts" : [ "1234", "12345" ], + "sslVersionId" : "0", + "targetTime" : 1 + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.instant_tests.models.ApiInstantTestRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "mtuMeasurements" : false, + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "credentials" : [ "3247", "1051" ], + "description" : "ThousandEyes Test", + "probeMode" : "auto", + "requests" : [ { + "headers" : [ { + "value" : "keep-alive", + "key" : "x-custom-header" + }, { + "value" : "keep-alive", + "key" : "x-custom-header" + } ], + "variables" : [ { + "name" : "myTestName", + "value" : "tests[0].name" + }, { + "name" : "myTestName", + "value" : "tests[0].name" + } ], + "method" : "get", + "body" : "body", + "url" : "https://api.thousandeyes.com/v7/status", + "password" : "basic_pw123", + "bearerToken" : "abcd-1234-...", + "name" : "Step 1", + "waitTimeMs" : 0, + "assertions" : [ { + "name" : "status-code", + "value" : "200", + "operator" : "is" + }, { + "name" : "status-code", + "value" : "200", + "operator" : "is" + } ], + "authType" : "none", + "collectApiResponse" : true, + "username" : "ThousandEyesUserName" + }, { + "headers" : [ { + "value" : "keep-alive", + "key" : "x-custom-header" + }, { + "value" : "keep-alive", + "key" : "x-custom-header" + } ], + "variables" : [ { + "name" : "myTestName", + "value" : "tests[0].name" + }, { + "name" : "myTestName", + "value" : "tests[0].name" + } ], + "method" : "get", + "body" : "body", + "url" : "https://api.thousandeyes.com/v7/status", + "password" : "basic_pw123", + "bearerToken" : "abcd-1234-...", + "name" : "Step 1", + "waitTimeMs" : 0, + "assertions" : [ { + "name" : "status-code", + "value" : "200", + "operator" : "is" + }, { + "name" : "status-code", + "value" : "200", + "operator" : "is" + } ], + "authType" : "none", + "collectApiResponse" : true, + "username" : "ThousandEyesUserName" + } ], + "type" : "api", + "protocol" : "tcp", + "followRedirects" : true, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "testName" : "ThousandEyes Test", + "numPathTraces" : 3, + "predefinedVariables" : [ { + "name" : "myUsername", + "value" : "ThousandEyesAccountUserName" + }, { + "name" : "myUsername", + "value" : "ThousandEyesAccountUserName" + } ], + "liveShare" : false, + "savedEvent" : true, + "networkMeasurements" : true, + "url" : "www.thousandeyes.com", + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "agents" : [ { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + }, { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + } ], + "timeLimit" : 19, + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "testId" : "281474976710706", + "sharedWithAccounts" : [ { + "name" : "Account name", + "aid" : "1234" + }, { + "name" : "Account name", + "aid" : "1234" + } ], + "sslVersionId" : "0", + "targetTime" : 1 + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.instant_tests.models.ApiInstantTest.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-instant-tests/test/test_dns_security_api.py b/thousandeyes-sdk-instant-tests/test/test_dns_security_api.py new file mode 100644 index 00000000..aa16f08e --- /dev/null +++ b/thousandeyes-sdk-instant-tests/test/test_dns_security_api.py @@ -0,0 +1,160 @@ +# coding: utf-8 + +""" + Instant Tests API + + The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.instant_tests.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.instant_tests.api.dns_security_api import DNSSecurityApi + + +class TestDNSSecurityApi(unittest.TestCase): + """DNSSecurityApi unit test stubs""" + + def setUp(self) -> None: + self.api = DNSSecurityApi() + + def tearDown(self) -> None: + pass + + def test_create_dns_sec_instant_test_models_validation(self) -> None: + """Test case for create_dns_sec_instant_test request and response models""" + request_body_json = """ + { + "dnsQueryClass" : "in", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "savedEvent" : true, + "description" : "ThousandEyes Test", + "type" : "dnssec", + "labels" : [ "9842", "1283" ], + "agents" : [ { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + }, { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "domain" : "www.thousandeyes.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "sharedWithAccounts" : [ "1234", "12345" ], + "testName" : "ThousandEyes Test" + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.instant_tests.models.DnsSecInstantTestRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "dnsQueryClass" : "in", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "savedEvent" : true, + "description" : "ThousandEyes Test", + "type" : "dnssec", + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "agents" : [ { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + }, { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "domain" : "www.thousandeyes.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "sharedWithAccounts" : [ { + "name" : "Account name", + "aid" : "1234" + }, { + "name" : "Account name", + "aid" : "1234" + } ], + "testName" : "ThousandEyes Test" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.instant_tests.models.DnsSecInstantTest.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-instant-tests/test/test_dns_server_api.py b/thousandeyes-sdk-instant-tests/test/test_dns_server_api.py new file mode 100644 index 00000000..ab1984af --- /dev/null +++ b/thousandeyes-sdk-instant-tests/test/test_dns_server_api.py @@ -0,0 +1,190 @@ +# coding: utf-8 + +""" + Instant Tests API + + The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.instant_tests.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.instant_tests.api.dns_server_api import DNSServerApi + + +class TestDNSServerApi(unittest.TestCase): + """DNSServerApi unit test stubs""" + + def setUp(self) -> None: + self.api = DNSServerApi() + + def tearDown(self) -> None: + pass + + def test_create_dns_server_instant_test_models_validation(self) -> None: + """Test case for create_dns_server_instant_test request and response models""" + request_body_json = """ + { + "mtuMeasurements" : false, + "ipv6Policy" : "use-agent-policy", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "bandwidthMeasurements" : true, + "description" : "ThousandEyes Test", + "dnsTransportProtocol" : "udp", + "probeMode" : "auto", + "type" : "dns-server", + "protocol" : "tcp", + "fixedPacketRate" : 50, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "dnsServers" : [ "dns-example.net", "8.8.8.8" ], + "recursiveQueries" : true, + "testName" : "ThousandEyes Test", + "numPathTraces" : 3, + "dnsQueryClass" : "in", + "liveShare" : false, + "savedEvent" : true, + "networkMeasurements" : true, + "labels" : [ "9842", "1283" ], + "agents" : [ { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + }, { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "domain" : "www.thousandeyes.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "testId" : "281474976710706", + "sharedWithAccounts" : [ "1234", "12345" ] + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.instant_tests.models.DnsServerInstantTestRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "mtuMeasurements" : false, + "ipv6Policy" : "use-agent-policy", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "bandwidthMeasurements" : true, + "description" : "ThousandEyes Test", + "dnsTransportProtocol" : "udp", + "probeMode" : "auto", + "type" : "dns-server", + "protocol" : "tcp", + "fixedPacketRate" : 50, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "dnsServers" : [ { + "serverName" : "dns-example.net", + "serverId" : "1447" + }, { + "serverName" : "dns-example.net", + "serverId" : "1447" + } ], + "recursiveQueries" : true, + "testName" : "ThousandEyes Test", + "numPathTraces" : 3, + "dnsQueryClass" : "in", + "liveShare" : false, + "savedEvent" : true, + "networkMeasurements" : true, + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "agents" : [ { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + }, { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "domain" : "www.thousandeyes.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "testId" : "281474976710706", + "sharedWithAccounts" : [ { + "name" : "Account name", + "aid" : "1234" + }, { + "name" : "Account name", + "aid" : "1234" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.instant_tests.models.DnsServerInstantTest.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-instant-tests/test/test_dns_trace_api.py b/thousandeyes-sdk-instant-tests/test/test_dns_trace_api.py new file mode 100644 index 00000000..4d556908 --- /dev/null +++ b/thousandeyes-sdk-instant-tests/test/test_dns_trace_api.py @@ -0,0 +1,162 @@ +# coding: utf-8 + +""" + Instant Tests API + + The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.instant_tests.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.instant_tests.api.dns_trace_api import DNSTraceApi + + +class TestDNSTraceApi(unittest.TestCase): + """DNSTraceApi unit test stubs""" + + def setUp(self) -> None: + self.api = DNSTraceApi() + + def tearDown(self) -> None: + pass + + def test_create_dns_trace_instant_test_models_validation(self) -> None: + """Test case for create_dns_trace_instant_test request and response models""" + request_body_json = """ + { + "dnsQueryClass" : "in", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "savedEvent" : true, + "description" : "ThousandEyes Test", + "dnsTransportProtocol" : "udp", + "type" : "dns-trace", + "labels" : [ "9842", "1283" ], + "agents" : [ { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + }, { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "domain" : "www.thousandeyes.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "sharedWithAccounts" : [ "1234", "12345" ], + "testName" : "ThousandEyes Test" + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.instant_tests.models.DnsTraceInstantTestRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "dnsQueryClass" : "in", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "savedEvent" : true, + "description" : "ThousandEyes Test", + "dnsTransportProtocol" : "udp", + "type" : "dns-trace", + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "agents" : [ { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + }, { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "domain" : "www.thousandeyes.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "sharedWithAccounts" : [ { + "name" : "Account name", + "aid" : "1234" + }, { + "name" : "Account name", + "aid" : "1234" + } ], + "testName" : "ThousandEyes Test" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.instant_tests.models.DnsTraceInstantTest.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-instant-tests/test/test_ftp_server_api.py b/thousandeyes-sdk-instant-tests/test/test_ftp_server_api.py new file mode 100644 index 00000000..a67e9106 --- /dev/null +++ b/thousandeyes-sdk-instant-tests/test/test_ftp_server_api.py @@ -0,0 +1,192 @@ +# coding: utf-8 + +""" + Instant Tests API + + The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.instant_tests.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.instant_tests.api.ftp_server_api import FTPServerApi + + +class TestFTPServerApi(unittest.TestCase): + """FTPServerApi unit test stubs""" + + def setUp(self) -> None: + self.api = FTPServerApi() + + def tearDown(self) -> None: + pass + + def test_create_ftp_server_instant_test_models_validation(self) -> None: + """Test case for create_ftp_server_instant_test request and response models""" + request_body_json = """ + { + "mtuMeasurements" : false, + "ipv6Policy" : "use-agent-policy", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "downloadLimit" : 1048576, + "bandwidthMeasurements" : true, + "description" : "ThousandEyes Test", + "useExplicitFtps" : false, + "probeMode" : "auto", + "type" : "ftp-server", + "password" : "password", + "protocol" : "tcp", + "fixedPacketRate" : 50, + "ftpTargetTime" : 1400, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "testName" : "ThousandEyes Test", + "numPathTraces" : 3, + "requestType" : "download", + "liveShare" : false, + "savedEvent" : true, + "networkMeasurements" : true, + "url" : "www.thousandeyes.com", + "labels" : [ "9842", "1283" ], + "agents" : [ { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + }, { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "ftpTimeLimit" : 10, + "modifiedDate" : "2022-07-17T22:00:54Z", + "testId" : "281474976710706", + "sharedWithAccounts" : [ "1234", "12345" ], + "useActiveFtp" : false, + "username" : "username" + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.instant_tests.models.ServerInstantTestRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "mtuMeasurements" : false, + "ipv6Policy" : "use-agent-policy", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "downloadLimit" : 1048576, + "bandwidthMeasurements" : true, + "description" : "ThousandEyes Test", + "useExplicitFtps" : false, + "probeMode" : "auto", + "type" : "ftp-server", + "password" : "password", + "protocol" : "tcp", + "fixedPacketRate" : 50, + "ftpTargetTime" : 1400, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "testName" : "ThousandEyes Test", + "numPathTraces" : 3, + "requestType" : "download", + "liveShare" : false, + "savedEvent" : true, + "networkMeasurements" : true, + "url" : "www.thousandeyes.com", + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "agents" : [ { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + }, { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "ftpTimeLimit" : 10, + "modifiedDate" : "2022-07-17T22:00:54Z", + "testId" : "281474976710706", + "sharedWithAccounts" : [ { + "name" : "Account name", + "aid" : "1234" + }, { + "name" : "Account name", + "aid" : "1234" + } ], + "useActiveFtp" : false, + "username" : "username" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.instant_tests.models.FtpServerInstantTest.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-instant-tests/test/test_http_page_load_api.py b/thousandeyes-sdk-instant-tests/test/test_http_page_load_api.py new file mode 100644 index 00000000..ea658e42 --- /dev/null +++ b/thousandeyes-sdk-instant-tests/test/test_http_page_load_api.py @@ -0,0 +1,252 @@ +# coding: utf-8 + +""" + Instant Tests API + + The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.instant_tests.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.instant_tests.api.http_page_load_api import HTTPPageLoadApi + + +class TestHTTPPageLoadApi(unittest.TestCase): + """HTTPPageLoadApi unit test stubs""" + + def setUp(self) -> None: + self.api = HTTPPageLoadApi() + + def tearDown(self) -> None: + pass + + def test_create_page_load_instant_test_models_validation(self) -> None: + """Test case for create_page_load_instant_test request and response models""" + request_body_json = """ + { + "clientCertificate" : "-----BEGIN PRIVATE KEY-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END PRIVATE KEY-----\\n-----BEGIN CERTIFICATE-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END CERTIFICATE-----\\n", + "mtuMeasurements" : false, + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "bandwidthMeasurements" : true, + "probeMode" : "auto", + "includeHeaders" : true, + "type" : "page-load", + "password" : "password", + "protocol" : "tcp", + "followRedirects" : true, + "contentRegex" : "(regex)+", + "pageLoadingStrategy" : "normal", + "testName" : "ThousandEyes Test", + "allowMicAndCamera" : false, + "browserLanguage" : "en-US", + "verifyCertificate" : false, + "liveShare" : false, + "labels" : [ "9842", "1283" ], + "modifiedDate" : "2022-07-17T22:00:54Z", + "emulatedDeviceId" : "2", + "sharedWithAccounts" : [ "1234", "12345" ], + "sslVersion" : "Auto", + "useNtlm" : false, + "description" : "ThousandEyes Test", + "httpTimeLimit" : 5, + "blockDomains" : "domain.com/", + "allowGeolocation" : false, + "allowUnsafeLegacyRenegotiation" : true, + "fixedPacketRate" : 50, + "httpVersion" : 2, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "authType" : "none", + "customHeaders" : { + "root" : { + "header1" : "value1" + }, + "domains" : { + "domain1.com" : { + "header2" : "value2" + } + }, + "all" : { + "header3" : "value3" + } + }, + "pageLoadTargetTime" : 10, + "numPathTraces" : 3, + "savedEvent" : true, + "pageLoadTimeLimit" : 10, + "userAgent" : "curl", + "networkMeasurements" : true, + "url" : "www.thousandeyes.com", + "agents" : [ { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + }, { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "disableScreenshot" : false, + "createdBy" : "user@user.com", + "testId" : "281474976710706", + "desiredStatusCode" : "200", + "httpTargetTime" : 100, + "sslVersionId" : "0", + "username" : "username" + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.instant_tests.models.PageLoadInstantTestRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "clientCertificate" : "-----BEGIN PRIVATE KEY-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END PRIVATE KEY-----\\n-----BEGIN CERTIFICATE-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END CERTIFICATE-----\\n", + "mtuMeasurements" : false, + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "bandwidthMeasurements" : true, + "probeMode" : "auto", + "includeHeaders" : true, + "type" : "page-load", + "password" : "password", + "protocol" : "tcp", + "followRedirects" : true, + "contentRegex" : "(regex)+", + "pageLoadingStrategy" : "normal", + "testName" : "ThousandEyes Test", + "allowMicAndCamera" : false, + "browserLanguage" : "en-US", + "verifyCertificate" : false, + "liveShare" : false, + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "modifiedDate" : "2022-07-17T22:00:54Z", + "emulatedDeviceId" : "2", + "sharedWithAccounts" : [ { + "name" : "Account name", + "aid" : "1234" + }, { + "name" : "Account name", + "aid" : "1234" + } ], + "sslVersion" : "Auto", + "useNtlm" : false, + "description" : "ThousandEyes Test", + "httpTimeLimit" : 5, + "blockDomains" : "domain.com/", + "allowGeolocation" : false, + "allowUnsafeLegacyRenegotiation" : true, + "fixedPacketRate" : 50, + "httpVersion" : 2, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "authType" : "none", + "customHeaders" : { + "root" : { + "header1" : "value1" + }, + "domains" : { + "domain1.com" : { + "header2" : "value2" + } + }, + "all" : { + "header3" : "value3" + } + }, + "pageLoadTargetTime" : 10, + "numPathTraces" : 3, + "savedEvent" : true, + "pageLoadTimeLimit" : 10, + "userAgent" : "curl", + "networkMeasurements" : true, + "url" : "www.thousandeyes.com", + "agents" : [ { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + }, { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "disableScreenshot" : false, + "createdBy" : "user@user.com", + "testId" : "281474976710706", + "desiredStatusCode" : "200", + "httpTargetTime" : 100, + "sslVersionId" : "0", + "username" : "username" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.instant_tests.models.PageLoadInstantTest.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-instant-tests/test/test_http_server_api.py b/thousandeyes-sdk-instant-tests/test/test_http_server_api.py new file mode 100644 index 00000000..2dd3eea5 --- /dev/null +++ b/thousandeyes-sdk-instant-tests/test/test_http_server_api.py @@ -0,0 +1,244 @@ +# coding: utf-8 + +""" + Instant Tests API + + The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.instant_tests.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.instant_tests.api.http_server_api import HTTPServerApi + + +class TestHTTPServerApi(unittest.TestCase): + """HTTPServerApi unit test stubs""" + + def setUp(self) -> None: + self.api = HTTPServerApi() + + def tearDown(self) -> None: + pass + + def test_create_http_server_instant_test_models_validation(self) -> None: + """Test case for create_http_server_instant_test request and response models""" + request_body_json = """ + { + "clientCertificate" : "-----BEGIN PRIVATE KEY-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END PRIVATE KEY-----\\n-----BEGIN CERTIFICATE-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END CERTIFICATE-----\\n", + "mtuMeasurements" : false, + "sslVersion" : "Auto", + "useNtlm" : false, + "ipv6Policy" : "use-agent-policy", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "downloadLimit" : 2048, + "dnsOverride" : "8.8.8.8", + "bandwidthMeasurements" : true, + "description" : "ThousandEyes Test", + "httpTimeLimit" : 5, + "probeMode" : "auto", + "includeHeaders" : true, + "type" : "http-server", + "password" : "password", + "protocol" : "tcp", + "allowUnsafeLegacyRenegotiation" : true, + "fixedPacketRate" : 50, + "httpVersion" : 2, + "followRedirects" : true, + "pathTraceMode" : "classic", + "contentRegex" : "(regex)+", + "modifiedBy" : "user@user.com", + "authType" : "none", + "customHeaders" : { + "root" : { + "header1" : "value1" + }, + "domains" : { + "domain1.com" : { + "header2" : "value2" + } + }, + "all" : { + "header3" : "value3" + } + }, + "testName" : "ThousandEyes Test", + "headers" : [ "header1: value1", "header2: value2" ], + "numPathTraces" : 3, + "verifyCertificate" : false, + "liveShare" : false, + "savedEvent" : true, + "userAgent" : "curl", + "networkMeasurements" : true, + "url" : "www.thousandeyes.com", + "labels" : [ "9842", "1283" ], + "agents" : [ { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + }, { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "postBody" : "{ \\"example\\" : \\"value\\"}", + "createdBy" : "user@user.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "testId" : "281474976710706", + "sharedWithAccounts" : [ "1234", "12345" ], + "desiredStatusCode" : "200", + "httpTargetTime" : 100, + "sslVersionId" : "0", + "username" : "username" + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.instant_tests.models.HttpServerInstantTestRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "clientCertificate" : "-----BEGIN PRIVATE KEY-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END PRIVATE KEY-----\\n-----BEGIN CERTIFICATE-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END CERTIFICATE-----\\n", + "mtuMeasurements" : false, + "sslVersion" : "Auto", + "useNtlm" : false, + "ipv6Policy" : "use-agent-policy", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "downloadLimit" : 2048, + "dnsOverride" : "8.8.8.8", + "bandwidthMeasurements" : true, + "description" : "ThousandEyes Test", + "httpTimeLimit" : 5, + "probeMode" : "auto", + "includeHeaders" : true, + "type" : "http-server", + "password" : "password", + "protocol" : "tcp", + "allowUnsafeLegacyRenegotiation" : true, + "fixedPacketRate" : 50, + "httpVersion" : 2, + "followRedirects" : true, + "pathTraceMode" : "classic", + "contentRegex" : "(regex)+", + "modifiedBy" : "user@user.com", + "authType" : "none", + "customHeaders" : { + "root" : { + "header1" : "value1" + }, + "domains" : { + "domain1.com" : { + "header2" : "value2" + } + }, + "all" : { + "header3" : "value3" + } + }, + "testName" : "ThousandEyes Test", + "headers" : [ "header1: value1", "header2: value2" ], + "numPathTraces" : 3, + "verifyCertificate" : false, + "liveShare" : false, + "savedEvent" : true, + "userAgent" : "curl", + "networkMeasurements" : true, + "url" : "www.thousandeyes.com", + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "agents" : [ { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + }, { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "postBody" : "{ \\"example\\" : \\"value\\"}", + "createdBy" : "user@user.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "testId" : "281474976710706", + "sharedWithAccounts" : [ { + "name" : "Account name", + "aid" : "1234" + }, { + "name" : "Account name", + "aid" : "1234" + } ], + "desiredStatusCode" : "200", + "httpTargetTime" : 100, + "sslVersionId" : "0", + "username" : "username" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.instant_tests.models.HttpServerInstantTest.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-instant-tests/test/test_run_api.py b/thousandeyes-sdk-instant-tests/test/test_run_api.py new file mode 100644 index 00000000..02f8d9b7 --- /dev/null +++ b/thousandeyes-sdk-instant-tests/test/test_run_api.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Instant Tests API + + The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.instant_tests.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.instant_tests.api.run_api import RunApi + + +class TestRunApi(unittest.TestCase): + """RunApi unit test stubs""" + + def setUp(self) -> None: + self.api = RunApi() + + def tearDown(self) -> None: + pass + + def test_run_instant_test_models_validation(self) -> None: + """Test case for run_instant_test request and response models""" + + + +if __name__ == '__main__': + unittest.main() diff --git a/thousandeyes-sdk-instant-tests/test/test_sip_server_api.py b/thousandeyes-sdk-instant-tests/test/test_sip_server_api.py new file mode 100644 index 00000000..1fca8713 --- /dev/null +++ b/thousandeyes-sdk-instant-tests/test/test_sip_server_api.py @@ -0,0 +1,192 @@ +# coding: utf-8 + +""" + Instant Tests API + + The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.instant_tests.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.instant_tests.api.sip_server_api import SIPServerApi + + +class TestSIPServerApi(unittest.TestCase): + """SIPServerApi unit test stubs""" + + def setUp(self) -> None: + self.api = SIPServerApi() + + def tearDown(self) -> None: + pass + + def test_create_sip_server_instant_test_models_validation(self) -> None: + """Test case for create_sip_server_instant_test request and response models""" + request_body_json = """ + { + "mtuMeasurements" : false, + "ipv6Policy" : "use-agent-policy", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "registerEnabled" : false, + "description" : "ThousandEyes Test", + "probeMode" : "auto", + "type" : "sip-server", + "fixedPacketRate" : 50, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "targetSipCredentials" : { + "password" : "password", + "protocol" : "tcp", + "port" : 49153, + "sipRegistrar" : "voice.thousandeyes.com", + "authUser" : "username", + "user" : "username" + }, + "testName" : "ThousandEyes Test", + "sipTargetTime" : 1000, + "numPathTraces" : 3, + "optionsRegex" : "[\\"a-z\\"]", + "liveShare" : false, + "savedEvent" : true, + "networkMeasurements" : true, + "labels" : [ "9842", "1283" ], + "agents" : [ { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + }, { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "sipTimeLimit" : 5, + "testId" : "281474976710706", + "sharedWithAccounts" : [ "1234", "12345" ] + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.instant_tests.models.SipServerInstantTestRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "mtuMeasurements" : false, + "ipv6Policy" : "use-agent-policy", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "registerEnabled" : false, + "description" : "ThousandEyes Test", + "probeMode" : "auto", + "type" : "sip-server", + "authUser" : "username", + "fixedPacketRate" : 50, + "password" : "password", + "protocol" : "tcp", + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "testName" : "ThousandEyes Test", + "sipTargetTime" : 1000, + "numPathTraces" : 3, + "optionsRegex" : "[\\"a-z\\"]", + "liveShare" : false, + "savedEvent" : true, + "sipRegistrar" : "voice.thousandeyes.com", + "networkMeasurements" : true, + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "agents" : [ { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + }, { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "port" : 49153, + "modifiedDate" : "2022-07-17T22:00:54Z", + "sipTimeLimit" : 5, + "testId" : "281474976710706", + "sharedWithAccounts" : [ { + "name" : "Account name", + "aid" : "1234" + }, { + "name" : "Account name", + "aid" : "1234" + } ], + "user" : "username" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.instant_tests.models.SipServerInstantTestResponse.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-instant-tests/test/test_utils.py b/thousandeyes-sdk-instant-tests/test/test_utils.py new file mode 100644 index 00000000..930528d9 --- /dev/null +++ b/thousandeyes-sdk-instant-tests/test/test_utils.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +import json +import unittest + +from pydantic import BaseModel + + +def assert_constructed_model_matches_example_json(model: BaseModel, loaded_json: dict): + test_case = unittest.TestCase() + test_case.maxDiff = None + test_case.assertIsNotNone(model) + constructed_json = json.loads(model.to_json()) + sorted_loaded_json = json.dumps(loaded_json, sort_keys=True) + sorted_constructed_json = json.dumps(constructed_json, sort_keys=True) + test_case.assertEqual(sorted_loaded_json, sorted_constructed_json) diff --git a/thousandeyes-sdk-instant-tests/test/test_voice_api.py b/thousandeyes-sdk-instant-tests/test/test_voice_api.py new file mode 100644 index 00000000..93aa3a0e --- /dev/null +++ b/thousandeyes-sdk-instant-tests/test/test_voice_api.py @@ -0,0 +1,174 @@ +# coding: utf-8 + +""" + Instant Tests API + + The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.instant_tests.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.instant_tests.api.voice_api import VoiceApi + + +class TestVoiceApi(unittest.TestCase): + """VoiceApi unit test stubs""" + + def setUp(self) -> None: + self.api = VoiceApi() + + def tearDown(self) -> None: + pass + + def test_create_voice_instant_test_models_validation(self) -> None: + """Test case for create_voice_instant_test request and response models""" + request_body_json = """ + { + "numPathTraces" : 3, + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "savedEvent" : true, + "description" : "ThousandEyes Test", + "type" : "voice", + "jitterBuffer" : 40, + "labels" : [ "9842", "1283" ], + "agents" : [ { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + }, { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + } ], + "dscpId" : "0", + "duration" : 5, + "codec" : "G.711 @ 64 Kbps", + "codecId" : "0", + "createdDate" : "2022-07-17T22:00:54Z", + "dscp" : "Best Effort (DSCP 0)", + "createdBy" : "user@user.com", + "port" : 1024, + "modifiedDate" : "2022-07-17T22:00:54Z", + "targetAgentId" : "281474976710706", + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "sharedWithAccounts" : [ "1234", "12345" ], + "testName" : "ThousandEyes Test" + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.instant_tests.models.VoiceInstantTestRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "numPathTraces" : 3, + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "savedEvent" : true, + "description" : "ThousandEyes Test", + "type" : "voice", + "jitterBuffer" : 40, + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "agents" : [ { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + }, { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + } ], + "dscpId" : "0", + "duration" : 5, + "codec" : "G.711 @ 64 Kbps", + "codecId" : "0", + "createdDate" : "2022-07-17T22:00:54Z", + "dscp" : "Best Effort (DSCP 0)", + "createdBy" : "user@user.com", + "port" : 1024, + "modifiedDate" : "2022-07-17T22:00:54Z", + "targetAgentId" : "281474976710706", + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "sharedWithAccounts" : [ { + "name" : "Account name", + "aid" : "1234" + }, { + "name" : "Account name", + "aid" : "1234" + } ], + "testName" : "ThousandEyes Test" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.instant_tests.models.VoiceInstantTest.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-instant-tests/test/test_web_transaction_api.py b/thousandeyes-sdk-instant-tests/test/test_web_transaction_api.py new file mode 100644 index 00000000..eb8ad82e --- /dev/null +++ b/thousandeyes-sdk-instant-tests/test/test_web_transaction_api.py @@ -0,0 +1,256 @@ +# coding: utf-8 + +""" + Instant Tests API + + The Instant Tests API endpoint lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` * `View tests` 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. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.instant_tests.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.instant_tests.api.web_transaction_api import WebTransactionApi + + +class TestWebTransactionApi(unittest.TestCase): + """WebTransactionApi unit test stubs""" + + def setUp(self) -> None: + self.api = WebTransactionApi() + + def tearDown(self) -> None: + pass + + def test_create_web_transaction_instant_test_models_validation(self) -> None: + """Test case for create_web_transaction_instant_test request and response models""" + request_body_json = """ + { + "clientCertificate" : "-----BEGIN PRIVATE KEY-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END PRIVATE KEY-----\\n-----BEGIN CERTIFICATE-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END CERTIFICATE-----\\n", + "mtuMeasurements" : false, + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "bandwidthMeasurements" : true, + "probeMode" : "auto", + "includeHeaders" : true, + "type" : "web-transactions", + "password" : "password", + "protocol" : "tcp", + "followRedirects" : true, + "contentRegex" : "(regex)+", + "pageLoadingStrategy" : "normal", + "testName" : "ThousandEyes Test", + "allowMicAndCamera" : false, + "browserLanguage" : "en-US", + "verifyCertificate" : false, + "liveShare" : false, + "labels" : [ "9842", "1283" ], + "modifiedDate" : "2022-07-17T22:00:54Z", + "emulatedDeviceId" : "2", + "sharedWithAccounts" : [ "1234", "12345" ], + "sslVersion" : "Auto", + "useNtlm" : false, + "credentials" : [ "3247", "1051" ], + "description" : "ThousandEyes Test", + "httpTimeLimit" : 5, + "blockDomains" : "domain.com/", + "allowGeolocation" : false, + "allowUnsafeLegacyRenegotiation" : true, + "fixedPacketRate" : 50, + "httpVersion" : 2, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "authType" : "none", + "customHeaders" : { + "root" : { + "header1" : "value1" + }, + "domains" : { + "domain1.com" : { + "header2" : "value2" + } + }, + "all" : { + "header3" : "value3" + } + }, + "numPathTraces" : 3, + "transactionScript" : "if (true) { return true; }", + "savedEvent" : true, + "userAgent" : "curl", + "networkMeasurements" : true, + "url" : "www.thousandeyes.com", + "agents" : [ { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + }, { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + } ], + "timeLimit" : 30, + "createdDate" : "2022-07-17T22:00:54Z", + "disableScreenshot" : false, + "createdBy" : "user@user.com", + "testId" : "281474976710706", + "desiredStatusCode" : "200", + "httpTargetTime" : 100, + "sslVersionId" : "0", + "targetTime" : 1, + "username" : "username" + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.instant_tests.models.WebTransactionInstantTestRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "clientCertificate" : "-----BEGIN PRIVATE KEY-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END PRIVATE KEY-----\\n-----BEGIN CERTIFICATE-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END CERTIFICATE-----\\n", + "mtuMeasurements" : false, + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "bandwidthMeasurements" : true, + "probeMode" : "auto", + "includeHeaders" : true, + "type" : "web-transactions", + "password" : "password", + "protocol" : "tcp", + "followRedirects" : true, + "contentRegex" : "(regex)+", + "pageLoadingStrategy" : "normal", + "testName" : "ThousandEyes Test", + "allowMicAndCamera" : false, + "browserLanguage" : "en-US", + "verifyCertificate" : false, + "liveShare" : false, + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "modifiedDate" : "2022-07-17T22:00:54Z", + "emulatedDeviceId" : "2", + "sharedWithAccounts" : [ { + "name" : "Account name", + "aid" : "1234" + }, { + "name" : "Account name", + "aid" : "1234" + } ], + "sslVersion" : "Auto", + "useNtlm" : false, + "credentials" : [ "3247", "1051" ], + "description" : "ThousandEyes Test", + "httpTimeLimit" : 5, + "blockDomains" : "domain.com/", + "allowGeolocation" : false, + "allowUnsafeLegacyRenegotiation" : true, + "fixedPacketRate" : 50, + "httpVersion" : 2, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "authType" : "none", + "customHeaders" : { + "root" : { + "header1" : "value1" + }, + "domains" : { + "domain1.com" : { + "header2" : "value2" + } + }, + "all" : { + "header3" : "value3" + } + }, + "numPathTraces" : 3, + "transactionScript" : "if (true) { return true; }", + "savedEvent" : true, + "userAgent" : "curl", + "networkMeasurements" : true, + "url" : "www.thousandeyes.com", + "agents" : [ { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + }, { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + } ], + "timeLimit" : 30, + "createdDate" : "2022-07-17T22:00:54Z", + "disableScreenshot" : false, + "createdBy" : "user@user.com", + "testId" : "281474976710706", + "desiredStatusCode" : "200", + "httpTargetTime" : 100, + "sslVersionId" : "0", + "targetTime" : 1, + "username" : "username" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.instant_tests.models.WebTransactionInstantTest.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-internet-insights/.openapi-generator/FILES b/thousandeyes-sdk-internet-insights/.openapi-generator/FILES index f203dd4c..c339be1e 100644 --- a/thousandeyes-sdk-internet-insights/.openapi-generator/FILES +++ b/thousandeyes-sdk-internet-insights/.openapi-generator/FILES @@ -57,26 +57,6 @@ src/thousandeyes_sdk/internet_insights/models/validation_error.py src/thousandeyes_sdk/internet_insights/models/validation_error_item.py src/thousandeyes_sdk/internet_insights/py.typed test/__init__.py -test/test_api_affected_agent.py -test/test_api_affected_test.py -test/test_api_application_outage_affected_location.py -test/test_api_application_outage_affected_server.py -test/test_api_application_outage_details.py -test/test_api_asn.py -test/test_api_catalog_provider.py -test/test_api_catalog_provider_details.py -test/test_api_catalog_provider_filter.py -test/test_api_catalog_provider_response.py -test/test_api_network_outage_affected_location.py -test/test_api_network_outage_details.py -test/test_api_outage.py -test/test_api_outage_filter.py -test/test_api_outages_response.py -test/test_error.py -test/test_link.py -test/test_outage_scope.py -test/test_provider_location.py -test/test_self_links.py -test/test_unauthorized_error.py -test/test_validation_error.py -test/test_validation_error_item.py +test/test_catalog_providers_api.py +test/test_outages_api_public_api.py +test/test_utils.py diff --git a/thousandeyes-sdk-internet-insights/README.md b/thousandeyes-sdk-internet-insights/README.md index e07ca35c..38c5c316 100644 --- a/thousandeyes-sdk-internet-insights/README.md +++ b/thousandeyes-sdk-internet-insights/README.md @@ -12,8 +12,7 @@ Future releases of the Internet Insights API set will further unlock access to c This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.4 -- Package version: 1.0.0 +- API version: 7.0.6 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator @@ -27,9 +26,9 @@ Python 3.7+ If the python package is hosted on a repository, you can install directly using: ```sh -pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +pip install -e git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git#egg=thousandeyes-sdk-internet-insights\&subdirectory=thousandeyes-sdk-internet-insights ``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) +(you may need to run `pip` with root permission: `sudo pip install -e git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git#egg=thousandeyes-sdk-internet-insights\&subdirectory=thousandeyes-sdk-internet-insights`) Then import the package: ```python @@ -91,11 +90,11 @@ with thousandeyes_sdk.client.ApiClient(configuration) as api_client: try: # List catalog providers - api_response = api_instance.catalog_provider_list(api_catalog_provider_filter, aid=aid) - print("The response of CatalogProvidersApi->catalog_provider_list:\n") + api_response = api_instance.filter_catalog_providers(api_catalog_provider_filter, aid=aid) + print("The response of CatalogProvidersApi->filter_catalog_providers:\n") pprint(api_response) except ApiException as e: - print("Exception when calling CatalogProvidersApi->catalog_provider_list: %s\n" % e) + print("Exception when calling CatalogProvidersApi->filter_catalog_providers: %s\n" % e) ``` @@ -105,11 +104,11 @@ All URIs are relative to *https://api.thousandeyes.com* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*CatalogProvidersApi* | [**catalog_provider_list**](docs/CatalogProvidersApi.md#catalog_provider_list) | **POST** /v7/internet-insights/catalog/providers/filter | List catalog providers +*CatalogProvidersApi* | [**filter_catalog_providers**](docs/CatalogProvidersApi.md#filter_catalog_providers) | **POST** /v7/internet-insights/catalog/providers/filter | List catalog providers *CatalogProvidersApi* | [**get_catalog_provider**](docs/CatalogProvidersApi.md#get_catalog_provider) | **GET** /v7/internet-insights/catalog/providers/{providerId} | Retrieve a catalog provider -*OutagesAPIPublicApi* | [**get_outages_app**](docs/OutagesAPIPublicApi.md#get_outages_app) | **GET** /v7/internet-insights/outages/app/{outageId} | Retrieve application outage -*OutagesAPIPublicApi* | [**get_outages_filter**](docs/OutagesAPIPublicApi.md#get_outages_filter) | **POST** /v7/internet-insights/outages/filter | List network and application outages -*OutagesAPIPublicApi* | [**get_outages_net**](docs/OutagesAPIPublicApi.md#get_outages_net) | **GET** /v7/internet-insights/outages/net/{outageId} | Retrieve network outage +*OutagesAPIPublicApi* | [**filter_outages**](docs/OutagesAPIPublicApi.md#filter_outages) | **POST** /v7/internet-insights/outages/filter | List network and application outages +*OutagesAPIPublicApi* | [**get_app_outage**](docs/OutagesAPIPublicApi.md#get_app_outage) | **GET** /v7/internet-insights/outages/app/{outageId} | Retrieve application outage +*OutagesAPIPublicApi* | [**get_network_outage**](docs/OutagesAPIPublicApi.md#get_network_outage) | **GET** /v7/internet-insights/outages/net/{outageId} | Retrieve network outage ## Documentation For Models diff --git a/thousandeyes-sdk-internet-insights/docs/CatalogProvidersApi.md b/thousandeyes-sdk-internet-insights/docs/CatalogProvidersApi.md index a96a4511..6c8b55d9 100644 --- a/thousandeyes-sdk-internet-insights/docs/CatalogProvidersApi.md +++ b/thousandeyes-sdk-internet-insights/docs/CatalogProvidersApi.md @@ -4,12 +4,12 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**catalog_provider_list**](CatalogProvidersApi.md#catalog_provider_list) | **POST** /v7/internet-insights/catalog/providers/filter | List catalog providers +[**filter_catalog_providers**](CatalogProvidersApi.md#filter_catalog_providers) | **POST** /v7/internet-insights/catalog/providers/filter | List catalog providers [**get_catalog_provider**](CatalogProvidersApi.md#get_catalog_provider) | **GET** /v7/internet-insights/catalog/providers/{providerId} | Retrieve a catalog provider -# **catalog_provider_list** -> ApiCatalogProviderResponse catalog_provider_list(api_catalog_provider_filter, aid=aid) +# **filter_catalog_providers** +> ApiCatalogProviderResponse filter_catalog_providers(api_catalog_provider_filter, aid=aid) List catalog providers @@ -51,11 +51,11 @@ with thousandeyes_sdk.internet_insights.ApiClient(configuration) as api_client: try: # List catalog providers - api_response = api_instance.catalog_provider_list(api_catalog_provider_filter, aid=aid) - print("The response of CatalogProvidersApi->catalog_provider_list:\n") + api_response = api_instance.filter_catalog_providers(api_catalog_provider_filter, aid=aid) + print("The response of CatalogProvidersApi->filter_catalog_providers:\n") pprint(api_response) except Exception as e: - print("Exception when calling CatalogProvidersApi->catalog_provider_list: %s\n" % e) + print("Exception when calling CatalogProvidersApi->filter_catalog_providers: %s\n" % e) ``` @@ -79,7 +79,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -167,7 +167,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-internet-insights/docs/OutagesAPIPublicApi.md b/thousandeyes-sdk-internet-insights/docs/OutagesAPIPublicApi.md index a9670fd5..d6488a53 100644 --- a/thousandeyes-sdk-internet-insights/docs/OutagesAPIPublicApi.md +++ b/thousandeyes-sdk-internet-insights/docs/OutagesAPIPublicApi.md @@ -4,101 +4,13 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**get_outages_app**](OutagesAPIPublicApi.md#get_outages_app) | **GET** /v7/internet-insights/outages/app/{outageId} | Retrieve application outage -[**get_outages_filter**](OutagesAPIPublicApi.md#get_outages_filter) | **POST** /v7/internet-insights/outages/filter | List network and application outages -[**get_outages_net**](OutagesAPIPublicApi.md#get_outages_net) | **GET** /v7/internet-insights/outages/net/{outageId} | Retrieve network outage +[**filter_outages**](OutagesAPIPublicApi.md#filter_outages) | **POST** /v7/internet-insights/outages/filter | List network and application outages +[**get_app_outage**](OutagesAPIPublicApi.md#get_app_outage) | **GET** /v7/internet-insights/outages/app/{outageId} | Retrieve application outage +[**get_network_outage**](OutagesAPIPublicApi.md#get_network_outage) | **GET** /v7/internet-insights/outages/net/{outageId} | Retrieve network outage -# **get_outages_app** -> ApiApplicationOutageDetails get_outages_app(outage_id, aid=aid) - -Retrieve application outage - -Returns the details of an application outage. - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import thousandeyes_sdk.internet_insights -from thousandeyes_sdk.internet_insights.models.api_application_outage_details import ApiApplicationOutageDetails -from thousandeyes_sdk.internet_insights.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.thousandeyes.com -# See configuration.py for a list of all supported configuration parameters. -configuration = thousandeyes_sdk.client.Configuration( - host = "https://api.thousandeyes.com" -) - -# 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.client.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with thousandeyes_sdk.internet_insights.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = thousandeyes_sdk.internet_insights.OutagesAPIPublicApi(api_client) - outage_id = 'F73E24F17E4996923196826A208BB572508A8EB13BEE14B0' # str | - 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: - # Retrieve application outage - api_response = api_instance.get_outages_app(outage_id, aid=aid) - print("The response of OutagesAPIPublicApi->get_outages_app:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling OutagesAPIPublicApi->get_outages_app: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **outage_id** | **str**| | - **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 - -[**ApiApplicationOutageDetails**](ApiApplicationOutageDetails.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/hal+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 | - | -**429** | Exhausted rate limit for the organization | - | -**500** | Internal server error | - | -**502** | Bad Gateway | - | -**0** | An error occurred | - | - -[[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_outages_filter** -> ApiOutagesResponse get_outages_filter(api_outage_filter, aid=aid) +# **filter_outages** +> ApiOutagesResponse filter_outages(api_outage_filter, aid=aid) List network and application outages @@ -140,11 +52,11 @@ with thousandeyes_sdk.internet_insights.ApiClient(configuration) as api_client: try: # List network and application outages - api_response = api_instance.get_outages_filter(api_outage_filter, aid=aid) - print("The response of OutagesAPIPublicApi->get_outages_filter:\n") + api_response = api_instance.filter_outages(api_outage_filter, aid=aid) + print("The response of OutagesAPIPublicApi->filter_outages:\n") pprint(api_response) except Exception as e: - print("Exception when calling OutagesAPIPublicApi->get_outages_filter: %s\n" % e) + print("Exception when calling OutagesAPIPublicApi->filter_outages: %s\n" % e) ``` @@ -168,7 +80,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -186,8 +98,96 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_outages_net** -> ApiNetworkOutageDetails get_outages_net(outage_id, aid=aid) +# **get_app_outage** +> ApiApplicationOutageDetails get_app_outage(outage_id, aid=aid) + +Retrieve application outage + +Returns the details of an application outage. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.internet_insights +from thousandeyes_sdk.internet_insights.models.api_application_outage_details import ApiApplicationOutageDetails +from thousandeyes_sdk.internet_insights.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.internet_insights.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.internet_insights.OutagesAPIPublicApi(api_client) + outage_id = 'F73E24F17E4996923196826A208BB572508A8EB13BEE14B0' # str | + 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: + # Retrieve application outage + api_response = api_instance.get_app_outage(outage_id, aid=aid) + print("The response of OutagesAPIPublicApi->get_app_outage:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling OutagesAPIPublicApi->get_app_outage: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **outage_id** | **str**| | + **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 + +[**ApiApplicationOutageDetails**](ApiApplicationOutageDetails.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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 | - | +**429** | Exhausted rate limit for the organization | - | +**500** | Internal server error | - | +**502** | Bad Gateway | - | +**0** | An error occurred | - | + +[[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_network_outage** +> ApiNetworkOutageDetails get_network_outage(outage_id, aid=aid) Retrieve network outage @@ -228,11 +228,11 @@ with thousandeyes_sdk.internet_insights.ApiClient(configuration) as api_client: try: # Retrieve network outage - api_response = api_instance.get_outages_net(outage_id, aid=aid) - print("The response of OutagesAPIPublicApi->get_outages_net:\n") + api_response = api_instance.get_network_outage(outage_id, aid=aid) + print("The response of OutagesAPIPublicApi->get_network_outage:\n") pprint(api_response) except Exception as e: - print("Exception when calling OutagesAPIPublicApi->get_outages_net: %s\n" % e) + print("Exception when calling OutagesAPIPublicApi->get_network_outage: %s\n" % e) ``` @@ -256,7 +256,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-internet-insights/docs/ValidationErrorItem.md b/thousandeyes-sdk-internet-insights/docs/ValidationErrorItem.md index 15a60f9b..06a11115 100644 --- a/thousandeyes-sdk-internet-insights/docs/ValidationErrorItem.md +++ b/thousandeyes-sdk-internet-insights/docs/ValidationErrorItem.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **code** | **str** | (Optional) A unique error type/code that can be referenced in the documentation for further details. | [optional] -**var_field** | **int** | Identifies the field that triggered this particular error. | [optional] +**var_field** | **str** | Identifies the field that triggered this particular error. | [optional] **message** | **str** | A short, human-readable summary of the error. | [optional] ## Example diff --git a/thousandeyes-sdk-internet-insights/pyproject.toml b/thousandeyes-sdk-internet-insights/pyproject.toml index c53272e2..e49477eb 100644 --- a/thousandeyes-sdk-internet-insights/pyproject.toml +++ b/thousandeyes-sdk-internet-insights/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "thousandeyes-sdk-internet-insights" -version = "1.0.0" +dynamic = ["version"] authors = [ { name = "ThousandEyes API Team", email = "api-team@thousandeyes.com" } ] @@ -11,9 +11,12 @@ dependencies = [ "python-dateutil >=2.8.2", "pydantic >=2", "typing-extensions >=4.7.1", - "thousandeyes-sdk-client==1.0.0", + "thousandeyes-sdk-core", ] +[tool.setuptools.dynamic] +version = {attr = "thousandeyes_sdk.client.__version__"} + [project.optional-dependencies] test = [ "pytest~=7.1.3", diff --git a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/__init__.py b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/__init__.py index 11076829..6ce7aaac 100644 --- a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/__init__.py +++ b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/__init__.py @@ -7,15 +7,13 @@ We are happy to announce the release of the Internet Insights API set. This limited release includes endpoints that: * Make our catalog provider and Internet outage data accessible to API users. * Provide access to advanced filtering, which is part of our next-generation API efforts to allow API users to fine-tune queries across all of our APIs in a consistent manner. Internet Insights provide visibility into core Internet infrastructure, including ISPs, DNS providers, IaaS, CDNs , and SaaS providers. It tracks the macro-level impact of Internet events on individual users and enterprise networks connecting at the edge of the Internet. These events include Outages, Routing hijacks and leaks, DDoS attacks, And political interference, among others. Future releases of the Internet Insights API set will further unlock access to core Internet Insights functionality, unlocking potential integrations to enrich customer process flows. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 -__version__ = "1.0.0" - # import apis into sdk package from thousandeyes_sdk.internet_insights.api.catalog_providers_api import CatalogProvidersApi from thousandeyes_sdk.internet_insights.api.outages_api_public_api import OutagesAPIPublicApi diff --git a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/api/catalog_providers_api.py b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/api/catalog_providers_api.py index c10e8013..3af26a97 100644 --- a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/api/catalog_providers_api.py +++ b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/api/catalog_providers_api.py @@ -5,7 +5,7 @@ We are happy to announce the release of the Internet Insights API set. This limited release includes endpoints that: * Make our catalog provider and Internet outage data accessible to API users. * Provide access to advanced filtering, which is part of our next-generation API efforts to allow API users to fine-tune queries across all of our APIs in a consistent manner. Internet Insights provide visibility into core Internet infrastructure, including ISPs, DNS providers, IaaS, CDNs , and SaaS providers. It tracks the macro-level impact of Internet events on individual users and enterprise networks connecting at the edge of the Internet. These events include Outages, Routing hijacks and leaks, DDoS attacks, And political interference, among others. Future releases of the Internet Insights API set will further unlock access to core Internet Insights functionality, unlocking potential integrations to enrich customer process flows. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -28,6 +28,7 @@ from thousandeyes_sdk.internet_insights.models.api_catalog_provider_response imp from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class CatalogProvidersApi: @@ -40,11 +41,12 @@ class CatalogProvidersApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @validate_call - def catalog_provider_list( + def filter_catalog_providers( self, api_catalog_provider_filter: ApiCatalogProviderFilter, 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, @@ -91,7 +93,7 @@ class CatalogProvidersApi: :return: Returns the result object. """ # noqa: E501 - _param = self._catalog_provider_list_serialize( + _param = self._filter_catalog_providers_serialize( api_catalog_provider_filter=api_catalog_provider_filter, aid=aid, _request_auth=_request_auth, @@ -123,7 +125,7 @@ class CatalogProvidersApi: @validate_call - def catalog_provider_list_with_http_info( + def filter_catalog_providers_with_http_info( self, api_catalog_provider_filter: ApiCatalogProviderFilter, 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, @@ -170,7 +172,7 @@ class CatalogProvidersApi: :return: Returns the result object. """ # noqa: E501 - _param = self._catalog_provider_list_serialize( + _param = self._filter_catalog_providers_serialize( api_catalog_provider_filter=api_catalog_provider_filter, aid=aid, _request_auth=_request_auth, @@ -202,7 +204,7 @@ class CatalogProvidersApi: @validate_call - def catalog_provider_list_without_preload_content( + def filter_catalog_providers_without_preload_content( self, api_catalog_provider_filter: ApiCatalogProviderFilter, 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, @@ -249,7 +251,7 @@ class CatalogProvidersApi: :return: Returns the result object. """ # noqa: E501 - _param = self._catalog_provider_list_serialize( + _param = self._filter_catalog_providers_serialize( api_catalog_provider_filter=api_catalog_provider_filter, aid=aid, _request_auth=_request_auth, @@ -275,7 +277,7 @@ class CatalogProvidersApi: return response_data.response - def _catalog_provider_list_serialize( + def _filter_catalog_providers_serialize( self, api_catalog_provider_filter, aid, @@ -314,6 +316,7 @@ class CatalogProvidersApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -626,6 +629,7 @@ class CatalogProvidersApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/api/outages_api_public_api.py b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/api/outages_api_public_api.py index 8b7d489c..9ea955bf 100644 --- a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/api/outages_api_public_api.py +++ b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/api/outages_api_public_api.py @@ -5,7 +5,7 @@ We are happy to announce the release of the Internet Insights API set. This limited release includes endpoints that: * Make our catalog provider and Internet outage data accessible to API users. * Provide access to advanced filtering, which is part of our next-generation API efforts to allow API users to fine-tune queries across all of our APIs in a consistent manner. Internet Insights provide visibility into core Internet infrastructure, including ISPs, DNS providers, IaaS, CDNs , and SaaS providers. It tracks the macro-level impact of Internet events on individual users and enterprise networks connecting at the edge of the Internet. These events include Outages, Routing hijacks and leaks, DDoS attacks, And political interference, among others. Future releases of the Internet Insights API set will further unlock access to core Internet Insights functionality, unlocking potential integrations to enrich customer process flows. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -29,6 +29,7 @@ from thousandeyes_sdk.internet_insights.models.api_outages_response import ApiOu from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class OutagesAPIPublicApi: @@ -41,310 +42,12 @@ class OutagesAPIPublicApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @validate_call - def get_outages_app( - self, - outage_id: StrictStr, - 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, - ) -> ApiApplicationOutageDetails: - """Retrieve application outage - - Returns the details of an application outage. - - :param outage_id: (required) - :type outage_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 - 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_outages_app_serialize( - outage_id=outage_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiApplicationOutageDetails", - '400': "ValidationError", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "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.internet_insights.models, - ).data - - - @validate_call - def get_outages_app_with_http_info( - self, - outage_id: StrictStr, - 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[ApiApplicationOutageDetails]: - """Retrieve application outage - - Returns the details of an application outage. - - :param outage_id: (required) - :type outage_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 - 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_outages_app_serialize( - outage_id=outage_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiApplicationOutageDetails", - '400': "ValidationError", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "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.internet_insights.models, - ) - - - @validate_call - def get_outages_app_without_preload_content( - self, - outage_id: StrictStr, - 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: - """Retrieve application outage - - Returns the details of an application outage. - - :param outage_id: (required) - :type outage_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 - 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_outages_app_serialize( - outage_id=outage_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiApplicationOutageDetails", - '400': "ValidationError", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_outages_app_serialize( - self, - outage_id, - 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 - if outage_id is not None: - _path_params['outageId'] = outage_id - # 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/problem+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v7/internet-insights/outages/app/{outageId}', - 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_outages_filter( + def filter_outages( self, api_outage_filter: ApiOutageFilter, 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, @@ -391,7 +94,7 @@ class OutagesAPIPublicApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_outages_filter_serialize( + _param = self._filter_outages_serialize( api_outage_filter=api_outage_filter, aid=aid, _request_auth=_request_auth, @@ -423,7 +126,7 @@ class OutagesAPIPublicApi: @validate_call - def get_outages_filter_with_http_info( + def filter_outages_with_http_info( self, api_outage_filter: ApiOutageFilter, 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, @@ -470,7 +173,7 @@ class OutagesAPIPublicApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_outages_filter_serialize( + _param = self._filter_outages_serialize( api_outage_filter=api_outage_filter, aid=aid, _request_auth=_request_auth, @@ -502,7 +205,7 @@ class OutagesAPIPublicApi: @validate_call - def get_outages_filter_without_preload_content( + def filter_outages_without_preload_content( self, api_outage_filter: ApiOutageFilter, 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, @@ -549,7 +252,7 @@ class OutagesAPIPublicApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_outages_filter_serialize( + _param = self._filter_outages_serialize( api_outage_filter=api_outage_filter, aid=aid, _request_auth=_request_auth, @@ -575,7 +278,7 @@ class OutagesAPIPublicApi: return response_data.response - def _get_outages_filter_serialize( + def _filter_outages_serialize( self, api_outage_filter, aid, @@ -614,6 +317,7 @@ class OutagesAPIPublicApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -656,7 +360,307 @@ class OutagesAPIPublicApi: @validate_call - def get_outages_net( + def get_app_outage( + self, + outage_id: StrictStr, + 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, + ) -> ApiApplicationOutageDetails: + """Retrieve application outage + + Returns the details of an application outage. + + :param outage_id: (required) + :type outage_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 + 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_app_outage_serialize( + outage_id=outage_id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiApplicationOutageDetails", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "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.internet_insights.models, + ).data + + + @validate_call + def get_app_outage_with_http_info( + self, + outage_id: StrictStr, + 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[ApiApplicationOutageDetails]: + """Retrieve application outage + + Returns the details of an application outage. + + :param outage_id: (required) + :type outage_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 + 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_app_outage_serialize( + outage_id=outage_id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiApplicationOutageDetails", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "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.internet_insights.models, + ) + + + @validate_call + def get_app_outage_without_preload_content( + self, + outage_id: StrictStr, + 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: + """Retrieve application outage + + Returns the details of an application outage. + + :param outage_id: (required) + :type outage_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 + 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_app_outage_serialize( + outage_id=outage_id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiApplicationOutageDetails", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_app_outage_serialize( + self, + outage_id, + 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 + if outage_id is not None: + _path_params['outageId'] = outage_id + # 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='/v7/internet-insights/outages/app/{outageId}', + 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_network_outage( self, outage_id: StrictStr, 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, @@ -703,7 +707,7 @@ class OutagesAPIPublicApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_outages_net_serialize( + _param = self._get_network_outage_serialize( outage_id=outage_id, aid=aid, _request_auth=_request_auth, @@ -735,7 +739,7 @@ class OutagesAPIPublicApi: @validate_call - def get_outages_net_with_http_info( + def get_network_outage_with_http_info( self, outage_id: StrictStr, 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, @@ -782,7 +786,7 @@ class OutagesAPIPublicApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_outages_net_serialize( + _param = self._get_network_outage_serialize( outage_id=outage_id, aid=aid, _request_auth=_request_auth, @@ -814,7 +818,7 @@ class OutagesAPIPublicApi: @validate_call - def get_outages_net_without_preload_content( + def get_network_outage_without_preload_content( self, outage_id: StrictStr, 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, @@ -861,7 +865,7 @@ class OutagesAPIPublicApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_outages_net_serialize( + _param = self._get_network_outage_serialize( outage_id=outage_id, aid=aid, _request_auth=_request_auth, @@ -887,7 +891,7 @@ class OutagesAPIPublicApi: return response_data.response - def _get_outages_net_serialize( + def _get_network_outage_serialize( self, outage_id, aid, @@ -926,6 +930,7 @@ class OutagesAPIPublicApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/__init__.py b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/__init__.py index eeceb70b..3f7349ac 100644 --- a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/__init__.py +++ b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/__init__.py @@ -6,7 +6,7 @@ We are happy to announce the release of the Internet Insights API set. This limited release includes endpoints that: * Make our catalog provider and Internet outage data accessible to API users. * Provide access to advanced filtering, which is part of our next-generation API efforts to allow API users to fine-tune queries across all of our APIs in a consistent manner. Internet Insights provide visibility into core Internet infrastructure, including ISPs, DNS providers, IaaS, CDNs , and SaaS providers. It tracks the macro-level impact of Internet events on individual users and enterprise networks connecting at the edge of the Internet. These events include Outages, Routing hijacks and leaks, DDoS attacks, And political interference, among others. Future releases of the Internet Insights API set will further unlock access to core Internet Insights functionality, unlocking potential integrations to enrich customer process flows. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_affected_agent.py b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_affected_agent.py index 220d54e9..51c912de 100644 --- a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_affected_agent.py +++ b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_affected_agent.py @@ -5,7 +5,7 @@ We are happy to announce the release of the Internet Insights API set. This limited release includes endpoints that: * Make our catalog provider and Internet outage data accessible to API users. * Provide access to advanced filtering, which is part of our next-generation API efforts to allow API users to fine-tune queries across all of our APIs in a consistent manner. Internet Insights provide visibility into core Internet infrastructure, including ISPs, DNS providers, IaaS, CDNs , and SaaS providers. It tracks the macro-level impact of Internet events on individual users and enterprise networks connecting at the edge of the Internet. These events include Outages, Routing hijacks and leaks, DDoS attacks, And political interference, among others. Future releases of the Internet Insights API set will further unlock access to core Internet Insights functionality, unlocking potential integrations to enrich customer process flows. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class ApiAffectedAgent(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class ApiAffectedAgent(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_affected_test.py b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_affected_test.py index 83c3982f..a8b2652d 100644 --- a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_affected_test.py +++ b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_affected_test.py @@ -5,7 +5,7 @@ We are happy to announce the release of the Internet Insights API set. This limited release includes endpoints that: * Make our catalog provider and Internet outage data accessible to API users. * Provide access to advanced filtering, which is part of our next-generation API efforts to allow API users to fine-tune queries across all of our APIs in a consistent manner. Internet Insights provide visibility into core Internet infrastructure, including ISPs, DNS providers, IaaS, CDNs , and SaaS providers. It tracks the macro-level impact of Internet events on individual users and enterprise networks connecting at the edge of the Internet. These events include Outages, Routing hijacks and leaks, DDoS attacks, And political interference, among others. Future releases of the Internet Insights API set will further unlock access to core Internet Insights functionality, unlocking potential integrations to enrich customer process flows. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class ApiAffectedTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class ApiAffectedTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_application_outage_affected_location.py b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_application_outage_affected_location.py index 58d358f1..dcc78882 100644 --- a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_application_outage_affected_location.py +++ b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_application_outage_affected_location.py @@ -5,7 +5,7 @@ We are happy to announce the release of the Internet Insights API set. This limited release includes endpoints that: * Make our catalog provider and Internet outage data accessible to API users. * Provide access to advanced filtering, which is part of our next-generation API efforts to allow API users to fine-tune queries across all of our APIs in a consistent manner. Internet Insights provide visibility into core Internet infrastructure, including ISPs, DNS providers, IaaS, CDNs , and SaaS providers. It tracks the macro-level impact of Internet events on individual users and enterprise networks connecting at the edge of the Internet. These events include Outages, Routing hijacks and leaks, DDoS attacks, And political interference, among others. Future releases of the Internet Insights API set will further unlock access to core Internet Insights functionality, unlocking potential integrations to enrich customer process flows. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class ApiApplicationOutageAffectedLocation(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class ApiApplicationOutageAffectedLocation(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_application_outage_affected_server.py b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_application_outage_affected_server.py index d6c3fbe6..f5bd363d 100644 --- a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_application_outage_affected_server.py +++ b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_application_outage_affected_server.py @@ -5,7 +5,7 @@ We are happy to announce the release of the Internet Insights API set. This limited release includes endpoints that: * Make our catalog provider and Internet outage data accessible to API users. * Provide access to advanced filtering, which is part of our next-generation API efforts to allow API users to fine-tune queries across all of our APIs in a consistent manner. Internet Insights provide visibility into core Internet infrastructure, including ISPs, DNS providers, IaaS, CDNs , and SaaS providers. It tracks the macro-level impact of Internet events on individual users and enterprise networks connecting at the edge of the Internet. These events include Outages, Routing hijacks and leaks, DDoS attacks, And political interference, among others. Future releases of the Internet Insights API set will further unlock access to core Internet Insights functionality, unlocking potential integrations to enrich customer process flows. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class ApiApplicationOutageAffectedServer(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class ApiApplicationOutageAffectedServer(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_application_outage_details.py b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_application_outage_details.py index 7a83cc89..757aef11 100644 --- a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_application_outage_details.py +++ b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_application_outage_details.py @@ -5,7 +5,7 @@ We are happy to announce the release of the Internet Insights API set. This limited release includes endpoints that: * Make our catalog provider and Internet outage data accessible to API users. * Provide access to advanced filtering, which is part of our next-generation API efforts to allow API users to fine-tune queries across all of our APIs in a consistent manner. Internet Insights provide visibility into core Internet infrastructure, including ISPs, DNS providers, IaaS, CDNs , and SaaS providers. It tracks the macro-level impact of Internet events on individual users and enterprise networks connecting at the edge of the Internet. These events include Outages, Routing hijacks and leaks, DDoS attacks, And political interference, among others. Future releases of the Internet Insights API set will further unlock access to core Internet Insights functionality, unlocking potential integrations to enrich customer process flows. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -51,6 +51,7 @@ class ApiApplicationOutageDetails(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -61,7 +62,7 @@ class ApiApplicationOutageDetails(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_asn.py b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_asn.py index b2f9ef19..d5f78232 100644 --- a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_asn.py +++ b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_asn.py @@ -5,7 +5,7 @@ We are happy to announce the release of the Internet Insights API set. This limited release includes endpoints that: * Make our catalog provider and Internet outage data accessible to API users. * Provide access to advanced filtering, which is part of our next-generation API efforts to allow API users to fine-tune queries across all of our APIs in a consistent manner. Internet Insights provide visibility into core Internet infrastructure, including ISPs, DNS providers, IaaS, CDNs , and SaaS providers. It tracks the macro-level impact of Internet events on individual users and enterprise networks connecting at the edge of the Internet. These events include Outages, Routing hijacks and leaks, DDoS attacks, And political interference, among others. Future releases of the Internet Insights API set will further unlock access to core Internet Insights functionality, unlocking potential integrations to enrich customer process flows. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class ApiAsn(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class ApiAsn(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_catalog_provider.py b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_catalog_provider.py index 814b1a27..2cd2ca40 100644 --- a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_catalog_provider.py +++ b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_catalog_provider.py @@ -5,7 +5,7 @@ We are happy to announce the release of the Internet Insights API set. This limited release includes endpoints that: * Make our catalog provider and Internet outage data accessible to API users. * Provide access to advanced filtering, which is part of our next-generation API efforts to allow API users to fine-tune queries across all of our APIs in a consistent manner. Internet Insights provide visibility into core Internet infrastructure, including ISPs, DNS providers, IaaS, CDNs , and SaaS providers. It tracks the macro-level impact of Internet events on individual users and enterprise networks connecting at the edge of the Internet. These events include Outages, Routing hijacks and leaks, DDoS attacks, And political interference, among others. Future releases of the Internet Insights API set will further unlock access to core Internet Insights functionality, unlocking potential integrations to enrich customer process flows. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -44,6 +44,7 @@ class ApiCatalogProvider(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -54,7 +55,7 @@ class ApiCatalogProvider(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_catalog_provider_details.py b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_catalog_provider_details.py index ba154764..ee6e444f 100644 --- a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_catalog_provider_details.py +++ b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_catalog_provider_details.py @@ -5,7 +5,7 @@ We are happy to announce the release of the Internet Insights API set. This limited release includes endpoints that: * Make our catalog provider and Internet outage data accessible to API users. * Provide access to advanced filtering, which is part of our next-generation API efforts to allow API users to fine-tune queries across all of our APIs in a consistent manner. Internet Insights provide visibility into core Internet infrastructure, including ISPs, DNS providers, IaaS, CDNs , and SaaS providers. It tracks the macro-level impact of Internet events on individual users and enterprise networks connecting at the edge of the Internet. These events include Outages, Routing hijacks and leaks, DDoS attacks, And political interference, among others. Future releases of the Internet Insights API set will further unlock access to core Internet Insights functionality, unlocking potential integrations to enrich customer process flows. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -43,6 +43,7 @@ class ApiCatalogProviderDetails(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -53,7 +54,7 @@ class ApiCatalogProviderDetails(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_catalog_provider_filter.py b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_catalog_provider_filter.py index 23f26d54..a99e6cfc 100644 --- a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_catalog_provider_filter.py +++ b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_catalog_provider_filter.py @@ -5,7 +5,7 @@ We are happy to announce the release of the Internet Insights API set. This limited release includes endpoints that: * Make our catalog provider and Internet outage data accessible to API users. * Provide access to advanced filtering, which is part of our next-generation API efforts to allow API users to fine-tune queries across all of our APIs in a consistent manner. Internet Insights provide visibility into core Internet infrastructure, including ISPs, DNS providers, IaaS, CDNs , and SaaS providers. It tracks the macro-level impact of Internet events on individual users and enterprise networks connecting at the edge of the Internet. These events include Outages, Routing hijacks and leaks, DDoS attacks, And political interference, among others. Future releases of the Internet Insights API set will further unlock access to core Internet Insights functionality, unlocking potential integrations to enrich customer process flows. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -38,6 +38,7 @@ class ApiCatalogProviderFilter(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -48,7 +49,7 @@ class ApiCatalogProviderFilter(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_catalog_provider_response.py b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_catalog_provider_response.py index 4bf86ff6..d152d932 100644 --- a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_catalog_provider_response.py +++ b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_catalog_provider_response.py @@ -5,7 +5,7 @@ We are happy to announce the release of the Internet Insights API set. This limited release includes endpoints that: * Make our catalog provider and Internet outage data accessible to API users. * Provide access to advanced filtering, which is part of our next-generation API efforts to allow API users to fine-tune queries across all of our APIs in a consistent manner. Internet Insights provide visibility into core Internet infrastructure, including ISPs, DNS providers, IaaS, CDNs , and SaaS providers. It tracks the macro-level impact of Internet events on individual users and enterprise networks connecting at the edge of the Internet. These events include Outages, Routing hijacks and leaks, DDoS attacks, And political interference, among others. Future releases of the Internet Insights API set will further unlock access to core Internet Insights functionality, unlocking potential integrations to enrich customer process flows. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class ApiCatalogProviderResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class ApiCatalogProviderResponse(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_network_outage_affected_location.py b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_network_outage_affected_location.py index 55eba860..f90722bd 100644 --- a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_network_outage_affected_location.py +++ b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_network_outage_affected_location.py @@ -5,7 +5,7 @@ We are happy to announce the release of the Internet Insights API set. This limited release includes endpoints that: * Make our catalog provider and Internet outage data accessible to API users. * Provide access to advanced filtering, which is part of our next-generation API efforts to allow API users to fine-tune queries across all of our APIs in a consistent manner. Internet Insights provide visibility into core Internet infrastructure, including ISPs, DNS providers, IaaS, CDNs , and SaaS providers. It tracks the macro-level impact of Internet events on individual users and enterprise networks connecting at the edge of the Internet. These events include Outages, Routing hijacks and leaks, DDoS attacks, And political interference, among others. Future releases of the Internet Insights API set will further unlock access to core Internet Insights functionality, unlocking potential integrations to enrich customer process flows. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class ApiNetworkOutageAffectedLocation(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class ApiNetworkOutageAffectedLocation(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_network_outage_details.py b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_network_outage_details.py index 8e4b4ccd..a5f3fd3f 100644 --- a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_network_outage_details.py +++ b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_network_outage_details.py @@ -5,7 +5,7 @@ We are happy to announce the release of the Internet Insights API set. This limited release includes endpoints that: * Make our catalog provider and Internet outage data accessible to API users. * Provide access to advanced filtering, which is part of our next-generation API efforts to allow API users to fine-tune queries across all of our APIs in a consistent manner. Internet Insights provide visibility into core Internet infrastructure, including ISPs, DNS providers, IaaS, CDNs , and SaaS providers. It tracks the macro-level impact of Internet events on individual users and enterprise networks connecting at the edge of the Internet. These events include Outages, Routing hijacks and leaks, DDoS attacks, And political interference, among others. Future releases of the Internet Insights API set will further unlock access to core Internet Insights functionality, unlocking potential integrations to enrich customer process flows. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -51,6 +51,7 @@ class ApiNetworkOutageDetails(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -61,7 +62,7 @@ class ApiNetworkOutageDetails(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_outage.py b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_outage.py index c0f465e6..a435e68b 100644 --- a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_outage.py +++ b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_outage.py @@ -5,7 +5,7 @@ We are happy to announce the release of the Internet Insights API set. This limited release includes endpoints that: * Make our catalog provider and Internet outage data accessible to API users. * Provide access to advanced filtering, which is part of our next-generation API efforts to allow API users to fine-tune queries across all of our APIs in a consistent manner. Internet Insights provide visibility into core Internet infrastructure, including ISPs, DNS providers, IaaS, CDNs , and SaaS providers. It tracks the macro-level impact of Internet events on individual users and enterprise networks connecting at the edge of the Internet. These events include Outages, Routing hijacks and leaks, DDoS attacks, And political interference, among others. Future releases of the Internet Insights API set will further unlock access to core Internet Insights functionality, unlocking potential integrations to enrich customer process flows. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -49,6 +49,7 @@ class ApiOutage(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -59,7 +60,7 @@ class ApiOutage(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_outage_filter.py b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_outage_filter.py index a81b249a..773c3f75 100644 --- a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_outage_filter.py +++ b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_outage_filter.py @@ -5,7 +5,7 @@ We are happy to announce the release of the Internet Insights API set. This limited release includes endpoints that: * Make our catalog provider and Internet outage data accessible to API users. * Provide access to advanced filtering, which is part of our next-generation API efforts to allow API users to fine-tune queries across all of our APIs in a consistent manner. Internet Insights provide visibility into core Internet infrastructure, including ISPs, DNS providers, IaaS, CDNs , and SaaS providers. It tracks the macro-level impact of Internet events on individual users and enterprise networks connecting at the edge of the Internet. These events include Outages, Routing hijacks and leaks, DDoS attacks, And political interference, among others. Future releases of the Internet Insights API set will further unlock access to core Internet Insights functionality, unlocking potential integrations to enrich customer process flows. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -40,6 +40,7 @@ class ApiOutageFilter(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -50,7 +51,7 @@ class ApiOutageFilter(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_outages_response.py b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_outages_response.py index c6f5b927..2cc2e411 100644 --- a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_outages_response.py +++ b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/api_outages_response.py @@ -5,7 +5,7 @@ We are happy to announce the release of the Internet Insights API set. This limited release includes endpoints that: * Make our catalog provider and Internet outage data accessible to API users. * Provide access to advanced filtering, which is part of our next-generation API efforts to allow API users to fine-tune queries across all of our APIs in a consistent manner. Internet Insights provide visibility into core Internet infrastructure, including ISPs, DNS providers, IaaS, CDNs , and SaaS providers. It tracks the macro-level impact of Internet events on individual users and enterprise networks connecting at the edge of the Internet. These events include Outages, Routing hijacks and leaks, DDoS attacks, And political interference, among others. Future releases of the Internet Insights API set will further unlock access to core Internet Insights functionality, unlocking potential integrations to enrich customer process flows. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class ApiOutagesResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class ApiOutagesResponse(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/error.py b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/error.py index 2fa09989..4805c9a5 100644 --- a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/error.py +++ b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/error.py @@ -5,7 +5,7 @@ We are happy to announce the release of the Internet Insights API set. This limited release includes endpoints that: * Make our catalog provider and Internet outage data accessible to API users. * Provide access to advanced filtering, which is part of our next-generation API efforts to allow API users to fine-tune queries across all of our APIs in a consistent manner. Internet Insights provide visibility into core Internet infrastructure, including ISPs, DNS providers, IaaS, CDNs , and SaaS providers. It tracks the macro-level impact of Internet events on individual users and enterprise networks connecting at the edge of the Internet. These events include Outages, Routing hijacks and leaks, DDoS attacks, And political interference, among others. Future releases of the Internet Insights API set will further unlock access to core Internet Insights functionality, unlocking potential integrations to enrich customer process flows. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -37,6 +37,7 @@ class Error(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -47,7 +48,7 @@ class Error(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/link.py b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/link.py index b740c038..c4d572c2 100644 --- a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/link.py +++ b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/link.py @@ -5,7 +5,7 @@ We are happy to announce the release of the Internet Insights API set. This limited release includes endpoints that: * Make our catalog provider and Internet outage data accessible to API users. * Provide access to advanced filtering, which is part of our next-generation API efforts to allow API users to fine-tune queries across all of our APIs in a consistent manner. Internet Insights provide visibility into core Internet infrastructure, including ISPs, DNS providers, IaaS, CDNs , and SaaS providers. It tracks the macro-level impact of Internet events on individual users and enterprise networks connecting at the edge of the Internet. These events include Outages, Routing hijacks and leaks, DDoS attacks, And political interference, among others. Future releases of the Internet Insights API set will further unlock access to core Internet Insights functionality, unlocking potential integrations to enrich customer process flows. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -40,6 +40,7 @@ class Link(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -50,7 +51,7 @@ class Link(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/outage_scope.py b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/outage_scope.py index 280e38b7..8196a430 100644 --- a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/outage_scope.py +++ b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/outage_scope.py @@ -5,7 +5,7 @@ We are happy to announce the release of the Internet Insights API set. This limited release includes endpoints that: * Make our catalog provider and Internet outage data accessible to API users. * Provide access to advanced filtering, which is part of our next-generation API efforts to allow API users to fine-tune queries across all of our APIs in a consistent manner. Internet Insights provide visibility into core Internet infrastructure, including ISPs, DNS providers, IaaS, CDNs , and SaaS providers. It tracks the macro-level impact of Internet events on individual users and enterprise networks connecting at the edge of the Internet. These events include Outages, Routing hijacks and leaks, DDoS attacks, And political interference, among others. Future releases of the Internet Insights API set will further unlock access to core Internet Insights functionality, unlocking potential integrations to enrich customer process flows. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/provider_location.py b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/provider_location.py index 482a3f94..443c49f3 100644 --- a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/provider_location.py +++ b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/provider_location.py @@ -5,7 +5,7 @@ We are happy to announce the release of the Internet Insights API set. This limited release includes endpoints that: * Make our catalog provider and Internet outage data accessible to API users. * Provide access to advanced filtering, which is part of our next-generation API efforts to allow API users to fine-tune queries across all of our APIs in a consistent manner. Internet Insights provide visibility into core Internet infrastructure, including ISPs, DNS providers, IaaS, CDNs , and SaaS providers. It tracks the macro-level impact of Internet events on individual users and enterprise networks connecting at the edge of the Internet. These events include Outages, Routing hijacks and leaks, DDoS attacks, And political interference, among others. Future releases of the Internet Insights API set will further unlock access to core Internet Insights functionality, unlocking potential integrations to enrich customer process flows. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class ProviderLocation(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class ProviderLocation(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/self_links.py b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/self_links.py index 03a293ac..bb142d55 100644 --- a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/self_links.py +++ b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/self_links.py @@ -5,7 +5,7 @@ We are happy to announce the release of the Internet Insights API set. This limited release includes endpoints that: * Make our catalog provider and Internet outage data accessible to API users. * Provide access to advanced filtering, which is part of our next-generation API efforts to allow API users to fine-tune queries across all of our APIs in a consistent manner. Internet Insights provide visibility into core Internet infrastructure, including ISPs, DNS providers, IaaS, CDNs , and SaaS providers. It tracks the macro-level impact of Internet events on individual users and enterprise networks connecting at the edge of the Internet. These events include Outages, Routing hijacks and leaks, DDoS attacks, And political interference, among others. Future releases of the Internet Insights API set will further unlock access to core Internet Insights functionality, unlocking potential integrations to enrich customer process flows. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class SelfLinks(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class SelfLinks(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/unauthorized_error.py b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/unauthorized_error.py index 762dfbe1..65bbf1ee 100644 --- a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/unauthorized_error.py +++ b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/unauthorized_error.py @@ -5,7 +5,7 @@ We are happy to announce the release of the Internet Insights API set. This limited release includes endpoints that: * Make our catalog provider and Internet outage data accessible to API users. * Provide access to advanced filtering, which is part of our next-generation API efforts to allow API users to fine-tune queries across all of our APIs in a consistent manner. Internet Insights provide visibility into core Internet infrastructure, including ISPs, DNS providers, IaaS, CDNs , and SaaS providers. It tracks the macro-level impact of Internet events on individual users and enterprise networks connecting at the edge of the Internet. These events include Outages, Routing hijacks and leaks, DDoS attacks, And political interference, among others. Future releases of the Internet Insights API set will further unlock access to core Internet Insights functionality, unlocking potential integrations to enrich customer process flows. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class UnauthorizedError(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class UnauthorizedError(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/validation_error.py b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/validation_error.py index b86894e9..381cfeb6 100644 --- a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/validation_error.py +++ b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/validation_error.py @@ -5,7 +5,7 @@ We are happy to announce the release of the Internet Insights API set. This limited release includes endpoints that: * Make our catalog provider and Internet outage data accessible to API users. * Provide access to advanced filtering, which is part of our next-generation API efforts to allow API users to fine-tune queries across all of our APIs in a consistent manner. Internet Insights provide visibility into core Internet infrastructure, including ISPs, DNS providers, IaaS, CDNs , and SaaS providers. It tracks the macro-level impact of Internet events on individual users and enterprise networks connecting at the edge of the Internet. These events include Outages, Routing hijacks and leaks, DDoS attacks, And political interference, among others. Future releases of the Internet Insights API set will further unlock access to core Internet Insights functionality, unlocking potential integrations to enrich customer process flows. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -39,6 +39,7 @@ class ValidationError(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -49,7 +50,7 @@ class ValidationError(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/validation_error_item.py b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/validation_error_item.py index b4cbe995..8d01a5ea 100644 --- a/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/validation_error_item.py +++ b/thousandeyes-sdk-internet-insights/src/thousandeyes_sdk/internet_insights/models/validation_error_item.py @@ -5,7 +5,7 @@ We are happy to announce the release of the Internet Insights API set. This limited release includes endpoints that: * Make our catalog provider and Internet outage data accessible to API users. * Provide access to advanced filtering, which is part of our next-generation API efforts to allow API users to fine-tune queries across all of our APIs in a consistent manner. Internet Insights provide visibility into core Internet infrastructure, including ISPs, DNS providers, IaaS, CDNs , and SaaS providers. It tracks the macro-level impact of Internet events on individual users and enterprise networks connecting at the edge of the Internet. These events include Outages, Routing hijacks and leaks, DDoS attacks, And political interference, among others. Future releases of the Internet Insights API set will further unlock access to core Internet Insights functionality, unlocking potential integrations to enrich customer process flows. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,7 +17,7 @@ import pprint import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +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 @@ -27,7 +27,7 @@ class ValidationErrorItem(BaseModel): ValidationErrorItem """ # noqa: E501 code: Optional[StrictStr] = Field(default=None, description="(Optional) A unique error type/code that can be referenced in the documentation for further details.") - var_field: Optional[StrictInt] = Field(default=None, description="Identifies the field that triggered this particular error.", alias="field") + var_field: Optional[StrictStr] = Field(default=None, description="Identifies the field that triggered this particular error.", alias="field") message: Optional[StrictStr] = Field(default=None, description="A short, human-readable summary of the error.") __properties: ClassVar[List[str]] = ["code", "field", "message"] @@ -35,6 +35,7 @@ class ValidationErrorItem(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class ValidationErrorItem(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-internet-insights/test/test_catalog_providers_api.py b/thousandeyes-sdk-internet-insights/test/test_catalog_providers_api.py new file mode 100644 index 00000000..dec81212 --- /dev/null +++ b/thousandeyes-sdk-internet-insights/test/test_catalog_providers_api.py @@ -0,0 +1,159 @@ +# coding: utf-8 + +""" + Internet Insights API + + We are happy to announce the release of the Internet Insights API set. This limited release includes endpoints that: * Make our catalog provider and Internet outage data accessible to API users. * Provide access to advanced filtering, which is part of our next-generation API efforts to allow API users to fine-tune queries across all of our APIs in a consistent manner. Internet Insights provide visibility into core Internet infrastructure, including ISPs, DNS providers, IaaS, CDNs , and SaaS providers. It tracks the macro-level impact of Internet events on individual users and enterprise networks connecting at the edge of the Internet. These events include Outages, Routing hijacks and leaks, DDoS attacks, And political interference, among others. Future releases of the Internet Insights API set will further unlock access to core Internet Insights functionality, unlocking potential integrations to enrich customer process flows. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.internet_insights.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.internet_insights.api.catalog_providers_api import CatalogProvidersApi + + +class TestCatalogProvidersApi(unittest.TestCase): + """CatalogProvidersApi unit test stubs""" + + def setUp(self) -> None: + self.api = CatalogProvidersApi() + + def tearDown(self) -> None: + pass + + def test_filter_catalog_providers_models_validation(self) -> None: + """Test case for filter_catalog_providers request and response models""" + request_body_json = """ + { + "providerName" : "Amazon Web Services", + "providerType" : "IAAS", + "region" : "North America", + "location" : "San Jose, US", + "asn" : "Amazon.com, Inc.", + "included" : true + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.internet_insights.models.ApiCatalogProviderFilter.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "providers" : [ { + "interfacesCount" : 15, + "locationsCount" : 50, + "_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" + } + }, + "countriesCount" : 2, + "dataType" : "Application", + "id" : "85602a0a-54a7-4e97-946e-67492ef1fa26", + "region" : "North America", + "asnsCount" : 10, + "included" : true, + "providerName" : "Amazon Web Services", + "providerType" : "IAAS" + }, { + "interfacesCount" : 15, + "locationsCount" : 50, + "_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" + } + }, + "countriesCount" : 2, + "dataType" : "Application", + "id" : "85602a0a-54a7-4e97-946e-67492ef1fa26", + "region" : "North America", + "asnsCount" : 10, + "included" : true, + "providerName" : "Amazon Web Services", + "providerType" : "IAAS" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.internet_insights.models.ApiCatalogProviderResponse.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_catalog_provider_models_validation(self) -> None: + """Test case for get_catalog_provider request and response models""" + + response_body_json = """ + { + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "dataType" : "Application", + "asns" : [ { + "name" : "LVLT-1 - Level 3 Communications, Inc.", + "id" : 1 + }, { + "name" : "LVLT-1 - Level 3 Communications, Inc.", + "id" : 1 + } ], + "locations" : [ { + "interfacesCount" : 5, + "location" : "San Jose, US" + }, { + "interfacesCount" : 5, + "location" : "San Jose, US" + } ], + "id" : "85602a0a-54a7-4e97-946e-67492ef1fa26", + "region" : "North America", + "providerName" : "Amazon Web Services", + "providerType" : "IAAS" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.internet_insights.models.ApiCatalogProviderDetails.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-internet-insights/test/test_outages_api_public_api.py b/thousandeyes-sdk-internet-insights/test/test_outages_api_public_api.py new file mode 100644 index 00000000..1b42b268 --- /dev/null +++ b/thousandeyes-sdk-internet-insights/test/test_outages_api_public_api.py @@ -0,0 +1,249 @@ +# coding: utf-8 + +""" + Internet Insights API + + We are happy to announce the release of the Internet Insights API set. This limited release includes endpoints that: * Make our catalog provider and Internet outage data accessible to API users. * Provide access to advanced filtering, which is part of our next-generation API efforts to allow API users to fine-tune queries across all of our APIs in a consistent manner. Internet Insights provide visibility into core Internet infrastructure, including ISPs, DNS providers, IaaS, CDNs , and SaaS providers. It tracks the macro-level impact of Internet events on individual users and enterprise networks connecting at the edge of the Internet. These events include Outages, Routing hijacks and leaks, DDoS attacks, And political interference, among others. Future releases of the Internet Insights API set will further unlock access to core Internet Insights functionality, unlocking potential integrations to enrich customer process flows. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.internet_insights.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.internet_insights.api.outages_api_public_api import OutagesAPIPublicApi + + +class TestOutagesAPIPublicApi(unittest.TestCase): + """OutagesAPIPublicApi unit test stubs""" + + def setUp(self) -> None: + self.api = OutagesAPIPublicApi() + + def tearDown(self) -> None: + pass + + def test_filter_outages_models_validation(self) -> None: + """Test case for filter_outages request and response models""" + request_body_json = """ + { + "startDate" : "2022-03-01T01:30:00Z", + "endDate" : "2022-03-01T23:30:15Z", + "outageScope" : "all", + "providerName" : [ "Telia", "Amazon" ], + "interfaceNetwork" : [ "Telianet", "Cloudflare" ], + "applicationName" : [ "slack", "facebook" ] + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.internet_insights.models.ApiOutageFilter.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "outages" : [ { + "affectedInterfacesCount" : 1, + "endDate" : "2022-03-01T23:31:11Z", + "_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" + } + }, + "affectedLocationsCount" : 1, + "endRoundId" : 1646177700, + "affectedTestsCount" : 1, + "type" : "app", + "providerType" : "SAAS", + "duration" : 214, + "startRoundId" : 1646177400, + "name" : "Google", + "id" : "xxxxxxxxxxxxxxxxxx1", + "affectedServersCount" : 2, + "asn" : 19994, + "providerName" : "Google", + "startDate" : "2022-03-01T23:31:11Z" + }, { + "affectedInterfacesCount" : 1, + "endDate" : "2022-03-01T23:31:11Z", + "_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" + } + }, + "affectedLocationsCount" : 1, + "endRoundId" : 1646177700, + "affectedTestsCount" : 1, + "type" : "app", + "providerType" : "SAAS", + "duration" : 214, + "startRoundId" : 1646177400, + "name" : "Google", + "id" : "xxxxxxxxxxxxxxxxxx1", + "affectedServersCount" : 2, + "asn" : 19994, + "providerName" : "Google", + "startDate" : "2022-03-01T23:31:11Z" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.internet_insights.models.ApiOutagesResponse.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_app_outage_models_validation(self) -> None: + """Test case for get_app_outage request and response models""" + + response_body_json = """ + { + "affectedDomains" : [ "amazon.com", "amazon.com" ], + "affectedTests" : [ { + "name" : "amazon-test2", + "id" : 5 + }, { + "name" : "amazon-test2", + "id" : 5 + } ], + "endDate" : "2023-01-27T20:53:51.256Z", + "_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" + } + }, + "endRoundId" : 1674852600, + "providerType" : "SAAS", + "duration" : 180, + "startRoundId" : 1674852600, + "affectedAgents" : [ { + "name" : "London, England", + "id" : 11 + }, { + "name" : "London, England", + "id" : 11 + } ], + "id" : "0CC4C4209887126DE42E92252FB43962CBB3193147F318EA", + "providerName" : "Amazon Web Services", + "applicationName" : "Amazon Web Services", + "startDate" : "2023-01-27T20:50:51.256Z", + "errors" : [ "HTTP_SERVER_TIMEOUT", "HTTP_SERVER_TIMEOUT" ], + "affectedLocations" : [ { + "location" : "Chicago, Illinois, US", + "affectedServers" : [ { + "prefix" : "123.176.185.0/23", + "domain" : "amazon.com" + }, { + "prefix" : "123.176.185.0/23", + "domain" : "amazon.com" + } ] + }, { + "location" : "Chicago, Illinois, US", + "affectedServers" : [ { + "prefix" : "123.176.185.0/23", + "domain" : "amazon.com" + }, { + "prefix" : "123.176.185.0/23", + "domain" : "amazon.com" + } ] + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.internet_insights.models.ApiApplicationOutageDetails.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_network_outage_models_validation(self) -> None: + """Test case for get_network_outage request and response models""" + + response_body_json = """ + { + "affectedDomains" : [ "periodic-failure.com", "periodic-failure.com" ], + "affectedTests" : [ { + "name" : "amazon-test2", + "id" : 5 + }, { + "name" : "amazon-test2", + "id" : 5 + } ], + "endDate" : "2023-01-27T20:53:51.256Z", + "_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" + } + }, + "networkName" : "Rackspace Hosting", + "endRoundId" : 1674852600, + "providerType" : "IAAS", + "duration" : 180, + "startRoundId" : 1674852600, + "affectedAgents" : [ { + "name" : "London, England", + "id" : 11 + }, { + "name" : "London, England", + "id" : 11 + } ], + "id" : "8EF2760862C705783A2F8BCBAAABB44F28DBC670DBA3B610", + "asn" : 19994, + "providerName" : "Rackspace", + "startDate" : "2023-01-27T20:50:51.256Z", + "affectedLocations" : [ { + "affectedInterfaces" : [ "50.51.52.53", "50.51.52.53" ], + "location" : "Chicago, Illinois, US" + }, { + "affectedInterfaces" : [ "50.51.52.53", "50.51.52.53" ], + "location" : "Chicago, Illinois, US" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.internet_insights.models.ApiNetworkOutageDetails.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-internet-insights/test/test_utils.py b/thousandeyes-sdk-internet-insights/test/test_utils.py new file mode 100644 index 00000000..930528d9 --- /dev/null +++ b/thousandeyes-sdk-internet-insights/test/test_utils.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +import json +import unittest + +from pydantic import BaseModel + + +def assert_constructed_model_matches_example_json(model: BaseModel, loaded_json: dict): + test_case = unittest.TestCase() + test_case.maxDiff = None + test_case.assertIsNotNone(model) + constructed_json = json.loads(model.to_json()) + sorted_loaded_json = json.dumps(loaded_json, sort_keys=True) + sorted_constructed_json = json.dumps(constructed_json, sort_keys=True) + test_case.assertEqual(sorted_loaded_json, sorted_constructed_json) diff --git a/thousandeyes-sdk-labels/.openapi-generator/FILES b/thousandeyes-sdk-labels/.openapi-generator/FILES index f4e3a34d..3318d522 100644 --- a/thousandeyes-sdk-labels/.openapi-generator/FILES +++ b/thousandeyes-sdk-labels/.openapi-generator/FILES @@ -39,14 +39,9 @@ src/thousandeyes_sdk/labels/models/validation_error.py src/thousandeyes_sdk/labels/models/validation_error_item.py src/thousandeyes_sdk/labels/py.typed test/__init__.py -test/test_error.py -test/test_label.py -test/test_label_detail.py -test/test_label_request.py -test/test_label_type.py -test/test_labels.py -test/test_link.py -test/test_self_links.py -test/test_unauthorized_error.py -test/test_validation_error.py -test/test_validation_error_item.py +test/test_agent_api.py +test/test_all_labels_api.py +test/test_dashboard_api.py +test/test_endpoint_test_api.py +test/test_test_api.py +test/test_utils.py diff --git a/thousandeyes-sdk-labels/README.md b/thousandeyes-sdk-labels/README.md index 85dce57d..7d3b6b26 100644 --- a/thousandeyes-sdk-labels/README.md +++ b/thousandeyes-sdk-labels/README.md @@ -4,8 +4,7 @@ This is API for the Labels API (formerly called groups). This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.4 -- Package version: 1.0.0 +- API version: 7.0.6 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator @@ -19,9 +18,9 @@ Python 3.7+ If the python package is hosted on a repository, you can install directly using: ```sh -pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +pip install -e git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git#egg=thousandeyes-sdk-labels\&subdirectory=thousandeyes-sdk-labels ``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) +(you may need to run `pip` with root permission: `sudo pip install -e git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git#egg=thousandeyes-sdk-labels\&subdirectory=thousandeyes-sdk-labels`) Then import the package: ```python @@ -108,7 +107,7 @@ Class | Method | HTTP request | Description *DashboardApi* | [**get_dashboard_label**](docs/DashboardApi.md#get_dashboard_label) | **GET** /v7/labels/dashboard/{labelId} | Get a Label object of type `dashboard` *DashboardApi* | [**get_dashboard_labels**](docs/DashboardApi.md#get_dashboard_labels) | **GET** /v7/labels/dashboard | Get list of Labels of type `dashboard` *DashboardApi* | [**update_dashboard_label**](docs/DashboardApi.md#update_dashboard_label) | **PUT** /v7/labels/dashboard/{labelId} | Update a Label object of type `dashboard` -*EndpointTestApi* | [**create_endpoint_tests_label**](docs/EndpointTestApi.md#create_endpoint_tests_label) | **POST** /v7/labels/endpoint-test | Create a Label of type `endpoint-test` +*EndpointTestApi* | [**create_endpoint_test_label**](docs/EndpointTestApi.md#create_endpoint_test_label) | **POST** /v7/labels/endpoint-test | Create a Label of type `endpoint-test` *EndpointTestApi* | [**delete_endpoint_test_label**](docs/EndpointTestApi.md#delete_endpoint_test_label) | **DELETE** /v7/labels/endpoint-test/{labelId} | Delete a Label object of type `endpoint-test` *EndpointTestApi* | [**get_endpoint_test_label**](docs/EndpointTestApi.md#get_endpoint_test_label) | **GET** /v7/labels/endpoint-test/{labelId} | Get a Label object of type `endpoint-test` *EndpointTestApi* | [**get_endpoint_test_labels**](docs/EndpointTestApi.md#get_endpoint_test_labels) | **GET** /v7/labels/endpoint-test | Get list of Labels of type `endpoint-test` diff --git a/thousandeyes-sdk-labels/docs/AgentApi.md b/thousandeyes-sdk-labels/docs/AgentApi.md index 08f8034b..e0bdb542 100644 --- a/thousandeyes-sdk-labels/docs/AgentApi.md +++ b/thousandeyes-sdk-labels/docs/AgentApi.md @@ -82,7 +82,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -163,7 +163,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/problem+json + - **Accept**: application/json, application/problem+json ### HTTP response details @@ -247,7 +247,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -331,7 +331,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -418,7 +418,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-labels/docs/AllLabelsApi.md b/thousandeyes-sdk-labels/docs/AllLabelsApi.md index 0f185fa0..9b407760 100644 --- a/thousandeyes-sdk-labels/docs/AllLabelsApi.md +++ b/thousandeyes-sdk-labels/docs/AllLabelsApi.md @@ -75,7 +75,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-labels/docs/DashboardApi.md b/thousandeyes-sdk-labels/docs/DashboardApi.md index ac820ebb..77d9b901 100644 --- a/thousandeyes-sdk-labels/docs/DashboardApi.md +++ b/thousandeyes-sdk-labels/docs/DashboardApi.md @@ -82,7 +82,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -163,7 +163,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/problem+json + - **Accept**: application/json, application/problem+json ### HTTP response details @@ -247,7 +247,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -331,7 +331,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -418,7 +418,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-labels/docs/EndpointTestApi.md b/thousandeyes-sdk-labels/docs/EndpointTestApi.md index ac8aa95e..a08728e0 100644 --- a/thousandeyes-sdk-labels/docs/EndpointTestApi.md +++ b/thousandeyes-sdk-labels/docs/EndpointTestApi.md @@ -4,15 +4,15 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**create_endpoint_tests_label**](EndpointTestApi.md#create_endpoint_tests_label) | **POST** /v7/labels/endpoint-test | Create a Label of type `endpoint-test` +[**create_endpoint_test_label**](EndpointTestApi.md#create_endpoint_test_label) | **POST** /v7/labels/endpoint-test | Create a Label of type `endpoint-test` [**delete_endpoint_test_label**](EndpointTestApi.md#delete_endpoint_test_label) | **DELETE** /v7/labels/endpoint-test/{labelId} | Delete a Label object of type `endpoint-test` [**get_endpoint_test_label**](EndpointTestApi.md#get_endpoint_test_label) | **GET** /v7/labels/endpoint-test/{labelId} | Get a Label object of type `endpoint-test` [**get_endpoint_test_labels**](EndpointTestApi.md#get_endpoint_test_labels) | **GET** /v7/labels/endpoint-test | Get list of Labels of type `endpoint-test` [**update_endpoint_test_label**](EndpointTestApi.md#update_endpoint_test_label) | **PUT** /v7/labels/endpoint-test/{labelId} | Update a Label object of type `endpoint-test` -# **create_endpoint_tests_label** -> LabelDetail create_endpoint_tests_label(aid=aid, label_request=label_request) +# **create_endpoint_test_label** +> LabelDetail create_endpoint_test_label(aid=aid, label_request=label_request) Create a Label of type `endpoint-test` @@ -54,11 +54,11 @@ with thousandeyes_sdk.labels.ApiClient(configuration) as api_client: try: # Create a Label of type `endpoint-test` - api_response = api_instance.create_endpoint_tests_label(aid=aid, label_request=label_request) - print("The response of EndpointTestApi->create_endpoint_tests_label:\n") + api_response = api_instance.create_endpoint_test_label(aid=aid, label_request=label_request) + print("The response of EndpointTestApi->create_endpoint_test_label:\n") pprint(api_response) except Exception as e: - print("Exception when calling EndpointTestApi->create_endpoint_tests_label: %s\n" % e) + print("Exception when calling EndpointTestApi->create_endpoint_test_label: %s\n" % e) ``` @@ -82,7 +82,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -163,7 +163,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/problem+json + - **Accept**: application/json, application/problem+json ### HTTP response details @@ -247,7 +247,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -331,7 +331,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -418,7 +418,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-labels/docs/TestApi.md b/thousandeyes-sdk-labels/docs/TestApi.md index ba425cf0..a457d593 100644 --- a/thousandeyes-sdk-labels/docs/TestApi.md +++ b/thousandeyes-sdk-labels/docs/TestApi.md @@ -82,7 +82,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -163,7 +163,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/problem+json + - **Accept**: application/json, application/problem+json ### HTTP response details @@ -247,7 +247,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -331,7 +331,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -418,7 +418,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-labels/docs/ValidationErrorItem.md b/thousandeyes-sdk-labels/docs/ValidationErrorItem.md index 6a1d9e13..86a0278a 100644 --- a/thousandeyes-sdk-labels/docs/ValidationErrorItem.md +++ b/thousandeyes-sdk-labels/docs/ValidationErrorItem.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **code** | **str** | (Optional) A unique error type/code that can be referenced in the documentation for further details. | [optional] -**var_field** | **int** | Identifies the field that triggered this particular error. | [optional] +**var_field** | **str** | Identifies the field that triggered this particular error. | [optional] **message** | **str** | A short, human-readable summary of the error. | [optional] ## Example diff --git a/thousandeyes-sdk-labels/pyproject.toml b/thousandeyes-sdk-labels/pyproject.toml index 4bcf6824..56b8ffd1 100644 --- a/thousandeyes-sdk-labels/pyproject.toml +++ b/thousandeyes-sdk-labels/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "thousandeyes-sdk-labels" -version = "1.0.0" +dynamic = ["version"] authors = [ { name = "ThousandEyes API Team", email = "api-team@thousandeyes.com" } ] @@ -11,9 +11,12 @@ dependencies = [ "python-dateutil >=2.8.2", "pydantic >=2", "typing-extensions >=4.7.1", - "thousandeyes-sdk-client==1.0.0", + "thousandeyes-sdk-core", ] +[tool.setuptools.dynamic] +version = {attr = "thousandeyes_sdk.client.__version__"} + [project.optional-dependencies] test = [ "pytest~=7.1.3", diff --git a/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/__init__.py b/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/__init__.py index e7b38d62..5beadd28 100644 --- a/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/__init__.py +++ b/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/__init__.py @@ -7,15 +7,13 @@ ### Overview This is API for the Labels API (formerly called groups). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 -__version__ = "1.0.0" - # import apis into sdk package from thousandeyes_sdk.labels.api.agent_api import AgentApi from thousandeyes_sdk.labels.api.all_labels_api import AllLabelsApi diff --git a/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/api/agent_api.py b/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/api/agent_api.py index 4b948b1e..7a1b65f2 100644 --- a/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/api/agent_api.py +++ b/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/api/agent_api.py @@ -5,7 +5,7 @@ ### Overview This is API for the Labels API (formerly called groups). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -28,6 +28,7 @@ from thousandeyes_sdk.labels.models.labels import Labels from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class AgentApi: @@ -40,6 +41,7 @@ class AgentApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @@ -311,6 +313,7 @@ class AgentApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -616,6 +619,7 @@ class AgentApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ + 'application/json', 'application/problem+json' ] ) @@ -909,6 +913,7 @@ class AgentApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1190,6 +1195,7 @@ class AgentApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1498,6 +1504,7 @@ class AgentApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/api/all_labels_api.py b/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/api/all_labels_api.py index 3ea06154..b9e9fb5b 100644 --- a/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/api/all_labels_api.py +++ b/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/api/all_labels_api.py @@ -5,7 +5,7 @@ ### Overview This is API for the Labels API (formerly called groups). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -26,6 +26,7 @@ from thousandeyes_sdk.labels.models.labels import Labels from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class AllLabelsApi: @@ -38,6 +39,7 @@ class AllLabelsApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @@ -294,6 +296,7 @@ class AllLabelsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/api/dashboard_api.py b/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/api/dashboard_api.py index c71d50e5..473f0f94 100644 --- a/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/api/dashboard_api.py +++ b/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/api/dashboard_api.py @@ -5,7 +5,7 @@ ### Overview This is API for the Labels API (formerly called groups). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -28,6 +28,7 @@ from thousandeyes_sdk.labels.models.labels import Labels from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class DashboardApi: @@ -40,6 +41,7 @@ class DashboardApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @@ -311,6 +313,7 @@ class DashboardApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -616,6 +619,7 @@ class DashboardApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ + 'application/json', 'application/problem+json' ] ) @@ -909,6 +913,7 @@ class DashboardApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1190,6 +1195,7 @@ class DashboardApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1498,6 +1504,7 @@ class DashboardApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/api/endpoint_test_api.py b/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/api/endpoint_test_api.py index 363b7710..b4275342 100644 --- a/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/api/endpoint_test_api.py +++ b/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/api/endpoint_test_api.py @@ -5,7 +5,7 @@ ### Overview This is API for the Labels API (formerly called groups). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -28,6 +28,7 @@ from thousandeyes_sdk.labels.models.labels import Labels from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class EndpointTestApi: @@ -40,11 +41,12 @@ class EndpointTestApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @validate_call - def create_endpoint_tests_label( + def create_endpoint_test_label( 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, label_request: Annotated[Optional[LabelRequest], Field(description="Label resource")] = None, @@ -91,7 +93,7 @@ class EndpointTestApi: :return: Returns the result object. """ # noqa: E501 - _param = self._create_endpoint_tests_label_serialize( + _param = self._create_endpoint_test_label_serialize( aid=aid, label_request=label_request, _request_auth=_request_auth, @@ -122,7 +124,7 @@ class EndpointTestApi: @validate_call - def create_endpoint_tests_label_with_http_info( + def create_endpoint_test_label_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, label_request: Annotated[Optional[LabelRequest], Field(description="Label resource")] = None, @@ -169,7 +171,7 @@ class EndpointTestApi: :return: Returns the result object. """ # noqa: E501 - _param = self._create_endpoint_tests_label_serialize( + _param = self._create_endpoint_test_label_serialize( aid=aid, label_request=label_request, _request_auth=_request_auth, @@ -200,7 +202,7 @@ class EndpointTestApi: @validate_call - def create_endpoint_tests_label_without_preload_content( + def create_endpoint_test_label_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, label_request: Annotated[Optional[LabelRequest], Field(description="Label resource")] = None, @@ -247,7 +249,7 @@ class EndpointTestApi: :return: Returns the result object. """ # noqa: E501 - _param = self._create_endpoint_tests_label_serialize( + _param = self._create_endpoint_test_label_serialize( aid=aid, label_request=label_request, _request_auth=_request_auth, @@ -272,7 +274,7 @@ class EndpointTestApi: return response_data.response - def _create_endpoint_tests_label_serialize( + def _create_endpoint_test_label_serialize( self, aid, label_request, @@ -311,6 +313,7 @@ class EndpointTestApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -616,6 +619,7 @@ class EndpointTestApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ + 'application/json', 'application/problem+json' ] ) @@ -909,6 +913,7 @@ class EndpointTestApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1190,6 +1195,7 @@ class EndpointTestApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1498,6 +1504,7 @@ class EndpointTestApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/api/test_api.py b/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/api/test_api.py index 84555990..d0c61895 100644 --- a/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/api/test_api.py +++ b/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/api/test_api.py @@ -5,7 +5,7 @@ ### Overview This is API for the Labels API (formerly called groups). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -28,6 +28,7 @@ from thousandeyes_sdk.labels.models.labels import Labels from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class TestApi: @@ -40,6 +41,7 @@ class TestApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @@ -311,6 +313,7 @@ class TestApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -616,6 +619,7 @@ class TestApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ + 'application/json', 'application/problem+json' ] ) @@ -909,6 +913,7 @@ class TestApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1190,6 +1195,7 @@ class TestApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1498,6 +1504,7 @@ class TestApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/models/__init__.py b/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/models/__init__.py index 57d7f935..2857df79 100644 --- a/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/models/__init__.py +++ b/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/models/__init__.py @@ -6,7 +6,7 @@ ### Overview This is API for the Labels API (formerly called groups). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/models/error.py b/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/models/error.py index 5af11ebb..cf8023c8 100644 --- a/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/models/error.py +++ b/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/models/error.py @@ -5,7 +5,7 @@ ### Overview This is API for the Labels API (formerly called groups). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -37,6 +37,7 @@ class Error(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -47,7 +48,7 @@ class Error(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/models/label.py b/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/models/label.py index e9c0b477..599d1a67 100644 --- a/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/models/label.py +++ b/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/models/label.py @@ -5,7 +5,7 @@ ### Overview This is API for the Labels API (formerly called groups). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -37,6 +37,7 @@ class Label(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -47,7 +48,7 @@ class Label(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/models/label_detail.py b/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/models/label_detail.py index 5725b8db..be383396 100644 --- a/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/models/label_detail.py +++ b/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/models/label_detail.py @@ -5,7 +5,7 @@ ### Overview This is API for the Labels API (formerly called groups). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -40,6 +40,7 @@ class LabelDetail(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -50,7 +51,7 @@ class LabelDetail(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/models/label_request.py b/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/models/label_request.py index ba99becf..7c618d16 100644 --- a/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/models/label_request.py +++ b/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/models/label_request.py @@ -5,7 +5,7 @@ ### Overview This is API for the Labels API (formerly called groups). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class LabelRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class LabelRequest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/models/label_type.py b/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/models/label_type.py index 18525ca4..0025e78b 100644 --- a/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/models/label_type.py +++ b/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/models/label_type.py @@ -5,7 +5,7 @@ ### Overview This is API for the Labels API (formerly called groups). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/models/labels.py b/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/models/labels.py index cbbd6244..673ab6a1 100644 --- a/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/models/labels.py +++ b/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/models/labels.py @@ -5,7 +5,7 @@ ### Overview This is API for the Labels API (formerly called groups). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class Labels(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class Labels(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/models/link.py b/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/models/link.py index 0df47ebd..10696e8b 100644 --- a/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/models/link.py +++ b/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/models/link.py @@ -5,7 +5,7 @@ ### Overview This is API for the Labels API (formerly called groups). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -40,6 +40,7 @@ class Link(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -50,7 +51,7 @@ class Link(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/models/self_links.py b/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/models/self_links.py index d99a8367..66ca5df7 100644 --- a/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/models/self_links.py +++ b/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/models/self_links.py @@ -5,7 +5,7 @@ ### Overview This is API for the Labels API (formerly called groups). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class SelfLinks(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class SelfLinks(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/models/unauthorized_error.py b/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/models/unauthorized_error.py index 799ae678..5aca4634 100644 --- a/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/models/unauthorized_error.py +++ b/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/models/unauthorized_error.py @@ -5,7 +5,7 @@ ### Overview This is API for the Labels API (formerly called groups). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class UnauthorizedError(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class UnauthorizedError(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/models/validation_error.py b/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/models/validation_error.py index 72e9fed5..ba575515 100644 --- a/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/models/validation_error.py +++ b/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/models/validation_error.py @@ -5,7 +5,7 @@ ### Overview This is API for the Labels API (formerly called groups). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -39,6 +39,7 @@ class ValidationError(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -49,7 +50,7 @@ class ValidationError(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/models/validation_error_item.py b/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/models/validation_error_item.py index 3456ff49..32d76442 100644 --- a/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/models/validation_error_item.py +++ b/thousandeyes-sdk-labels/src/thousandeyes_sdk/labels/models/validation_error_item.py @@ -5,7 +5,7 @@ ### Overview This is API for the Labels API (formerly called groups). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,7 +17,7 @@ import pprint import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +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 @@ -27,7 +27,7 @@ class ValidationErrorItem(BaseModel): ValidationErrorItem """ # noqa: E501 code: Optional[StrictStr] = Field(default=None, description="(Optional) A unique error type/code that can be referenced in the documentation for further details.") - var_field: Optional[StrictInt] = Field(default=None, description="Identifies the field that triggered this particular error.", alias="field") + var_field: Optional[StrictStr] = Field(default=None, description="Identifies the field that triggered this particular error.", alias="field") message: Optional[StrictStr] = Field(default=None, description="A short, human-readable summary of the error.") __properties: ClassVar[List[str]] = ["code", "field", "message"] @@ -35,6 +35,7 @@ class ValidationErrorItem(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class ValidationErrorItem(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-labels/test/test_agent_api.py b/thousandeyes-sdk-labels/test/test_agent_api.py new file mode 100644 index 00000000..4f605703 --- /dev/null +++ b/thousandeyes-sdk-labels/test/test_agent_api.py @@ -0,0 +1,174 @@ +# coding: utf-8 + +""" + Labels API + + ### Overview This is API for the Labels API (formerly called groups). + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.labels.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.labels.api.agent_api import AgentApi + + +class TestAgentApi(unittest.TestCase): + """AgentApi unit test stubs""" + + def setUp(self) -> None: + self.api = AgentApi() + + def tearDown(self) -> None: + pass + + def test_create_agent_label_models_validation(self) -> None: + """Test case for create_agent_label request and response models""" + request_body_json = """ + { + "name" : "My new label", + "ids" : [ "5048", "1234" ] + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.labels.models.LabelRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "labelId" : "961123", + "_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" + } + }, + "name" : "Label XYZ", + "ids" : [ "231286", "6317a3ca0d2bfc6ab882d6ce", "6317a3ca0d2bfc6ab882d6ca" ], + "isBuiltIn" : true, + "type" : "endpoint-test" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.labels.models.LabelDetail.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_delete_agent_label_models_validation(self) -> None: + """Test case for delete_agent_label request and response models""" + + + def test_get_agent_label_models_validation(self) -> None: + """Test case for get_agent_label request and response models""" + + response_body_json = """ + { + "labelId" : "961123", + "_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" + } + }, + "name" : "Label XYZ", + "ids" : [ "231286", "6317a3ca0d2bfc6ab882d6ce", "6317a3ca0d2bfc6ab882d6ca" ], + "isBuiltIn" : true, + "type" : "endpoint-test" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.labels.models.LabelDetail.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_agent_labels_models_validation(self) -> None: + """Test case for get_agent_labels request and response models""" + + response_body_json = """ + { + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "labels" : [ { + "labelId" : "961123", + "name" : "Label XYZ", + "isBuiltIn" : true, + "type" : "endpoint-test" + }, { + "labelId" : "961123", + "name" : "Label XYZ", + "isBuiltIn" : true, + "type" : "endpoint-test" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.labels.models.Labels.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_update_agent_label_models_validation(self) -> None: + """Test case for update_agent_label request and response models""" + request_body_json = """ + { + "name" : "My new label", + "ids" : [ "5048", "1234" ] + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.labels.models.LabelRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "labelId" : "961123", + "_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" + } + }, + "name" : "Label XYZ", + "ids" : [ "231286", "6317a3ca0d2bfc6ab882d6ce", "6317a3ca0d2bfc6ab882d6ca" ], + "isBuiltIn" : true, + "type" : "endpoint-test" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.labels.models.LabelDetail.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-labels/test/test_all_labels_api.py b/thousandeyes-sdk-labels/test/test_all_labels_api.py new file mode 100644 index 00000000..b07daeb2 --- /dev/null +++ b/thousandeyes-sdk-labels/test/test_all_labels_api.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Labels API + + ### Overview This is API for the Labels API (formerly called groups). + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.labels.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.labels.api.all_labels_api import AllLabelsApi + + +class TestAllLabelsApi(unittest.TestCase): + """AllLabelsApi unit test stubs""" + + def setUp(self) -> None: + self.api = AllLabelsApi() + + def tearDown(self) -> None: + pass + + def test_get_labels_models_validation(self) -> None: + """Test case for get_labels request and response models""" + + response_body_json = """ + { + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "labels" : [ { + "labelId" : "961123", + "name" : "Label XYZ", + "isBuiltIn" : true, + "type" : "endpoint-test" + }, { + "labelId" : "961123", + "name" : "Label XYZ", + "isBuiltIn" : true, + "type" : "endpoint-test" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.labels.models.Labels.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-labels/test/test_dashboard_api.py b/thousandeyes-sdk-labels/test/test_dashboard_api.py new file mode 100644 index 00000000..02693894 --- /dev/null +++ b/thousandeyes-sdk-labels/test/test_dashboard_api.py @@ -0,0 +1,174 @@ +# coding: utf-8 + +""" + Labels API + + ### Overview This is API for the Labels API (formerly called groups). + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.labels.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.labels.api.dashboard_api import DashboardApi + + +class TestDashboardApi(unittest.TestCase): + """DashboardApi unit test stubs""" + + def setUp(self) -> None: + self.api = DashboardApi() + + def tearDown(self) -> None: + pass + + def test_create_dashboard_label_models_validation(self) -> None: + """Test case for create_dashboard_label request and response models""" + request_body_json = """ + { + "name" : "My new label", + "ids" : [ "5048", "1234" ] + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.labels.models.LabelRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "labelId" : "961123", + "_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" + } + }, + "name" : "Label XYZ", + "ids" : [ "231286", "6317a3ca0d2bfc6ab882d6ce", "6317a3ca0d2bfc6ab882d6ca" ], + "isBuiltIn" : true, + "type" : "endpoint-test" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.labels.models.LabelDetail.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_delete_dashboard_label_models_validation(self) -> None: + """Test case for delete_dashboard_label request and response models""" + + + def test_get_dashboard_label_models_validation(self) -> None: + """Test case for get_dashboard_label request and response models""" + + response_body_json = """ + { + "labelId" : "961123", + "_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" + } + }, + "name" : "Label XYZ", + "ids" : [ "231286", "6317a3ca0d2bfc6ab882d6ce", "6317a3ca0d2bfc6ab882d6ca" ], + "isBuiltIn" : true, + "type" : "endpoint-test" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.labels.models.LabelDetail.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_dashboard_labels_models_validation(self) -> None: + """Test case for get_dashboard_labels request and response models""" + + response_body_json = """ + { + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "labels" : [ { + "labelId" : "961123", + "name" : "Label XYZ", + "isBuiltIn" : true, + "type" : "endpoint-test" + }, { + "labelId" : "961123", + "name" : "Label XYZ", + "isBuiltIn" : true, + "type" : "endpoint-test" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.labels.models.Labels.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_update_dashboard_label_models_validation(self) -> None: + """Test case for update_dashboard_label request and response models""" + request_body_json = """ + { + "name" : "My new label", + "ids" : [ "5048", "1234" ] + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.labels.models.LabelRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "labelId" : "961123", + "_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" + } + }, + "name" : "Label XYZ", + "ids" : [ "231286", "6317a3ca0d2bfc6ab882d6ce", "6317a3ca0d2bfc6ab882d6ca" ], + "isBuiltIn" : true, + "type" : "endpoint-test" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.labels.models.LabelDetail.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-labels/test/test_endpoint_test_api.py b/thousandeyes-sdk-labels/test/test_endpoint_test_api.py new file mode 100644 index 00000000..a9f9dd43 --- /dev/null +++ b/thousandeyes-sdk-labels/test/test_endpoint_test_api.py @@ -0,0 +1,174 @@ +# coding: utf-8 + +""" + Labels API + + ### Overview This is API for the Labels API (formerly called groups). + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.labels.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.labels.api.endpoint_test_api import EndpointTestApi + + +class TestEndpointTestApi(unittest.TestCase): + """EndpointTestApi unit test stubs""" + + def setUp(self) -> None: + self.api = EndpointTestApi() + + def tearDown(self) -> None: + pass + + def test_create_endpoint_test_label_models_validation(self) -> None: + """Test case for create_endpoint_test_label request and response models""" + request_body_json = """ + { + "name" : "My new label", + "ids" : [ "5048", "1234" ] + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.labels.models.LabelRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "labelId" : "961123", + "_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" + } + }, + "name" : "Label XYZ", + "ids" : [ "231286", "6317a3ca0d2bfc6ab882d6ce", "6317a3ca0d2bfc6ab882d6ca" ], + "isBuiltIn" : true, + "type" : "endpoint-test" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.labels.models.LabelDetail.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_delete_endpoint_test_label_models_validation(self) -> None: + """Test case for delete_endpoint_test_label request and response models""" + + + def test_get_endpoint_test_label_models_validation(self) -> None: + """Test case for get_endpoint_test_label request and response models""" + + response_body_json = """ + { + "labelId" : "961123", + "_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" + } + }, + "name" : "Label XYZ", + "ids" : [ "231286", "6317a3ca0d2bfc6ab882d6ce", "6317a3ca0d2bfc6ab882d6ca" ], + "isBuiltIn" : true, + "type" : "endpoint-test" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.labels.models.LabelDetail.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_endpoint_test_labels_models_validation(self) -> None: + """Test case for get_endpoint_test_labels request and response models""" + + response_body_json = """ + { + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "labels" : [ { + "labelId" : "961123", + "name" : "Label XYZ", + "isBuiltIn" : true, + "type" : "endpoint-test" + }, { + "labelId" : "961123", + "name" : "Label XYZ", + "isBuiltIn" : true, + "type" : "endpoint-test" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.labels.models.Labels.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_update_endpoint_test_label_models_validation(self) -> None: + """Test case for update_endpoint_test_label request and response models""" + request_body_json = """ + { + "name" : "My new label", + "ids" : [ "5048", "1234" ] + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.labels.models.LabelRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "labelId" : "961123", + "_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" + } + }, + "name" : "Label XYZ", + "ids" : [ "231286", "6317a3ca0d2bfc6ab882d6ce", "6317a3ca0d2bfc6ab882d6ca" ], + "isBuiltIn" : true, + "type" : "endpoint-test" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.labels.models.LabelDetail.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-labels/test/test_test_api.py b/thousandeyes-sdk-labels/test/test_test_api.py new file mode 100644 index 00000000..fb928694 --- /dev/null +++ b/thousandeyes-sdk-labels/test/test_test_api.py @@ -0,0 +1,174 @@ +# coding: utf-8 + +""" + Labels API + + ### Overview This is API for the Labels API (formerly called groups). + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.labels.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.labels.api.test_api import TestApi + + +class TestTestApi(unittest.TestCase): + """TestApi unit test stubs""" + + def setUp(self) -> None: + self.api = TestApi() + + def tearDown(self) -> None: + pass + + def test_create_test_label_models_validation(self) -> None: + """Test case for create_test_label request and response models""" + request_body_json = """ + { + "name" : "My new label", + "ids" : [ "5048", "1234" ] + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.labels.models.LabelRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "labelId" : "961123", + "_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" + } + }, + "name" : "Label XYZ", + "ids" : [ "231286", "6317a3ca0d2bfc6ab882d6ce", "6317a3ca0d2bfc6ab882d6ca" ], + "isBuiltIn" : true, + "type" : "endpoint-test" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.labels.models.LabelDetail.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_delete_test_label_models_validation(self) -> None: + """Test case for delete_test_label request and response models""" + + + def test_get_test_label_models_validation(self) -> None: + """Test case for get_test_label request and response models""" + + response_body_json = """ + { + "labelId" : "961123", + "_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" + } + }, + "name" : "Label XYZ", + "ids" : [ "231286", "6317a3ca0d2bfc6ab882d6ce", "6317a3ca0d2bfc6ab882d6ca" ], + "isBuiltIn" : true, + "type" : "endpoint-test" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.labels.models.LabelDetail.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_test_labels_models_validation(self) -> None: + """Test case for get_test_labels request and response models""" + + response_body_json = """ + { + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "labels" : [ { + "labelId" : "961123", + "name" : "Label XYZ", + "isBuiltIn" : true, + "type" : "endpoint-test" + }, { + "labelId" : "961123", + "name" : "Label XYZ", + "isBuiltIn" : true, + "type" : "endpoint-test" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.labels.models.Labels.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_update_test_label_models_validation(self) -> None: + """Test case for update_test_label request and response models""" + request_body_json = """ + { + "name" : "My new label", + "ids" : [ "5048", "1234" ] + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.labels.models.LabelRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "labelId" : "961123", + "_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" + } + }, + "name" : "Label XYZ", + "ids" : [ "231286", "6317a3ca0d2bfc6ab882d6ce", "6317a3ca0d2bfc6ab882d6ca" ], + "isBuiltIn" : true, + "type" : "endpoint-test" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.labels.models.LabelDetail.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-labels/test/test_utils.py b/thousandeyes-sdk-labels/test/test_utils.py new file mode 100644 index 00000000..930528d9 --- /dev/null +++ b/thousandeyes-sdk-labels/test/test_utils.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +import json +import unittest + +from pydantic import BaseModel + + +def assert_constructed_model_matches_example_json(model: BaseModel, loaded_json: dict): + test_case = unittest.TestCase() + test_case.maxDiff = None + test_case.assertIsNotNone(model) + constructed_json = json.loads(model.to_json()) + sorted_loaded_json = json.dumps(loaded_json, sort_keys=True) + sorted_constructed_json = json.dumps(constructed_json, sort_keys=True) + test_case.assertEqual(sorted_loaded_json, sorted_constructed_json) diff --git a/thousandeyes-sdk-snapshots/.openapi-generator/FILES b/thousandeyes-sdk-snapshots/.openapi-generator/FILES index b4dbce8b..717c7bb2 100644 --- a/thousandeyes-sdk-snapshots/.openapi-generator/FILES +++ b/thousandeyes-sdk-snapshots/.openapi-generator/FILES @@ -41,19 +41,5 @@ src/thousandeyes_sdk/snapshots/models/validation_error.py src/thousandeyes_sdk/snapshots/models/validation_error_item.py src/thousandeyes_sdk/snapshots/py.typed test/__init__.py -test/test_app_and_self_links.py -test/test_error.py -test/test_link.py -test/test_snapshot_links.py -test/test_snapshot_request.py -test/test_snapshot_response.py -test/test_snapshot_test.py -test/test_test_interval.py -test/test_test_links.py -test/test_test_self_link.py -test/test_test_type.py -test/test_unauthorized_error.py -test/test_unexpanded_instant_test.py -test/test_unexpanded_test.py -test/test_validation_error.py -test/test_validation_error_item.py +test/test_create_test_snapshot_api.py +test/test_utils.py diff --git a/thousandeyes-sdk-snapshots/README.md b/thousandeyes-sdk-snapshots/README.md index 42346917..fff7a502 100644 --- a/thousandeyes-sdk-snapshots/README.md +++ b/thousandeyes-sdk-snapshots/README.md @@ -3,8 +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.4 -- Package version: 1.0.0 +- API version: 7.0.6 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator @@ -18,9 +17,9 @@ Python 3.7+ If the python package is hosted on a repository, you can install directly using: ```sh -pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +pip install -e git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git#egg=thousandeyes-sdk-snapshots\&subdirectory=thousandeyes-sdk-snapshots ``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) +(you may need to run `pip` with root permission: `sudo pip install -e git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git#egg=thousandeyes-sdk-snapshots\&subdirectory=thousandeyes-sdk-snapshots`) Then import the package: ```python diff --git a/thousandeyes-sdk-snapshots/docs/CreateTestSnapshotApi.md b/thousandeyes-sdk-snapshots/docs/CreateTestSnapshotApi.md index 8e48e4aa..ce78828c 100644 --- a/thousandeyes-sdk-snapshots/docs/CreateTestSnapshotApi.md +++ b/thousandeyes-sdk-snapshots/docs/CreateTestSnapshotApi.md @@ -80,7 +80,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-snapshots/docs/ValidationErrorItem.md b/thousandeyes-sdk-snapshots/docs/ValidationErrorItem.md index e9548672..1c1cbaa6 100644 --- a/thousandeyes-sdk-snapshots/docs/ValidationErrorItem.md +++ b/thousandeyes-sdk-snapshots/docs/ValidationErrorItem.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **code** | **str** | (Optional) A unique error type/code that can be referenced in the documentation for further details. | [optional] -**var_field** | **int** | Identifies the field that triggered this particular error. | [optional] +**var_field** | **str** | Identifies the field that triggered this particular error. | [optional] **message** | **str** | A short, human-readable summary of the error. | [optional] ## Example diff --git a/thousandeyes-sdk-snapshots/pyproject.toml b/thousandeyes-sdk-snapshots/pyproject.toml index 9ed9ea4a..45b3f59e 100644 --- a/thousandeyes-sdk-snapshots/pyproject.toml +++ b/thousandeyes-sdk-snapshots/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "thousandeyes-sdk-snapshots" -version = "1.0.0" +dynamic = ["version"] authors = [ { name = "ThousandEyes API Team", email = "api-team@thousandeyes.com" } ] @@ -11,9 +11,12 @@ dependencies = [ "python-dateutil >=2.8.2", "pydantic >=2", "typing-extensions >=4.7.1", - "thousandeyes-sdk-client==1.0.0", + "thousandeyes-sdk-core", ] +[tool.setuptools.dynamic] +version = {attr = "thousandeyes_sdk.client.__version__"} + [project.optional-dependencies] test = [ "pytest~=7.1.3", diff --git a/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/__init__.py b/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/__init__.py index 20e5d148..2bafa9ed 100644 --- a/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/__init__.py +++ b/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/__init__.py @@ -7,15 +7,13 @@ Creates a new test snapshot in ThousandEyes. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 -__version__ = "1.0.0" - # import apis into sdk package from thousandeyes_sdk.snapshots.api.create_test_snapshot_api import CreateTestSnapshotApi diff --git a/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/api/create_test_snapshot_api.py b/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/api/create_test_snapshot_api.py index da2a2619..95a5fedf 100644 --- a/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/api/create_test_snapshot_api.py +++ b/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/api/create_test_snapshot_api.py @@ -5,7 +5,7 @@ Creates a new test snapshot in ThousandEyes. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -27,6 +27,7 @@ from thousandeyes_sdk.snapshots.models.snapshot_response import SnapshotResponse from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class CreateTestSnapshotApi: @@ -39,6 +40,7 @@ class CreateTestSnapshotApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @@ -328,6 +330,7 @@ class CreateTestSnapshotApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/__init__.py b/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/__init__.py index cae2e912..e9d81dee 100644 --- a/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/__init__.py +++ b/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/__init__.py @@ -6,7 +6,7 @@ Creates a new test snapshot in ThousandEyes. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/app_and_self_links.py b/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/app_and_self_links.py index d07497eb..9febadae 100644 --- a/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/app_and_self_links.py +++ b/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/app_and_self_links.py @@ -5,7 +5,7 @@ Creates a new test snapshot in ThousandEyes. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class AppAndSelfLinks(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class AppAndSelfLinks(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/error.py b/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/error.py index 7e72c2f0..7953bd25 100644 --- a/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/error.py +++ b/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/error.py @@ -5,7 +5,7 @@ Creates a new test snapshot in ThousandEyes. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -37,6 +37,7 @@ class Error(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -47,7 +48,7 @@ class Error(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/link.py b/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/link.py index cde1a59e..5a3472f3 100644 --- a/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/link.py +++ b/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/link.py @@ -5,7 +5,7 @@ Creates a new test snapshot in ThousandEyes. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -40,6 +40,7 @@ class Link(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -50,7 +51,7 @@ class Link(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/snapshot_links.py b/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/snapshot_links.py index 16f97ffa..37252c72 100644 --- a/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/snapshot_links.py +++ b/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/snapshot_links.py @@ -5,7 +5,7 @@ Creates a new test snapshot in ThousandEyes. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class SnapshotLinks(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class SnapshotLinks(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/snapshot_request.py b/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/snapshot_request.py index ab093c71..2e161f1a 100644 --- a/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/snapshot_request.py +++ b/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/snapshot_request.py @@ -5,7 +5,7 @@ Creates a new test snapshot in ThousandEyes. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -37,6 +37,7 @@ class SnapshotRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -47,7 +48,7 @@ class SnapshotRequest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/snapshot_response.py b/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/snapshot_response.py index 7f109278..93bee378 100644 --- a/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/snapshot_response.py +++ b/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/snapshot_response.py @@ -5,7 +5,7 @@ Creates a new test snapshot in ThousandEyes. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -47,6 +47,7 @@ class SnapshotResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -57,7 +58,7 @@ class SnapshotResponse(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/snapshot_test.py b/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/snapshot_test.py index c163be7b..f10e9a6a 100644 --- a/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/snapshot_test.py +++ b/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/snapshot_test.py @@ -5,7 +5,7 @@ Creates a new test snapshot in ThousandEyes. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -50,6 +50,7 @@ class SnapshotTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -60,7 +61,7 @@ class SnapshotTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/test_interval.py b/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/test_interval.py index 1c58d27a..df241a9d 100644 --- a/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/test_interval.py +++ b/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/test_interval.py @@ -5,7 +5,7 @@ Creates a new test snapshot in ThousandEyes. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/test_links.py b/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/test_links.py index 31e3a838..00afbf44 100644 --- a/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/test_links.py +++ b/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/test_links.py @@ -5,7 +5,7 @@ Creates a new test snapshot in ThousandEyes. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class TestLinks(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class TestLinks(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/test_self_link.py b/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/test_self_link.py index 45fd90d5..bd590306 100644 --- a/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/test_self_link.py +++ b/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/test_self_link.py @@ -5,7 +5,7 @@ Creates a new test snapshot in ThousandEyes. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -40,6 +40,7 @@ class TestSelfLink(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -50,7 +51,7 @@ class TestSelfLink(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/test_type.py b/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/test_type.py index 7976c554..3d402793 100644 --- a/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/test_type.py +++ b/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/test_type.py @@ -5,7 +5,7 @@ Creates a new test snapshot in ThousandEyes. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -26,6 +26,7 @@ class TestType(str, Enum): """ allowed enum values """ + API = 'api' AGENT_MINUS_TO_MINUS_AGENT = 'agent-to-agent' AGENT_MINUS_TO_MINUS_SERVER = 'agent-to-server' BGP = 'bgp' diff --git a/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/unauthorized_error.py b/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/unauthorized_error.py index 6f21d44f..cf42c967 100644 --- a/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/unauthorized_error.py +++ b/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/unauthorized_error.py @@ -5,7 +5,7 @@ Creates a new test snapshot in ThousandEyes. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class UnauthorizedError(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class UnauthorizedError(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/unexpanded_instant_test.py b/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/unexpanded_instant_test.py index 81a57320..194f4227 100644 --- a/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/unexpanded_instant_test.py +++ b/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/unexpanded_instant_test.py @@ -5,7 +5,7 @@ Creates a new test snapshot in ThousandEyes. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -46,6 +46,7 @@ class UnexpandedInstantTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -56,7 +57,7 @@ class UnexpandedInstantTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/unexpanded_test.py b/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/unexpanded_test.py index c0ea143d..e7920849 100644 --- a/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/unexpanded_test.py +++ b/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/unexpanded_test.py @@ -5,7 +5,7 @@ Creates a new test snapshot in ThousandEyes. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class UnexpandedTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class UnexpandedTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/validation_error.py b/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/validation_error.py index 6d677f01..cec3e8bf 100644 --- a/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/validation_error.py +++ b/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/validation_error.py @@ -5,7 +5,7 @@ Creates a new test snapshot in ThousandEyes. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -39,6 +39,7 @@ class ValidationError(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -49,7 +50,7 @@ class ValidationError(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/validation_error_item.py b/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/validation_error_item.py index 3103bfe3..d0e8050e 100644 --- a/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/validation_error_item.py +++ b/thousandeyes-sdk-snapshots/src/thousandeyes_sdk/snapshots/models/validation_error_item.py @@ -5,7 +5,7 @@ Creates a new test snapshot in ThousandEyes. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,7 +17,7 @@ import pprint import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +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 @@ -27,7 +27,7 @@ class ValidationErrorItem(BaseModel): ValidationErrorItem """ # noqa: E501 code: Optional[StrictStr] = Field(default=None, description="(Optional) A unique error type/code that can be referenced in the documentation for further details.") - var_field: Optional[StrictInt] = Field(default=None, description="Identifies the field that triggered this particular error.", alias="field") + var_field: Optional[StrictStr] = Field(default=None, description="Identifies the field that triggered this particular error.", alias="field") message: Optional[StrictStr] = Field(default=None, description="A short, human-readable summary of the error.") __properties: ClassVar[List[str]] = ["code", "field", "message"] @@ -35,6 +35,7 @@ class ValidationErrorItem(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class ValidationErrorItem(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-snapshots/test/test_create_test_snapshot_api.py b/thousandeyes-sdk-snapshots/test/test_create_test_snapshot_api.py new file mode 100644 index 00000000..c0c1821e --- /dev/null +++ b/thousandeyes-sdk-snapshots/test/test_create_test_snapshot_api.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Test Snapshots API + + Creates a new test snapshot in ThousandEyes. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.snapshots.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.snapshots.api.create_test_snapshot_api import CreateTestSnapshotApi + + +class TestCreateTestSnapshotApi(unittest.TestCase): + """CreateTestSnapshotApi unit test stubs""" + + def setUp(self) -> None: + self.api = CreateTestSnapshotApi() + + def tearDown(self) -> None: + pass + + def test_create_test_snapshot_models_validation(self) -> None: + """Test case for create_test_snapshot request and response models""" + request_body_json = """ + { + "endDate" : "2023-06-06T01:00:00Z", + "displayName" : "Snapshot created through API", + "isPublic" : false, + "startDate" : "2023-06-06T00:00:00Z" + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.snapshots.models.SnapshotRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "shareDate" : "2023-06-06T00:00:00Z", + "uid" : "281474976810911", + "test" : { + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "savedEvent" : true, + "description" : "ThousandEyes Test", + "type" : "agent-to-server", + "enabled" : true, + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test" + }, + "_links" : { + "appLink" : { + "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" + } + }, + "startRoundId" : 1538784000, + "displayName" : "Snapshot created through API", + "endRoundId" : 1538787600, + "testId" : "281474976710801", + "extraParams" : "params", + "id" : "wdiac", + "roundId" : 1538784000, + "sourceTestId" : "281474976710706" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.snapshots.models.SnapshotResponse.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-snapshots/test/test_utils.py b/thousandeyes-sdk-snapshots/test/test_utils.py new file mode 100644 index 00000000..930528d9 --- /dev/null +++ b/thousandeyes-sdk-snapshots/test/test_utils.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +import json +import unittest + +from pydantic import BaseModel + + +def assert_constructed_model_matches_example_json(model: BaseModel, loaded_json: dict): + test_case = unittest.TestCase() + test_case.maxDiff = None + test_case.assertIsNotNone(model) + constructed_json = json.loads(model.to_json()) + sorted_loaded_json = json.dumps(loaded_json, sort_keys=True) + sorted_constructed_json = json.dumps(constructed_json, sort_keys=True) + test_case.assertEqual(sorted_loaded_json, sorted_constructed_json) diff --git a/thousandeyes-sdk-streaming/.openapi-generator/FILES b/thousandeyes-sdk-streaming/.openapi-generator/FILES index 46330952..067f806e 100644 --- a/thousandeyes-sdk-streaming/.openapi-generator/FILES +++ b/thousandeyes-sdk-streaming/.openapi-generator/FILES @@ -17,6 +17,8 @@ docs/StreamType.md docs/StreamingApi.md docs/TagMatch.md docs/TagMatchObjectType.md +docs/TestMatch.md +docs/TestMatchDomain.md docs/UnauthorizedError.md pyproject.toml setup.cfg @@ -40,23 +42,10 @@ src/thousandeyes_sdk/streaming/models/stream_self_link.py src/thousandeyes_sdk/streaming/models/stream_type.py src/thousandeyes_sdk/streaming/models/tag_match.py src/thousandeyes_sdk/streaming/models/tag_match_object_type.py +src/thousandeyes_sdk/streaming/models/test_match.py +src/thousandeyes_sdk/streaming/models/test_match_domain.py src/thousandeyes_sdk/streaming/models/unauthorized_error.py src/thousandeyes_sdk/streaming/py.typed test/__init__.py -test/test_api_error.py -test/test_api_error_integration_limits.py -test/test_audit_operation.py -test/test_audit_operation_with_update.py -test/test_bad_request_error.py -test/test_create_stream_response.py -test/test_endpoint_type.py -test/test_get_stream_response.py -test/test_put_stream.py -test/test_stream.py -test/test_stream_links.py -test/test_stream_response.py -test/test_stream_self_link.py -test/test_stream_type.py -test/test_tag_match.py -test/test_tag_match_object_type.py -test/test_unauthorized_error.py +test/test_streaming_api.py +test/test_utils.py diff --git a/thousandeyes-sdk-streaming/README.md b/thousandeyes-sdk-streaming/README.md index e9d699a4..2a5edea3 100644 --- a/thousandeyes-sdk-streaming/README.md +++ b/thousandeyes-sdk-streaming/README.md @@ -15,8 +15,7 @@ For more information about ThousandEyes for OpenTelemetry, see the [documentatio This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.4 -- Package version: 1.0.0 +- API version: 7.0.6 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator @@ -30,9 +29,9 @@ Python 3.7+ If the python package is hosted on a repository, you can install directly using: ```sh -pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +pip install -e git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git#egg=thousandeyes-sdk-streaming\&subdirectory=thousandeyes-sdk-streaming ``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) +(you may need to run `pip` with root permission: `sudo pip install -e git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git#egg=thousandeyes-sdk-streaming\&subdirectory=thousandeyes-sdk-streaming`) Then import the package: ```python @@ -112,7 +111,7 @@ Class | Method | HTTP request | Description *StreamingApi* | [**delete_stream**](docs/StreamingApi.md#delete_stream) | **DELETE** /v7/stream/{id} | Delete a data stream *StreamingApi* | [**get_stream**](docs/StreamingApi.md#get_stream) | **GET** /v7/stream/{id} | Retrieve data stream *StreamingApi* | [**get_streams**](docs/StreamingApi.md#get_streams) | **GET** /v7/stream | List data streams -*StreamingApi* | [**put_stream**](docs/StreamingApi.md#put_stream) | **PUT** /v7/stream/{id} | Update data stream +*StreamingApi* | [**update_stream**](docs/StreamingApi.md#update_stream) | **PUT** /v7/stream/{id} | Update data stream ## Documentation For Models @@ -133,6 +132,8 @@ Class | Method | HTTP request | Description - [StreamType](docs/StreamType.md) - [TagMatch](docs/TagMatch.md) - [TagMatchObjectType](docs/TagMatchObjectType.md) + - [TestMatch](docs/TestMatch.md) + - [TestMatchDomain](docs/TestMatchDomain.md) - [UnauthorizedError](docs/UnauthorizedError.md) diff --git a/thousandeyes-sdk-streaming/docs/CreateStreamResponse.md b/thousandeyes-sdk-streaming/docs/CreateStreamResponse.md index 581bebcc..fd2feeb9 100644 --- a/thousandeyes-sdk-streaming/docs/CreateStreamResponse.md +++ b/thousandeyes-sdk-streaming/docs/CreateStreamResponse.md @@ -13,6 +13,7 @@ Name | Type | Description | Notes **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 endpoint must match the exact final full URL (including the path if there is one) to which the metrics will be sent. Examples below: - `https://api.honeycomb.io:443/v1/metrics` - `https://ingest.eu0.signalfx.com/v2/datapoint/otlp` | [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. | [optional] +**test_match** | [**List[TestMatch]**](TestMatch.md) | A collection of tests to be included in the data stream. | [optional] **audit_operation** | [**AuditOperation**](AuditOperation.md) | | [optional] ## Example diff --git a/thousandeyes-sdk-streaming/docs/GetStreamResponse.md b/thousandeyes-sdk-streaming/docs/GetStreamResponse.md index 48bb511e..4a1eca0c 100644 --- a/thousandeyes-sdk-streaming/docs/GetStreamResponse.md +++ b/thousandeyes-sdk-streaming/docs/GetStreamResponse.md @@ -13,6 +13,7 @@ Name | Type | Description | Notes **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 endpoint must match the exact final full URL (including the path if there is one) to which the metrics will be sent. Examples below: - `https://api.honeycomb.io:443/v1/metrics` - `https://ingest.eu0.signalfx.com/v2/datapoint/otlp` | [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. | [optional] +**test_match** | [**List[TestMatch]**](TestMatch.md) | A collection of tests to be included in the data stream. | [optional] **audit_operation** | [**AuditOperationWithUpdate**](AuditOperationWithUpdate.md) | | [optional] ## Example diff --git a/thousandeyes-sdk-streaming/docs/PutStream.md b/thousandeyes-sdk-streaming/docs/PutStream.md index 39c35499..618b64a6 100644 --- a/thousandeyes-sdk-streaming/docs/PutStream.md +++ b/thousandeyes-sdk-streaming/docs/PutStream.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **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. | [optional] +**test_match** | [**List[TestMatch]**](TestMatch.md) | A collection of tests to be included in the data stream. | [optional] **enabled** | **bool** | Flag to enable or disable the stream integration. | [optional] ## Example diff --git a/thousandeyes-sdk-streaming/docs/Stream.md b/thousandeyes-sdk-streaming/docs/Stream.md index 087778fe..1a3c1d0f 100644 --- a/thousandeyes-sdk-streaming/docs/Stream.md +++ b/thousandeyes-sdk-streaming/docs/Stream.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **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. | [optional] +**test_match** | [**List[TestMatch]**](TestMatch.md) | A collection of tests to be included in the data stream. | [optional] **enabled** | **bool** | Flag to enable or disable the stream integration. | [optional] **type** | [**StreamType**](StreamType.md) | | [optional] **endpoint_type** | [**EndpointType**](EndpointType.md) | | [optional] diff --git a/thousandeyes-sdk-streaming/docs/StreamingApi.md b/thousandeyes-sdk-streaming/docs/StreamingApi.md index f2a612bb..f412d1dd 100644 --- a/thousandeyes-sdk-streaming/docs/StreamingApi.md +++ b/thousandeyes-sdk-streaming/docs/StreamingApi.md @@ -8,7 +8,7 @@ Method | HTTP request | Description [**delete_stream**](StreamingApi.md#delete_stream) | **DELETE** /v7/stream/{id} | Delete a data stream [**get_stream**](StreamingApi.md#get_stream) | **GET** /v7/stream/{id} | Retrieve data stream [**get_streams**](StreamingApi.md#get_streams) | **GET** /v7/stream | List data streams -[**put_stream**](StreamingApi.md#put_stream) | **PUT** /v7/stream/{id} | Update data stream +[**update_stream**](StreamingApi.md#update_stream) | **PUT** /v7/stream/{id} | Update data stream # **create_stream** @@ -82,7 +82,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -164,7 +164,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/problem+json + - **Accept**: application/json, application/problem+json ### HTTP response details @@ -252,7 +252,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -338,7 +338,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -354,8 +354,8 @@ 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) -# **put_stream** -> GetStreamResponse put_stream(id, aid=aid, put_stream=put_stream) +# **update_stream** +> GetStreamResponse update_stream(id, aid=aid, put_stream=put_stream) Update data stream @@ -398,11 +398,11 @@ with thousandeyes_sdk.streaming.ApiClient(configuration) as api_client: try: # Update data stream - api_response = api_instance.put_stream(id, aid=aid, put_stream=put_stream) - print("The response of StreamingApi->put_stream:\n") + api_response = api_instance.update_stream(id, aid=aid, put_stream=put_stream) + print("The response of StreamingApi->update_stream:\n") pprint(api_response) except Exception as e: - print("Exception when calling StreamingApi->put_stream: %s\n" % e) + print("Exception when calling StreamingApi->update_stream: %s\n" % e) ``` @@ -427,7 +427,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-streaming/docs/TestMatch.md b/thousandeyes-sdk-streaming/docs/TestMatch.md new file mode 100644 index 00000000..f44d4c75 --- /dev/null +++ b/thousandeyes-sdk-streaming/docs/TestMatch.md @@ -0,0 +1,30 @@ +# TestMatch + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The ID of the test to match. | [optional] +**domain** | [**TestMatchDomain**](TestMatchDomain.md) | | [optional] + +## Example + +```python +from thousandeyes_sdk.streaming.models.test_match import TestMatch + +# TODO update the JSON string below +json = "{}" +# create an instance of TestMatch from a JSON string +test_match_instance = TestMatch.from_json(json) +# print the JSON string representation of the object +print(TestMatch.to_json()) + +# convert the object into a dict +test_match_dict = test_match_instance.to_dict() +# create an instance of TestMatch from a dict +test_match_from_dict = TestMatch.from_dict(test_match_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-streaming/docs/TestMatchDomain.md b/thousandeyes-sdk-streaming/docs/TestMatchDomain.md new file mode 100644 index 00000000..9c6620e2 --- /dev/null +++ b/thousandeyes-sdk-streaming/docs/TestMatchDomain.md @@ -0,0 +1,12 @@ +# TestMatchDomain + +The domain of the test to match. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/thousandeyes-sdk-streaming/pyproject.toml b/thousandeyes-sdk-streaming/pyproject.toml index 908a6b69..38786761 100644 --- a/thousandeyes-sdk-streaming/pyproject.toml +++ b/thousandeyes-sdk-streaming/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "thousandeyes-sdk-streaming" -version = "1.0.0" +dynamic = ["version"] authors = [ { name = "ThousandEyes API Team", email = "api-team@thousandeyes.com" } ] @@ -11,9 +11,12 @@ dependencies = [ "python-dateutil >=2.8.2", "pydantic >=2", "typing-extensions >=4.7.1", - "thousandeyes-sdk-client==1.0.0", + "thousandeyes-sdk-core", ] +[tool.setuptools.dynamic] +version = {attr = "thousandeyes_sdk.client.__version__"} + [project.optional-dependencies] test = [ "pytest~=7.1.3", diff --git a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/__init__.py b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/__init__.py index 0c20404b..7a8faa43 100644 --- a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/__init__.py +++ b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/__init__.py @@ -7,15 +7,13 @@ ThousandEyes for OpenTelemetry provides machine-to-machine integration between ThousandEyes and its customers. It allows you to export ThousandEyes telemetry data in OTel format, which is widely used in the industry. With ThousandEyes for OTel, you can leverage frameworks widely used in the observability domain - such as Splunk, Grafana, and Honeycomb - to capture and analyze ThousandEyes data. Any client that supports OTel can use ThousandEyes for OpenTelemetry. ThousandEyes for OTel is made up of the following components: * Data streaming APIs that you can use to configure and enable your ThousandEyes tests with OTel-compatible streams, in particular to configure how ThousandEyes telemetry data is exported to client integrations. * A set of streaming pipelines called _collectors_ that actively fetch ThousandEyes network test data, enrich the data with some additional detail, filter, and push the data to the customer-configured endpoints, depending on what you configure via the public APIs. * Third-party OTel collectors that receive, transform, filter, and export different metrics to client applications such as AppD, or any other OTel-capable client configuration. For more information about ThousandEyes for OpenTelemetry, see the [documentation](https://docs.thousandeyes.com/product-documentation/api/opentelemetry). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 -__version__ = "1.0.0" - # import apis into sdk package from thousandeyes_sdk.streaming.api.streaming_api import StreamingApi @@ -37,4 +35,6 @@ from thousandeyes_sdk.streaming.models.stream_self_link import StreamSelfLink from thousandeyes_sdk.streaming.models.stream_type import StreamType from thousandeyes_sdk.streaming.models.tag_match import TagMatch from thousandeyes_sdk.streaming.models.tag_match_object_type import TagMatchObjectType +from thousandeyes_sdk.streaming.models.test_match import TestMatch +from thousandeyes_sdk.streaming.models.test_match_domain import TestMatchDomain from thousandeyes_sdk.streaming.models.unauthorized_error import UnauthorizedError 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 56f913ec..ca7d2302 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 @@ -5,7 +5,7 @@ ThousandEyes for OpenTelemetry provides machine-to-machine integration between ThousandEyes and its customers. It allows you to export ThousandEyes telemetry data in OTel format, which is widely used in the industry. With ThousandEyes for OTel, you can leverage frameworks widely used in the observability domain - such as Splunk, Grafana, and Honeycomb - to capture and analyze ThousandEyes data. Any client that supports OTel can use ThousandEyes for OpenTelemetry. ThousandEyes for OTel is made up of the following components: * Data streaming APIs that you can use to configure and enable your ThousandEyes tests with OTel-compatible streams, in particular to configure how ThousandEyes telemetry data is exported to client integrations. * A set of streaming pipelines called _collectors_ that actively fetch ThousandEyes network test data, enrich the data with some additional detail, filter, and push the data to the customer-configured endpoints, depending on what you configure via the public APIs. * Third-party OTel collectors that receive, transform, filter, and export different metrics to client applications such as AppD, or any other OTel-capable client configuration. For more information about ThousandEyes for OpenTelemetry, see the [documentation](https://docs.thousandeyes.com/product-documentation/api/opentelemetry). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -30,6 +30,7 @@ from thousandeyes_sdk.streaming.models.stream_type import StreamType from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class StreamingApi: @@ -42,6 +43,7 @@ class StreamingApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @@ -310,6 +312,7 @@ class StreamingApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -615,6 +618,7 @@ class StreamingApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ + 'application/json', 'application/problem+json' ] ) @@ -925,6 +929,7 @@ class StreamingApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1223,6 +1228,7 @@ class StreamingApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1252,7 +1258,7 @@ class StreamingApi: @validate_call - def put_stream( + def update_stream( self, id: Annotated[StrictStr, Field(description="ID of stream to query")], 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, @@ -1302,7 +1308,7 @@ class StreamingApi: :return: Returns the result object. """ # noqa: E501 - _param = self._put_stream_serialize( + _param = self._update_stream_serialize( id=id, aid=aid, put_stream=put_stream, @@ -1335,7 +1341,7 @@ class StreamingApi: @validate_call - def put_stream_with_http_info( + def update_stream_with_http_info( self, id: Annotated[StrictStr, Field(description="ID of stream to query")], 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, @@ -1385,7 +1391,7 @@ class StreamingApi: :return: Returns the result object. """ # noqa: E501 - _param = self._put_stream_serialize( + _param = self._update_stream_serialize( id=id, aid=aid, put_stream=put_stream, @@ -1418,7 +1424,7 @@ class StreamingApi: @validate_call - def put_stream_without_preload_content( + def update_stream_without_preload_content( self, id: Annotated[StrictStr, Field(description="ID of stream to query")], 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, @@ -1468,7 +1474,7 @@ class StreamingApi: :return: Returns the result object. """ # noqa: E501 - _param = self._put_stream_serialize( + _param = self._update_stream_serialize( id=id, aid=aid, put_stream=put_stream, @@ -1495,7 +1501,7 @@ class StreamingApi: return response_data.response - def _put_stream_serialize( + def _update_stream_serialize( self, id, aid, @@ -1537,6 +1543,7 @@ class StreamingApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/__init__.py b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/__init__.py index ac3eb5ff..b0f80c05 100644 --- a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/__init__.py +++ b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/__init__.py @@ -6,7 +6,7 @@ ThousandEyes for OpenTelemetry provides machine-to-machine integration between ThousandEyes and its customers. It allows you to export ThousandEyes telemetry data in OTel format, which is widely used in the industry. With ThousandEyes for OTel, you can leverage frameworks widely used in the observability domain - such as Splunk, Grafana, and Honeycomb - to capture and analyze ThousandEyes data. Any client that supports OTel can use ThousandEyes for OpenTelemetry. ThousandEyes for OTel is made up of the following components: * Data streaming APIs that you can use to configure and enable your ThousandEyes tests with OTel-compatible streams, in particular to configure how ThousandEyes telemetry data is exported to client integrations. * A set of streaming pipelines called _collectors_ that actively fetch ThousandEyes network test data, enrich the data with some additional detail, filter, and push the data to the customer-configured endpoints, depending on what you configure via the public APIs. * Third-party OTel collectors that receive, transform, filter, and export different metrics to client applications such as AppD, or any other OTel-capable client configuration. For more information about ThousandEyes for OpenTelemetry, see the [documentation](https://docs.thousandeyes.com/product-documentation/api/opentelemetry). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -30,4 +30,6 @@ from thousandeyes_sdk.streaming.models.stream_self_link import StreamSelfLink from thousandeyes_sdk.streaming.models.stream_type import StreamType from thousandeyes_sdk.streaming.models.tag_match import TagMatch from thousandeyes_sdk.streaming.models.tag_match_object_type import TagMatchObjectType +from thousandeyes_sdk.streaming.models.test_match import TestMatch +from thousandeyes_sdk.streaming.models.test_match_domain import TestMatchDomain from thousandeyes_sdk.streaming.models.unauthorized_error import UnauthorizedError diff --git a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/api_error.py b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/api_error.py index e10f5be5..ccf27f85 100644 --- a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/api_error.py +++ b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/api_error.py @@ -5,7 +5,7 @@ ThousandEyes for OpenTelemetry provides machine-to-machine integration between ThousandEyes and its customers. It allows you to export ThousandEyes telemetry data in OTel format, which is widely used in the industry. With ThousandEyes for OTel, you can leverage frameworks widely used in the observability domain - such as Splunk, Grafana, and Honeycomb - to capture and analyze ThousandEyes data. Any client that supports OTel can use ThousandEyes for OpenTelemetry. ThousandEyes for OTel is made up of the following components: * Data streaming APIs that you can use to configure and enable your ThousandEyes tests with OTel-compatible streams, in particular to configure how ThousandEyes telemetry data is exported to client integrations. * A set of streaming pipelines called _collectors_ that actively fetch ThousandEyes network test data, enrich the data with some additional detail, filter, and push the data to the customer-configured endpoints, depending on what you configure via the public APIs. * Third-party OTel collectors that receive, transform, filter, and export different metrics to client applications such as AppD, or any other OTel-capable client configuration. For more information about ThousandEyes for OpenTelemetry, see the [documentation](https://docs.thousandeyes.com/product-documentation/api/opentelemetry). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class ApiError(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class ApiError(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/api_error_integration_limits.py b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/api_error_integration_limits.py index d1dec4f2..fc2741e5 100644 --- a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/api_error_integration_limits.py +++ b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/api_error_integration_limits.py @@ -5,7 +5,7 @@ ThousandEyes for OpenTelemetry provides machine-to-machine integration between ThousandEyes and its customers. It allows you to export ThousandEyes telemetry data in OTel format, which is widely used in the industry. With ThousandEyes for OTel, you can leverage frameworks widely used in the observability domain - such as Splunk, Grafana, and Honeycomb - to capture and analyze ThousandEyes data. Any client that supports OTel can use ThousandEyes for OpenTelemetry. ThousandEyes for OTel is made up of the following components: * Data streaming APIs that you can use to configure and enable your ThousandEyes tests with OTel-compatible streams, in particular to configure how ThousandEyes telemetry data is exported to client integrations. * A set of streaming pipelines called _collectors_ that actively fetch ThousandEyes network test data, enrich the data with some additional detail, filter, and push the data to the customer-configured endpoints, depending on what you configure via the public APIs. * Third-party OTel collectors that receive, transform, filter, and export different metrics to client applications such as AppD, or any other OTel-capable client configuration. For more information about ThousandEyes for OpenTelemetry, see the [documentation](https://docs.thousandeyes.com/product-documentation/api/opentelemetry). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class ApiErrorIntegrationLimits(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class ApiErrorIntegrationLimits(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/audit_operation.py b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/audit_operation.py index 32f57f83..dd0d7d80 100644 --- a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/audit_operation.py +++ b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/audit_operation.py @@ -5,7 +5,7 @@ ThousandEyes for OpenTelemetry provides machine-to-machine integration between ThousandEyes and its customers. It allows you to export ThousandEyes telemetry data in OTel format, which is widely used in the industry. With ThousandEyes for OTel, you can leverage frameworks widely used in the observability domain - such as Splunk, Grafana, and Honeycomb - to capture and analyze ThousandEyes data. Any client that supports OTel can use ThousandEyes for OpenTelemetry. ThousandEyes for OTel is made up of the following components: * Data streaming APIs that you can use to configure and enable your ThousandEyes tests with OTel-compatible streams, in particular to configure how ThousandEyes telemetry data is exported to client integrations. * A set of streaming pipelines called _collectors_ that actively fetch ThousandEyes network test data, enrich the data with some additional detail, filter, and push the data to the customer-configured endpoints, depending on what you configure via the public APIs. * Third-party OTel collectors that receive, transform, filter, and export different metrics to client applications such as AppD, or any other OTel-capable client configuration. For more information about ThousandEyes for OpenTelemetry, see the [documentation](https://docs.thousandeyes.com/product-documentation/api/opentelemetry). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class AuditOperation(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class AuditOperation(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/audit_operation_with_update.py b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/audit_operation_with_update.py index ae92cee5..44d2426c 100644 --- a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/audit_operation_with_update.py +++ b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/audit_operation_with_update.py @@ -5,7 +5,7 @@ ThousandEyes for OpenTelemetry provides machine-to-machine integration between ThousandEyes and its customers. It allows you to export ThousandEyes telemetry data in OTel format, which is widely used in the industry. With ThousandEyes for OTel, you can leverage frameworks widely used in the observability domain - such as Splunk, Grafana, and Honeycomb - to capture and analyze ThousandEyes data. Any client that supports OTel can use ThousandEyes for OpenTelemetry. ThousandEyes for OTel is made up of the following components: * Data streaming APIs that you can use to configure and enable your ThousandEyes tests with OTel-compatible streams, in particular to configure how ThousandEyes telemetry data is exported to client integrations. * A set of streaming pipelines called _collectors_ that actively fetch ThousandEyes network test data, enrich the data with some additional detail, filter, and push the data to the customer-configured endpoints, depending on what you configure via the public APIs. * Third-party OTel collectors that receive, transform, filter, and export different metrics to client applications such as AppD, or any other OTel-capable client configuration. For more information about ThousandEyes for OpenTelemetry, see the [documentation](https://docs.thousandeyes.com/product-documentation/api/opentelemetry). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class AuditOperationWithUpdate(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class AuditOperationWithUpdate(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/bad_request_error.py b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/bad_request_error.py index aef2819e..fb1ea0f3 100644 --- a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/bad_request_error.py +++ b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/bad_request_error.py @@ -5,7 +5,7 @@ ThousandEyes for OpenTelemetry provides machine-to-machine integration between ThousandEyes and its customers. It allows you to export ThousandEyes telemetry data in OTel format, which is widely used in the industry. With ThousandEyes for OTel, you can leverage frameworks widely used in the observability domain - such as Splunk, Grafana, and Honeycomb - to capture and analyze ThousandEyes data. Any client that supports OTel can use ThousandEyes for OpenTelemetry. ThousandEyes for OTel is made up of the following components: * Data streaming APIs that you can use to configure and enable your ThousandEyes tests with OTel-compatible streams, in particular to configure how ThousandEyes telemetry data is exported to client integrations. * A set of streaming pipelines called _collectors_ that actively fetch ThousandEyes network test data, enrich the data with some additional detail, filter, and push the data to the customer-configured endpoints, depending on what you configure via the public APIs. * Third-party OTel collectors that receive, transform, filter, and export different metrics to client applications such as AppD, or any other OTel-capable client configuration. For more information about ThousandEyes for OpenTelemetry, see the [documentation](https://docs.thousandeyes.com/product-documentation/api/opentelemetry). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class BadRequestError(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class BadRequestError(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: 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 e8d22e68..64b04775 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 @@ -5,7 +5,7 @@ ThousandEyes for OpenTelemetry provides machine-to-machine integration between ThousandEyes and its customers. It allows you to export ThousandEyes telemetry data in OTel format, which is widely used in the industry. With ThousandEyes for OTel, you can leverage frameworks widely used in the observability domain - such as Splunk, Grafana, and Honeycomb - to capture and analyze ThousandEyes data. Any client that supports OTel can use ThousandEyes for OpenTelemetry. ThousandEyes for OTel is made up of the following components: * Data streaming APIs that you can use to configure and enable your ThousandEyes tests with OTel-compatible streams, in particular to configure how ThousandEyes telemetry data is exported to client integrations. * A set of streaming pipelines called _collectors_ that actively fetch ThousandEyes network test data, enrich the data with some additional detail, filter, and push the data to the customer-configured endpoints, depending on what you configure via the public APIs. * Third-party OTel collectors that receive, transform, filter, and export different metrics to client applications such as AppD, or any other OTel-capable client configuration. For more information about ThousandEyes for OpenTelemetry, see the [documentation](https://docs.thousandeyes.com/product-documentation/api/opentelemetry). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -24,6 +24,7 @@ from thousandeyes_sdk.streaming.models.endpoint_type import EndpointType from thousandeyes_sdk.streaming.models.stream_links import StreamLinks from thousandeyes_sdk.streaming.models.stream_type import StreamType from thousandeyes_sdk.streaming.models.tag_match import TagMatch +from thousandeyes_sdk.streaming.models.test_match import TestMatch from typing import Optional, Set from typing_extensions import Self @@ -39,13 +40,15 @@ class CreateStreamResponse(BaseModel): 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 endpoint must match the exact final full URL (including the path if there is one) to which the metrics will be sent. Examples below: - `https://api.honeycomb.io:443/v1/metrics` - `https://ingest.eu0.signalfx.com/v2/datapoint/otlp`", alias="streamEndpointUrl") 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.", alias="tagMatch") + test_match: Optional[List[TestMatch]] = Field(default=None, description="A collection of tests to be included in the data stream.", alias="testMatch") audit_operation: Optional[AuditOperation] = Field(default=None, alias="auditOperation") - __properties: ClassVar[List[str]] = ["id", "enabled", "_links", "type", "endpointType", "streamEndpointUrl", "customHeaders", "tagMatch", "auditOperation"] + __properties: ClassVar[List[str]] = ["id", "enabled", "_links", "type", "endpointType", "streamEndpointUrl", "customHeaders", "tagMatch", "testMatch", "auditOperation"] model_config = ConfigDict( populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -56,7 +59,7 @@ class CreateStreamResponse(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -93,6 +96,13 @@ class CreateStreamResponse(BaseModel): if _item: _items.append(_item.to_dict()) _dict['tagMatch'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in test_match (list) + _items = [] + if self.test_match: + for _item in self.test_match: + if _item: + _items.append(_item.to_dict()) + _dict['testMatch'] = _items # override the default output from pydantic by calling `to_dict()` of audit_operation if self.audit_operation: _dict['auditOperation'] = self.audit_operation.to_dict() @@ -116,6 +126,7 @@ class CreateStreamResponse(BaseModel): "streamEndpointUrl": obj.get("streamEndpointUrl"), "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, "auditOperation": AuditOperation.from_dict(obj["auditOperation"]) if obj.get("auditOperation") is not None else None }) return _obj diff --git a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/endpoint_type.py b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/endpoint_type.py index eee4fcaf..596e81bc 100644 --- a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/endpoint_type.py +++ b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/endpoint_type.py @@ -5,7 +5,7 @@ ThousandEyes for OpenTelemetry provides machine-to-machine integration between ThousandEyes and its customers. It allows you to export ThousandEyes telemetry data in OTel format, which is widely used in the industry. With ThousandEyes for OTel, you can leverage frameworks widely used in the observability domain - such as Splunk, Grafana, and Honeycomb - to capture and analyze ThousandEyes data. Any client that supports OTel can use ThousandEyes for OpenTelemetry. ThousandEyes for OTel is made up of the following components: * Data streaming APIs that you can use to configure and enable your ThousandEyes tests with OTel-compatible streams, in particular to configure how ThousandEyes telemetry data is exported to client integrations. * A set of streaming pipelines called _collectors_ that actively fetch ThousandEyes network test data, enrich the data with some additional detail, filter, and push the data to the customer-configured endpoints, depending on what you configure via the public APIs. * Third-party OTel collectors that receive, transform, filter, and export different metrics to client applications such as AppD, or any other OTel-capable client configuration. For more information about ThousandEyes for OpenTelemetry, see the [documentation](https://docs.thousandeyes.com/product-documentation/api/opentelemetry). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. 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 ec49a294..4d46b234 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 @@ -5,7 +5,7 @@ ThousandEyes for OpenTelemetry provides machine-to-machine integration between ThousandEyes and its customers. It allows you to export ThousandEyes telemetry data in OTel format, which is widely used in the industry. With ThousandEyes for OTel, you can leverage frameworks widely used in the observability domain - such as Splunk, Grafana, and Honeycomb - to capture and analyze ThousandEyes data. Any client that supports OTel can use ThousandEyes for OpenTelemetry. ThousandEyes for OTel is made up of the following components: * Data streaming APIs that you can use to configure and enable your ThousandEyes tests with OTel-compatible streams, in particular to configure how ThousandEyes telemetry data is exported to client integrations. * A set of streaming pipelines called _collectors_ that actively fetch ThousandEyes network test data, enrich the data with some additional detail, filter, and push the data to the customer-configured endpoints, depending on what you configure via the public APIs. * Third-party OTel collectors that receive, transform, filter, and export different metrics to client applications such as AppD, or any other OTel-capable client configuration. For more information about ThousandEyes for OpenTelemetry, see the [documentation](https://docs.thousandeyes.com/product-documentation/api/opentelemetry). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -24,6 +24,7 @@ from thousandeyes_sdk.streaming.models.endpoint_type import EndpointType from thousandeyes_sdk.streaming.models.stream_links import StreamLinks from thousandeyes_sdk.streaming.models.stream_type import StreamType from thousandeyes_sdk.streaming.models.tag_match import TagMatch +from thousandeyes_sdk.streaming.models.test_match import TestMatch from typing import Optional, Set from typing_extensions import Self @@ -39,13 +40,15 @@ class GetStreamResponse(BaseModel): 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 endpoint must match the exact final full URL (including the path if there is one) to which the metrics will be sent. Examples below: - `https://api.honeycomb.io:443/v1/metrics` - `https://ingest.eu0.signalfx.com/v2/datapoint/otlp`", alias="streamEndpointUrl") 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.", alias="tagMatch") + test_match: Optional[List[TestMatch]] = Field(default=None, description="A collection of tests to be included in the data stream.", alias="testMatch") audit_operation: Optional[AuditOperationWithUpdate] = Field(default=None, alias="auditOperation") - __properties: ClassVar[List[str]] = ["id", "enabled", "_links", "type", "endpointType", "streamEndpointUrl", "customHeaders", "tagMatch", "auditOperation"] + __properties: ClassVar[List[str]] = ["id", "enabled", "_links", "type", "endpointType", "streamEndpointUrl", "customHeaders", "tagMatch", "testMatch", "auditOperation"] model_config = ConfigDict( populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -56,7 +59,7 @@ class GetStreamResponse(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -93,6 +96,13 @@ class GetStreamResponse(BaseModel): if _item: _items.append(_item.to_dict()) _dict['tagMatch'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in test_match (list) + _items = [] + if self.test_match: + for _item in self.test_match: + if _item: + _items.append(_item.to_dict()) + _dict['testMatch'] = _items # override the default output from pydantic by calling `to_dict()` of audit_operation if self.audit_operation: _dict['auditOperation'] = self.audit_operation.to_dict() @@ -116,6 +126,7 @@ class GetStreamResponse(BaseModel): "streamEndpointUrl": obj.get("streamEndpointUrl"), "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, "auditOperation": AuditOperationWithUpdate.from_dict(obj["auditOperation"]) if obj.get("auditOperation") is not None else None }) return _obj 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 cacf8211..65d18fb5 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 @@ -5,7 +5,7 @@ ThousandEyes for OpenTelemetry provides machine-to-machine integration between ThousandEyes and its customers. It allows you to export ThousandEyes telemetry data in OTel format, which is widely used in the industry. With ThousandEyes for OTel, you can leverage frameworks widely used in the observability domain - such as Splunk, Grafana, and Honeycomb - to capture and analyze ThousandEyes data. Any client that supports OTel can use ThousandEyes for OpenTelemetry. ThousandEyes for OTel is made up of the following components: * Data streaming APIs that you can use to configure and enable your ThousandEyes tests with OTel-compatible streams, in particular to configure how ThousandEyes telemetry data is exported to client integrations. * A set of streaming pipelines called _collectors_ that actively fetch ThousandEyes network test data, enrich the data with some additional detail, filter, and push the data to the customer-configured endpoints, depending on what you configure via the public APIs. * Third-party OTel collectors that receive, transform, filter, and export different metrics to client applications such as AppD, or any other OTel-capable client configuration. For more information about ThousandEyes for OpenTelemetry, see the [documentation](https://docs.thousandeyes.com/product-documentation/api/opentelemetry). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -20,6 +20,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from thousandeyes_sdk.streaming.models.tag_match import TagMatch +from thousandeyes_sdk.streaming.models.test_match import TestMatch from typing import Optional, Set from typing_extensions import Self @@ -29,13 +30,15 @@ class PutStream(BaseModel): """ # noqa: E501 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.", alias="tagMatch") + test_match: Optional[List[TestMatch]] = Field(default=None, description="A collection of tests to be included in the data stream.", alias="testMatch") enabled: Optional[StrictBool] = Field(default=None, description="Flag to enable or disable the stream integration.") - __properties: ClassVar[List[str]] = ["customHeaders", "tagMatch", "enabled"] + __properties: ClassVar[List[str]] = ["customHeaders", "tagMatch", "testMatch", "enabled"] model_config = ConfigDict( populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +49,7 @@ class PutStream(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -78,6 +81,13 @@ class PutStream(BaseModel): if _item: _items.append(_item.to_dict()) _dict['tagMatch'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in test_match (list) + _items = [] + if self.test_match: + for _item in self.test_match: + if _item: + _items.append(_item.to_dict()) + _dict['testMatch'] = _items return _dict @classmethod @@ -92,6 +102,7 @@ class PutStream(BaseModel): _obj = cls.model_validate({ "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, "enabled": obj.get("enabled") }) return _obj diff --git a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/stream.py b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/stream.py index 355b75c2..87035593 100644 --- a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/stream.py +++ b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/stream.py @@ -5,7 +5,7 @@ ThousandEyes for OpenTelemetry provides machine-to-machine integration between ThousandEyes and its customers. It allows you to export ThousandEyes telemetry data in OTel format, which is widely used in the industry. With ThousandEyes for OTel, you can leverage frameworks widely used in the observability domain - such as Splunk, Grafana, and Honeycomb - to capture and analyze ThousandEyes data. Any client that supports OTel can use ThousandEyes for OpenTelemetry. ThousandEyes for OTel is made up of the following components: * Data streaming APIs that you can use to configure and enable your ThousandEyes tests with OTel-compatible streams, in particular to configure how ThousandEyes telemetry data is exported to client integrations. * A set of streaming pipelines called _collectors_ that actively fetch ThousandEyes network test data, enrich the data with some additional detail, filter, and push the data to the customer-configured endpoints, depending on what you configure via the public APIs. * Third-party OTel collectors that receive, transform, filter, and export different metrics to client applications such as AppD, or any other OTel-capable client configuration. For more information about ThousandEyes for OpenTelemetry, see the [documentation](https://docs.thousandeyes.com/product-documentation/api/opentelemetry). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -22,6 +22,7 @@ from typing import Any, ClassVar, Dict, List, Optional from thousandeyes_sdk.streaming.models.endpoint_type import EndpointType from thousandeyes_sdk.streaming.models.stream_type import StreamType from thousandeyes_sdk.streaming.models.tag_match import TagMatch +from thousandeyes_sdk.streaming.models.test_match import TestMatch from typing import Optional, Set from typing_extensions import Self @@ -31,16 +32,18 @@ class Stream(BaseModel): """ # noqa: E501 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.", alias="tagMatch") + test_match: Optional[List[TestMatch]] = Field(default=None, description="A collection of tests to be included in the data stream.", alias="testMatch") enabled: Optional[StrictBool] = Field(default=None, description="Flag to enable or disable the stream integration.") type: Optional[StreamType] = None endpoint_type: Optional[EndpointType] = Field(default=None, alias="endpointType") stream_endpoint_url: Optional[StrictStr] = Field(default=None, description="The URL ThousandEyes sends data stream to. For a URL to be valid, it needs to: - Be syntactically correct. - Be reachable. - Use the HTTPS protocol. - When using the `grpc` endpointType, streamEndpointUrl cannot contain paths: - Valid . `grpc` - `https://example.com` - Invalid . `grpc` - `https://example.com/collector`. - Valid . `http` - `https://example.com/collector`. - When using the `http` endpointType, the endpoint must match the exact final full URL (including the path if there is one) to which the metrics will be sent. Examples below: - `https://api.honeycomb.io:443/v1/metrics` - `https://ingest.eu0.signalfx.com/v2/datapoint/otlp`", alias="streamEndpointUrl") - __properties: ClassVar[List[str]] = ["customHeaders", "tagMatch", "enabled", "type", "endpointType", "streamEndpointUrl"] + __properties: ClassVar[List[str]] = ["customHeaders", "tagMatch", "testMatch", "enabled", "type", "endpointType", "streamEndpointUrl"] model_config = ConfigDict( populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -51,7 +54,7 @@ class Stream(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -83,6 +86,13 @@ class Stream(BaseModel): if _item: _items.append(_item.to_dict()) _dict['tagMatch'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in test_match (list) + _items = [] + if self.test_match: + for _item in self.test_match: + if _item: + _items.append(_item.to_dict()) + _dict['testMatch'] = _items return _dict @classmethod @@ -97,6 +107,7 @@ class Stream(BaseModel): _obj = cls.model_validate({ "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, "enabled": obj.get("enabled"), "type": obj.get("type"), "endpointType": obj.get("endpointType"), diff --git a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/stream_links.py b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/stream_links.py index 9a11cee9..b70c65e9 100644 --- a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/stream_links.py +++ b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/stream_links.py @@ -5,7 +5,7 @@ ThousandEyes for OpenTelemetry provides machine-to-machine integration between ThousandEyes and its customers. It allows you to export ThousandEyes telemetry data in OTel format, which is widely used in the industry. With ThousandEyes for OTel, you can leverage frameworks widely used in the observability domain - such as Splunk, Grafana, and Honeycomb - to capture and analyze ThousandEyes data. Any client that supports OTel can use ThousandEyes for OpenTelemetry. ThousandEyes for OTel is made up of the following components: * Data streaming APIs that you can use to configure and enable your ThousandEyes tests with OTel-compatible streams, in particular to configure how ThousandEyes telemetry data is exported to client integrations. * A set of streaming pipelines called _collectors_ that actively fetch ThousandEyes network test data, enrich the data with some additional detail, filter, and push the data to the customer-configured endpoints, depending on what you configure via the public APIs. * Third-party OTel collectors that receive, transform, filter, and export different metrics to client applications such as AppD, or any other OTel-capable client configuration. For more information about ThousandEyes for OpenTelemetry, see the [documentation](https://docs.thousandeyes.com/product-documentation/api/opentelemetry). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class StreamLinks(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class StreamLinks(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/stream_response.py b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/stream_response.py index 2dc93094..81e52ae1 100644 --- a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/stream_response.py +++ b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/stream_response.py @@ -5,7 +5,7 @@ ThousandEyes for OpenTelemetry provides machine-to-machine integration between ThousandEyes and its customers. It allows you to export ThousandEyes telemetry data in OTel format, which is widely used in the industry. With ThousandEyes for OTel, you can leverage frameworks widely used in the observability domain - such as Splunk, Grafana, and Honeycomb - to capture and analyze ThousandEyes data. Any client that supports OTel can use ThousandEyes for OpenTelemetry. ThousandEyes for OTel is made up of the following components: * Data streaming APIs that you can use to configure and enable your ThousandEyes tests with OTel-compatible streams, in particular to configure how ThousandEyes telemetry data is exported to client integrations. * A set of streaming pipelines called _collectors_ that actively fetch ThousandEyes network test data, enrich the data with some additional detail, filter, and push the data to the customer-configured endpoints, depending on what you configure via the public APIs. * Third-party OTel collectors that receive, transform, filter, and export different metrics to client applications such as AppD, or any other OTel-capable client configuration. For more information about ThousandEyes for OpenTelemetry, see the [documentation](https://docs.thousandeyes.com/product-documentation/api/opentelemetry). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class StreamResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class StreamResponse(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/stream_self_link.py b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/stream_self_link.py index e0e7a3c0..495239e9 100644 --- a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/stream_self_link.py +++ b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/stream_self_link.py @@ -5,7 +5,7 @@ ThousandEyes for OpenTelemetry provides machine-to-machine integration between ThousandEyes and its customers. It allows you to export ThousandEyes telemetry data in OTel format, which is widely used in the industry. With ThousandEyes for OTel, you can leverage frameworks widely used in the observability domain - such as Splunk, Grafana, and Honeycomb - to capture and analyze ThousandEyes data. Any client that supports OTel can use ThousandEyes for OpenTelemetry. ThousandEyes for OTel is made up of the following components: * Data streaming APIs that you can use to configure and enable your ThousandEyes tests with OTel-compatible streams, in particular to configure how ThousandEyes telemetry data is exported to client integrations. * A set of streaming pipelines called _collectors_ that actively fetch ThousandEyes network test data, enrich the data with some additional detail, filter, and push the data to the customer-configured endpoints, depending on what you configure via the public APIs. * Third-party OTel collectors that receive, transform, filter, and export different metrics to client applications such as AppD, or any other OTel-capable client configuration. For more information about ThousandEyes for OpenTelemetry, see the [documentation](https://docs.thousandeyes.com/product-documentation/api/opentelemetry). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -33,6 +33,7 @@ class StreamSelfLink(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -43,7 +44,7 @@ class StreamSelfLink(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/stream_type.py b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/stream_type.py index c72f7118..a684e287 100644 --- a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/stream_type.py +++ b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/stream_type.py @@ -5,7 +5,7 @@ ThousandEyes for OpenTelemetry provides machine-to-machine integration between ThousandEyes and its customers. It allows you to export ThousandEyes telemetry data in OTel format, which is widely used in the industry. With ThousandEyes for OTel, you can leverage frameworks widely used in the observability domain - such as Splunk, Grafana, and Honeycomb - to capture and analyze ThousandEyes data. Any client that supports OTel can use ThousandEyes for OpenTelemetry. ThousandEyes for OTel is made up of the following components: * Data streaming APIs that you can use to configure and enable your ThousandEyes tests with OTel-compatible streams, in particular to configure how ThousandEyes telemetry data is exported to client integrations. * A set of streaming pipelines called _collectors_ that actively fetch ThousandEyes network test data, enrich the data with some additional detail, filter, and push the data to the customer-configured endpoints, depending on what you configure via the public APIs. * Third-party OTel collectors that receive, transform, filter, and export different metrics to client applications such as AppD, or any other OTel-capable client configuration. For more information about ThousandEyes for OpenTelemetry, see the [documentation](https://docs.thousandeyes.com/product-documentation/api/opentelemetry). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/tag_match.py b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/tag_match.py index 5eb7cf28..02d44756 100644 --- a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/tag_match.py +++ b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/tag_match.py @@ -5,7 +5,7 @@ ThousandEyes for OpenTelemetry provides machine-to-machine integration between ThousandEyes and its customers. It allows you to export ThousandEyes telemetry data in OTel format, which is widely used in the industry. With ThousandEyes for OTel, you can leverage frameworks widely used in the observability domain - such as Splunk, Grafana, and Honeycomb - to capture and analyze ThousandEyes data. Any client that supports OTel can use ThousandEyes for OpenTelemetry. ThousandEyes for OTel is made up of the following components: * Data streaming APIs that you can use to configure and enable your ThousandEyes tests with OTel-compatible streams, in particular to configure how ThousandEyes telemetry data is exported to client integrations. * A set of streaming pipelines called _collectors_ that actively fetch ThousandEyes network test data, enrich the data with some additional detail, filter, and push the data to the customer-configured endpoints, depending on what you configure via the public APIs. * Third-party OTel collectors that receive, transform, filter, and export different metrics to client applications such as AppD, or any other OTel-capable client configuration. For more information about ThousandEyes for OpenTelemetry, see the [documentation](https://docs.thousandeyes.com/product-documentation/api/opentelemetry). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class TagMatch(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class TagMatch(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/tag_match_object_type.py b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/tag_match_object_type.py index ff8cde86..ae20b998 100644 --- a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/tag_match_object_type.py +++ b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/tag_match_object_type.py @@ -5,7 +5,7 @@ ThousandEyes for OpenTelemetry provides machine-to-machine integration between ThousandEyes and its customers. It allows you to export ThousandEyes telemetry data in OTel format, which is widely used in the industry. With ThousandEyes for OTel, you can leverage frameworks widely used in the observability domain - such as Splunk, Grafana, and Honeycomb - to capture and analyze ThousandEyes data. Any client that supports OTel can use ThousandEyes for OpenTelemetry. ThousandEyes for OTel is made up of the following components: * Data streaming APIs that you can use to configure and enable your ThousandEyes tests with OTel-compatible streams, in particular to configure how ThousandEyes telemetry data is exported to client integrations. * A set of streaming pipelines called _collectors_ that actively fetch ThousandEyes network test data, enrich the data with some additional detail, filter, and push the data to the customer-configured endpoints, depending on what you configure via the public APIs. * Third-party OTel collectors that receive, transform, filter, and export different metrics to client applications such as AppD, or any other OTel-capable client configuration. For more information about ThousandEyes for OpenTelemetry, see the [documentation](https://docs.thousandeyes.com/product-documentation/api/opentelemetry). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/test_match.py b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/test_match.py new file mode 100644 index 00000000..bbde6a93 --- /dev/null +++ b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/test_match.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + ThousandEyes for OpenTelemetry API + + ThousandEyes for OpenTelemetry provides machine-to-machine integration between ThousandEyes and its customers. It allows you to export ThousandEyes telemetry data in OTel format, which is widely used in the industry. With ThousandEyes for OTel, you can leverage frameworks widely used in the observability domain - such as Splunk, Grafana, and Honeycomb - to capture and analyze ThousandEyes data. Any client that supports OTel can use ThousandEyes for OpenTelemetry. ThousandEyes for OTel is made up of the following components: * Data streaming APIs that you can use to configure and enable your ThousandEyes tests with OTel-compatible streams, in particular to configure how ThousandEyes telemetry data is exported to client integrations. * A set of streaming pipelines called _collectors_ that actively fetch ThousandEyes network test data, enrich the data with some additional detail, filter, and push the data to the customer-configured endpoints, depending on what you configure via the public APIs. * Third-party OTel collectors that receive, transform, filter, and export different metrics to client applications such as AppD, or any other OTel-capable client configuration. For more information about ThousandEyes for OpenTelemetry, see the [documentation](https://docs.thousandeyes.com/product-documentation/api/opentelemetry). + + The version of the OpenAPI document: 7.0.6 + 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 thousandeyes_sdk.streaming.models.test_match_domain import TestMatchDomain +from typing import Optional, Set +from typing_extensions import Self + +class TestMatch(BaseModel): + """ + TestMatch + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The ID of the test to match.") + domain: Optional[TestMatchDomain] = None + __properties: ClassVar[List[str]] = ["id", "domain"] + + 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 TestMatch 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 TestMatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "domain": obj.get("domain") + }) + return _obj + + diff --git a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/test_match_domain.py b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/test_match_domain.py new file mode 100644 index 00000000..a184cb98 --- /dev/null +++ b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/test_match_domain.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + ThousandEyes for OpenTelemetry API + + ThousandEyes for OpenTelemetry provides machine-to-machine integration between ThousandEyes and its customers. It allows you to export ThousandEyes telemetry data in OTel format, which is widely used in the industry. With ThousandEyes for OTel, you can leverage frameworks widely used in the observability domain - such as Splunk, Grafana, and Honeycomb - to capture and analyze ThousandEyes data. Any client that supports OTel can use ThousandEyes for OpenTelemetry. ThousandEyes for OTel is made up of the following components: * Data streaming APIs that you can use to configure and enable your ThousandEyes tests with OTel-compatible streams, in particular to configure how ThousandEyes telemetry data is exported to client integrations. * A set of streaming pipelines called _collectors_ that actively fetch ThousandEyes network test data, enrich the data with some additional detail, filter, and push the data to the customer-configured endpoints, depending on what you configure via the public APIs. * Third-party OTel collectors that receive, transform, filter, and export different metrics to client applications such as AppD, or any other OTel-capable client configuration. For more information about ThousandEyes for OpenTelemetry, see the [documentation](https://docs.thousandeyes.com/product-documentation/api/opentelemetry). + + The version of the OpenAPI document: 7.0.6 + 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 TestMatchDomain(str, Enum): + """ + The domain of the test to match. + """ + + """ + allowed enum values + """ + CEA = 'cea' + ENDPOINT = 'endpoint' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TestMatchDomain from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/unauthorized_error.py b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/unauthorized_error.py index d08a6c64..34e4de2d 100644 --- a/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/unauthorized_error.py +++ b/thousandeyes-sdk-streaming/src/thousandeyes_sdk/streaming/models/unauthorized_error.py @@ -5,7 +5,7 @@ ThousandEyes for OpenTelemetry provides machine-to-machine integration between ThousandEyes and its customers. It allows you to export ThousandEyes telemetry data in OTel format, which is widely used in the industry. With ThousandEyes for OTel, you can leverage frameworks widely used in the observability domain - such as Splunk, Grafana, and Honeycomb - to capture and analyze ThousandEyes data. Any client that supports OTel can use ThousandEyes for OpenTelemetry. ThousandEyes for OTel is made up of the following components: * Data streaming APIs that you can use to configure and enable your ThousandEyes tests with OTel-compatible streams, in particular to configure how ThousandEyes telemetry data is exported to client integrations. * A set of streaming pipelines called _collectors_ that actively fetch ThousandEyes network test data, enrich the data with some additional detail, filter, and push the data to the customer-configured endpoints, depending on what you configure via the public APIs. * Third-party OTel collectors that receive, transform, filter, and export different metrics to client applications such as AppD, or any other OTel-capable client configuration. For more information about ThousandEyes for OpenTelemetry, see the [documentation](https://docs.thousandeyes.com/product-documentation/api/opentelemetry). - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class UnauthorizedError(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class UnauthorizedError(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-streaming/test/test_streaming_api.py b/thousandeyes-sdk-streaming/test/test_streaming_api.py new file mode 100644 index 00000000..d335692b --- /dev/null +++ b/thousandeyes-sdk-streaming/test/test_streaming_api.py @@ -0,0 +1,323 @@ +# coding: utf-8 + +""" + ThousandEyes for OpenTelemetry API + + ThousandEyes for OpenTelemetry provides machine-to-machine integration between ThousandEyes and its customers. It allows you to export ThousandEyes telemetry data in OTel format, which is widely used in the industry. With ThousandEyes for OTel, you can leverage frameworks widely used in the observability domain - such as Splunk, Grafana, and Honeycomb - to capture and analyze ThousandEyes data. Any client that supports OTel can use ThousandEyes for OpenTelemetry. ThousandEyes for OTel is made up of the following components: * Data streaming APIs that you can use to configure and enable your ThousandEyes tests with OTel-compatible streams, in particular to configure how ThousandEyes telemetry data is exported to client integrations. * A set of streaming pipelines called _collectors_ that actively fetch ThousandEyes network test data, enrich the data with some additional detail, filter, and push the data to the customer-configured endpoints, depending on what you configure via the public APIs. * Third-party OTel collectors that receive, transform, filter, and export different metrics to client applications such as AppD, or any other OTel-capable client configuration. For more information about ThousandEyes for OpenTelemetry, see the [documentation](https://docs.thousandeyes.com/product-documentation/api/opentelemetry). + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.streaming.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.streaming.api.streaming_api import StreamingApi + + +class TestStreamingApi(unittest.TestCase): + """StreamingApi unit test stubs""" + + def setUp(self) -> None: + self.api = StreamingApi() + + def tearDown(self) -> None: + pass + + def test_create_stream_models_validation(self) -> None: + """Test case for create_stream request and response models""" + request_body_json = """ + { + "testMatch" : [ { + "id" : "1234", + "domain" : "cea" + }, { + "id" : "5678", + "domain" : "endpoint" + } ], + "endpointType" : "grpc", + "streamEndpointUrl" : "https://api.thousandeyes.otel-collector", + "tagMatch" : [ { + "objectType" : "test", + "key" : "keyA", + "value" : "valueA" + }, { + "objectType" : "test", + "key" : "keyB", + "value" : "valueB" + } ], + "type" : "opentelemetry", + "customHeaders" : { + "Authorization" : "*****", + "Content-Type" : "*****" + }, + "enabled" : true + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.streaming.models.Stream.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "testMatch" : [ { + "id" : "1234", + "domain" : "cea" + }, { + "id" : "5678", + "domain" : "endpoint" + } ], + "endpointType" : "grpc", + "_links" : { + "self" : { + "href" : "https://api.thousandeyes.com/v7/streams/575766da-9664-4e85-94fe-facbe1154799" + } + }, + "streamEndpointUrl" : "https://api.thousandeyes.otel-collector", + "tagMatch" : [ { + "objectType" : "test", + "key" : "keyA", + "value" : "valueA" + }, { + "objectType" : "test", + "key" : "keyB", + "value" : "valueB" + } ], + "id" : "342ieu09", + "type" : "opentelemetry", + "auditOperation" : { + "createdDate" : 1679677853573, + "createdBy" : 3962 + }, + "enabled" : true, + "customHeaders" : { + "Authorization" : "*****", + "Content-Type" : "*****" + } + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.streaming.models.CreateStreamResponse.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_delete_stream_models_validation(self) -> None: + """Test case for delete_stream request and response models""" + + + def test_get_stream_models_validation(self) -> None: + """Test case for get_stream request and response models""" + + response_body_json = """ + { + "testMatch" : [ { + "id" : "1234", + "domain" : "cea" + }, { + "id" : "5678", + "domain" : "endpoint" + } ], + "endpointType" : "grpc", + "_links" : { + "self" : { + "href" : "https://api.thousandeyes.com/v7/streams/575766da-9664-4e85-94fe-facbe1154799" + } + }, + "streamEndpointUrl" : "https://api.thousandeyes.otel-collector", + "tagMatch" : [ { + "objectType" : "test", + "key" : "keyA", + "value" : "valueA" + }, { + "objectType" : "test", + "key" : "keyB", + "value" : "valueB" + } ], + "id" : "342ieu09", + "type" : "opentelemetry", + "auditOperation" : { + "createdDate" : 1679677853573, + "updatedBy" : 3962, + "createdBy" : 3962, + "updatedDate" : 1679677853573 + }, + "enabled" : true, + "customHeaders" : { + "Authorization" : "*****", + "Content-Type" : "*****" + } + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.streaming.models.GetStreamResponse.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_streams_models_validation(self) -> None: + """Test case for get_streams request and response models""" + + response_body_json = """ + [ { + "testMatch" : [ { + "id" : "1234", + "domain" : "cea" + }, { + "id" : "5678", + "domain" : "endpoint" + } ], + "endpointType" : "grpc", + "_links" : { + "self" : { + "href" : "https://api.thousandeyes.com/v7/streams/575766da-9664-4e85-94fe-facbe1154799" + } + }, + "streamEndpointUrl" : "https://api.thousandeyes.otel-collector", + "tagMatch" : [ { + "objectType" : "test", + "key" : "keyA", + "value" : "valueA" + }, { + "objectType" : "test", + "key" : "keyB", + "value" : "valueB" + } ], + "id" : "342ieu09", + "type" : "opentelemetry", + "auditOperation" : { + "createdDate" : 1679677853573, + "updatedBy" : 3962, + "createdBy" : 3962, + "updatedDate" : 1679677853573 + }, + "enabled" : true, + "customHeaders" : { + "Authorization" : "*****", + "Content-Type" : "*****" + } + }, { + "testMatch" : [ { + "id" : "1234", + "domain" : "cea" + }, { + "id" : "5678", + "domain" : "endpoint" + } ], + "endpointType" : "grpc", + "_links" : { + "self" : { + "href" : "https://api.thousandeyes.com/v7/streams/575766da-9664-4e85-94fe-facbe1154799" + } + }, + "streamEndpointUrl" : "https://api.thousandeyes.otel-collector", + "tagMatch" : [ { + "objectType" : "test", + "key" : "keyA", + "value" : "valueA" + }, { + "objectType" : "test", + "key" : "keyB", + "value" : "valueB" + } ], + "id" : "342ieu09", + "type" : "opentelemetry", + "auditOperation" : { + "createdDate" : 1679677853573, + "updatedBy" : 3962, + "createdBy" : 3962, + "updatedDate" : 1679677853573 + }, + "enabled" : true, + "customHeaders" : { + "Authorization" : "*****", + "Content-Type" : "*****" + } + } ]""" + + response_loaded_json = json.loads(response_body_json) + response_from_dict = [thousandeyes_sdk.streaming.models.GetStreamResponse.from_dict(value) for value in response_loaded_json] + self.assertGreater(response_from_dict.__len__(), 0) + for index, element in enumerate(response_from_dict): + self.assertIsNotNone(element) + assert_constructed_model_matches_example_json(element, response_loaded_json[index]) + + def test_update_stream_models_validation(self) -> None: + """Test case for update_stream request and response models""" + request_body_json = """ + { + "testMatch" : [ { + "id" : "1234", + "domain" : "cea" + }, { + "id" : "5678", + "domain" : "endpoint" + } ], + "tagMatch" : [ { + "objectType" : "test", + "key" : "keyA", + "value" : "valueA" + }, { + "objectType" : "test", + "key" : "keyB", + "value" : "valueB" + } ], + "customHeaders" : { + "Authorization" : "*****", + "Content-Type" : "*****" + }, + "enabled" : true + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.streaming.models.PutStream.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "testMatch" : [ { + "id" : "1234", + "domain" : "cea" + }, { + "id" : "5678", + "domain" : "endpoint" + } ], + "endpointType" : "grpc", + "_links" : { + "self" : { + "href" : "https://api.thousandeyes.com/v7/streams/575766da-9664-4e85-94fe-facbe1154799" + } + }, + "streamEndpointUrl" : "https://api.thousandeyes.otel-collector", + "tagMatch" : [ { + "objectType" : "test", + "key" : "keyA", + "value" : "valueA" + }, { + "objectType" : "test", + "key" : "keyB", + "value" : "valueB" + } ], + "id" : "342ieu09", + "type" : "opentelemetry", + "auditOperation" : { + "createdDate" : 1679677853573, + "updatedBy" : 3962, + "createdBy" : 3962, + "updatedDate" : 1679677853573 + }, + "enabled" : true, + "customHeaders" : { + "Authorization" : "*****", + "Content-Type" : "*****" + } + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.streaming.models.GetStreamResponse.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-streaming/test/test_utils.py b/thousandeyes-sdk-streaming/test/test_utils.py new file mode 100644 index 00000000..930528d9 --- /dev/null +++ b/thousandeyes-sdk-streaming/test/test_utils.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +import json +import unittest + +from pydantic import BaseModel + + +def assert_constructed_model_matches_example_json(model: BaseModel, loaded_json: dict): + test_case = unittest.TestCase() + test_case.maxDiff = None + test_case.assertIsNotNone(model) + constructed_json = json.loads(model.to_json()) + sorted_loaded_json = json.dumps(loaded_json, sort_keys=True) + sorted_constructed_json = json.dumps(constructed_json, sort_keys=True) + test_case.assertEqual(sorted_loaded_json, sorted_constructed_json) diff --git a/thousandeyes-sdk-tags/.openapi-generator/FILES b/thousandeyes-sdk-tags/.openapi-generator/FILES index c9680c00..d304cb56 100644 --- a/thousandeyes-sdk-tags/.openapi-generator/FILES +++ b/thousandeyes-sdk-tags/.openapi-generator/FILES @@ -51,23 +51,6 @@ src/thousandeyes_sdk/tags/models/validation_error.py src/thousandeyes_sdk/tags/models/validation_error_item.py src/thousandeyes_sdk/tags/py.typed test/__init__.py -test/test_access_type.py -test/test_api_error.py -test/test_assignment.py -test/test_assignment_type.py -test/test_bulk_tag_assignment.py -test/test_bulk_tag_assignments.py -test/test_bulk_tag_response.py -test/test_error.py -test/test_expand.py -test/test_link.py -test/test_object_type.py -test/test_self_links.py -test/test_tag.py -test/test_tag_assignment.py -test/test_tag_bulk_create_error.py -test/test_tag_info.py -test/test_tags.py -test/test_unauthorized_error.py -test/test_validation_error.py -test/test_validation_error_item.py +test/test_tag_assignment_api.py +test/test_tags_api.py +test/test_utils.py diff --git a/thousandeyes-sdk-tags/README.md b/thousandeyes-sdk-tags/README.md index ff278daa..575b8224 100644 --- a/thousandeyes-sdk-tags/README.md +++ b/thousandeyes-sdk-tags/README.md @@ -16,8 +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.4 -- Package version: 1.0.0 +- API version: 7.0.6 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator @@ -31,9 +30,9 @@ Python 3.7+ If the python package is hosted on a repository, you can install directly using: ```sh -pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +pip install -e git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git#egg=thousandeyes-sdk-tags\&subdirectory=thousandeyes-sdk-tags ``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) +(you may need to run `pip` with root permission: `sudo pip install -e git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git#egg=thousandeyes-sdk-tags\&subdirectory=thousandeyes-sdk-tags`) Then import the package: ```python @@ -96,9 +95,7 @@ with thousandeyes_sdk.client.ApiClient(configuration) as api_client: try: # Assign tag to multiple objects - api_response = api_instance.assign_tag(id, tag_assignment, aid=aid) - print("The response of TagAssignmentApi->assign_tag:\n") - pprint(api_response) + api_instance.assign_tag(id, tag_assignment, aid=aid) except ApiException as e: print("Exception when calling TagAssignmentApi->assign_tag: %s\n" % e) @@ -111,11 +108,11 @@ All URIs are relative to *https://api.thousandeyes.com* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *TagAssignmentApi* | [**assign_tag**](docs/TagAssignmentApi.md#assign_tag) | **POST** /v7/tags/{id}/assign | Assign tag to multiple objects -*TagAssignmentApi* | [**bulk_assign_tag**](docs/TagAssignmentApi.md#bulk_assign_tag) | **POST** /v7/tags/assign | Assign multiple tags to multiple objects -*TagAssignmentApi* | [**bulk_un_assign_tag**](docs/TagAssignmentApi.md#bulk_un_assign_tag) | **POST** /v7/tags/unassign | Remove multiple tags from multiple objects +*TagAssignmentApi* | [**assign_tags**](docs/TagAssignmentApi.md#assign_tags) | **POST** /v7/tags/assign | Assign multiple tags to multiple objects *TagAssignmentApi* | [**unassign_tag**](docs/TagAssignmentApi.md#unassign_tag) | **POST** /v7/tags/{id}/unassign | Remove tag from multiple objects +*TagAssignmentApi* | [**unassign_tags**](docs/TagAssignmentApi.md#unassign_tags) | **POST** /v7/tags/unassign | Remove multiple tags from multiple objects *TagsApi* | [**create_tag**](docs/TagsApi.md#create_tag) | **POST** /v7/tags | Create tag -*TagsApi* | [**create_tag_bulk**](docs/TagsApi.md#create_tag_bulk) | **POST** /v7/tags/bulk | Create multiple tags +*TagsApi* | [**create_tags**](docs/TagsApi.md#create_tags) | **POST** /v7/tags/bulk | Create multiple tags *TagsApi* | [**delete_tag**](docs/TagsApi.md#delete_tag) | **DELETE** /v7/tags/{id} | Delete tag *TagsApi* | [**get_tag**](docs/TagsApi.md#get_tag) | **GET** /v7/tags/{id} | Retrieve tag *TagsApi* | [**get_tags**](docs/TagsApi.md#get_tags) | **GET** /v7/tags | List tags diff --git a/thousandeyes-sdk-tags/docs/TagAssignmentApi.md b/thousandeyes-sdk-tags/docs/TagAssignmentApi.md index e445ae67..983d258d 100644 --- a/thousandeyes-sdk-tags/docs/TagAssignmentApi.md +++ b/thousandeyes-sdk-tags/docs/TagAssignmentApi.md @@ -5,13 +5,13 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- [**assign_tag**](TagAssignmentApi.md#assign_tag) | **POST** /v7/tags/{id}/assign | Assign tag to multiple objects -[**bulk_assign_tag**](TagAssignmentApi.md#bulk_assign_tag) | **POST** /v7/tags/assign | Assign multiple tags to multiple objects -[**bulk_un_assign_tag**](TagAssignmentApi.md#bulk_un_assign_tag) | **POST** /v7/tags/unassign | Remove multiple tags from multiple objects +[**assign_tags**](TagAssignmentApi.md#assign_tags) | **POST** /v7/tags/assign | Assign multiple tags to multiple objects [**unassign_tag**](TagAssignmentApi.md#unassign_tag) | **POST** /v7/tags/{id}/unassign | Remove tag from multiple objects +[**unassign_tags**](TagAssignmentApi.md#unassign_tags) | **POST** /v7/tags/unassign | Remove multiple tags from multiple objects # **assign_tag** -> BulkTagAssignment assign_tag(id, tag_assignment, aid=aid) +> assign_tag(id, tag_assignment, aid=aid) Assign tag to multiple objects @@ -23,7 +23,6 @@ Assigns a tag to one or more objects. This endpoint has cumulative behavior: The ```python import thousandeyes_sdk.tags -from thousandeyes_sdk.tags.models.bulk_tag_assignment import BulkTagAssignment from thousandeyes_sdk.tags.models.tag_assignment import TagAssignment from thousandeyes_sdk.tags.rest import ApiException from pprint import pprint @@ -54,9 +53,7 @@ with thousandeyes_sdk.tags.ApiClient(configuration) as api_client: try: # Assign tag to multiple objects - api_response = api_instance.assign_tag(id, tag_assignment, aid=aid) - print("The response of TagAssignmentApi->assign_tag:\n") - pprint(api_response) + api_instance.assign_tag(id, tag_assignment, aid=aid) except Exception as e: print("Exception when calling TagAssignmentApi->assign_tag: %s\n" % e) ``` @@ -74,7 +71,7 @@ Name | Type | Description | Notes ### Return type -[**BulkTagAssignment**](BulkTagAssignment.md) +void (empty response body) ### Authorization @@ -98,8 +95,8 @@ 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) -# **bulk_assign_tag** -> BulkTagAssignments bulk_assign_tag(bulk_tag_assignments, aid=aid) +# **assign_tags** +> assign_tags(bulk_tag_assignments, aid=aid) Assign multiple tags to multiple objects @@ -140,11 +137,9 @@ with thousandeyes_sdk.tags.ApiClient(configuration) as api_client: try: # Assign multiple tags to multiple objects - api_response = api_instance.bulk_assign_tag(bulk_tag_assignments, aid=aid) - print("The response of TagAssignmentApi->bulk_assign_tag:\n") - pprint(api_response) + api_instance.assign_tags(bulk_tag_assignments, aid=aid) except Exception as e: - print("Exception when calling TagAssignmentApi->bulk_assign_tag: %s\n" % e) + print("Exception when calling TagAssignmentApi->assign_tags: %s\n" % e) ``` @@ -159,7 +154,7 @@ Name | Type | Description | Notes ### Return type -[**BulkTagAssignments**](BulkTagAssignments.md) +void (empty response body) ### Authorization @@ -183,91 +178,6 @@ 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) -# **bulk_un_assign_tag** -> BulkTagAssignments bulk_un_assign_tag(bulk_tag_assignments, aid=aid) - -Remove multiple tags from multiple objects - -Removes the specified tags from one or more objects. - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import thousandeyes_sdk.tags -from thousandeyes_sdk.tags.models.bulk_tag_assignments import BulkTagAssignments -from thousandeyes_sdk.tags.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.thousandeyes.com -# See configuration.py for a list of all supported configuration parameters. -configuration = thousandeyes_sdk.client.Configuration( - host = "https://api.thousandeyes.com" -) - -# 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.client.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with thousandeyes_sdk.tags.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = thousandeyes_sdk.tags.TagAssignmentApi(api_client) - bulk_tag_assignments = thousandeyes_sdk.tags.BulkTagAssignments() # BulkTagAssignments | - 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: - # Remove multiple tags from multiple objects - api_response = api_instance.bulk_un_assign_tag(bulk_tag_assignments, aid=aid) - print("The response of TagAssignmentApi->bulk_un_assign_tag:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling TagAssignmentApi->bulk_un_assign_tag: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **bulk_tag_assignments** | [**BulkTagAssignments**](BulkTagAssignments.md)| | - **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 - -[**BulkTagAssignments**](BulkTagAssignments.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json, application/problem+json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**207** | Tag assignments created | - | -**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) - # **unassign_tag** > unassign_tag(id, tag_assignment, aid=aid) @@ -338,7 +248,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/problem+json, application/json + - **Accept**: application/json, application/problem+json ### HTTP response details @@ -353,3 +263,86 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **unassign_tags** +> unassign_tags(bulk_tag_assignments, aid=aid) + +Remove multiple tags from multiple objects + +Removes the specified tags from one or more objects. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.tags +from thousandeyes_sdk.tags.models.bulk_tag_assignments import BulkTagAssignments +from thousandeyes_sdk.tags.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.tags.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.tags.TagAssignmentApi(api_client) + bulk_tag_assignments = thousandeyes_sdk.tags.BulkTagAssignments() # BulkTagAssignments | + 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: + # Remove multiple tags from multiple objects + api_instance.unassign_tags(bulk_tag_assignments, aid=aid) + except Exception as e: + print("Exception when calling TagAssignmentApi->unassign_tags: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **bulk_tag_assignments** | [**BulkTagAssignments**](BulkTagAssignments.md)| | + **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**: application/json + - **Accept**: application/json, application/problem+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**207** | Tag assignments created | - | +**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) + diff --git a/thousandeyes-sdk-tags/docs/TagsApi.md b/thousandeyes-sdk-tags/docs/TagsApi.md index b4e5b461..ea341057 100644 --- a/thousandeyes-sdk-tags/docs/TagsApi.md +++ b/thousandeyes-sdk-tags/docs/TagsApi.md @@ -5,7 +5,7 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- [**create_tag**](TagsApi.md#create_tag) | **POST** /v7/tags | Create tag -[**create_tag_bulk**](TagsApi.md#create_tag_bulk) | **POST** /v7/tags/bulk | Create multiple tags +[**create_tags**](TagsApi.md#create_tags) | **POST** /v7/tags/bulk | Create multiple tags [**delete_tag**](TagsApi.md#delete_tag) | **DELETE** /v7/tags/{id} | Delete tag [**get_tag**](TagsApi.md#get_tag) | **GET** /v7/tags/{id} | Retrieve tag [**get_tags**](TagsApi.md#get_tags) | **GET** /v7/tags | List tags @@ -13,7 +13,7 @@ Method | HTTP request | Description # **create_tag** -> TagInfo create_tag(aid=aid, tag_info=tag_info) +> create_tag(aid=aid, tag_info=tag_info) Create tag @@ -54,9 +54,7 @@ with thousandeyes_sdk.tags.ApiClient(configuration) as api_client: try: # Create tag - api_response = api_instance.create_tag(aid=aid, tag_info=tag_info) - print("The response of TagsApi->create_tag:\n") - pprint(api_response) + api_instance.create_tag(aid=aid, tag_info=tag_info) except Exception as e: print("Exception when calling TagsApi->create_tag: %s\n" % e) ``` @@ -73,7 +71,7 @@ Name | Type | Description | Notes ### Return type -[**TagInfo**](TagInfo.md) +void (empty response body) ### Authorization @@ -96,8 +94,8 @@ 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) -# **create_tag_bulk** -> BulkTagResponse create_tag_bulk(aid=aid, bulk_tag_response=bulk_tag_response) +# **create_tags** +> create_tags(aid=aid, bulk_tag_response=bulk_tag_response) Create multiple tags @@ -138,11 +136,9 @@ with thousandeyes_sdk.tags.ApiClient(configuration) as api_client: try: # Create multiple tags - api_response = api_instance.create_tag_bulk(aid=aid, bulk_tag_response=bulk_tag_response) - print("The response of TagsApi->create_tag_bulk:\n") - pprint(api_response) + api_instance.create_tags(aid=aid, bulk_tag_response=bulk_tag_response) except Exception as e: - print("Exception when calling TagsApi->create_tag_bulk: %s\n" % e) + print("Exception when calling TagsApi->create_tags: %s\n" % e) ``` @@ -157,7 +153,7 @@ Name | Type | Description | Notes ### Return type -[**BulkTagResponse**](BulkTagResponse.md) +void (empty response body) ### Authorization @@ -246,7 +242,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/problem+json, application/json + - **Accept**: application/json, application/problem+json ### HTTP response details @@ -262,7 +258,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_tag** -> Tag get_tag(id, aid=aid, expand=expand) +> get_tag(id, aid=aid, expand=expand) Retrieve tag @@ -275,7 +271,6 @@ Retrieves a tag using its ID. ```python import thousandeyes_sdk.tags from thousandeyes_sdk.tags.models.expand import Expand -from thousandeyes_sdk.tags.models.tag import Tag from thousandeyes_sdk.tags.rest import ApiException from pprint import pprint @@ -305,9 +300,7 @@ with thousandeyes_sdk.tags.ApiClient(configuration) as api_client: try: # Retrieve tag - api_response = api_instance.get_tag(id, aid=aid, expand=expand) - print("The response of TagsApi->get_tag:\n") - pprint(api_response) + api_instance.get_tag(id, aid=aid, expand=expand) except Exception as e: print("Exception when calling TagsApi->get_tag: %s\n" % e) ``` @@ -325,7 +318,7 @@ Name | Type | Description | Notes ### Return type -[**Tag**](Tag.md) +void (empty response body) ### Authorization @@ -350,7 +343,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_tags** -> Tags get_tags(aid=aid, expand=expand) +> get_tags(aid=aid, expand=expand) List tags @@ -363,7 +356,6 @@ This endpoint returns a list of tags in the specified account group (`aid`). ```python import thousandeyes_sdk.tags from thousandeyes_sdk.tags.models.expand import Expand -from thousandeyes_sdk.tags.models.tags import Tags from thousandeyes_sdk.tags.rest import ApiException from pprint import pprint @@ -392,9 +384,7 @@ with thousandeyes_sdk.tags.ApiClient(configuration) as api_client: try: # List tags - api_response = api_instance.get_tags(aid=aid, expand=expand) - print("The response of TagsApi->get_tags:\n") - pprint(api_response) + api_instance.get_tags(aid=aid, expand=expand) except Exception as e: print("Exception when calling TagsApi->get_tags: %s\n" % e) ``` @@ -411,7 +401,7 @@ Name | Type | Description | Notes ### Return type -[**Tags**](Tags.md) +void (empty response body) ### Authorization @@ -436,7 +426,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **update_tag** -> TagInfo update_tag(id, aid=aid, tag_info=tag_info) +> update_tag(id, aid=aid, tag_info=tag_info) Update tag @@ -478,9 +468,7 @@ with thousandeyes_sdk.tags.ApiClient(configuration) as api_client: try: # Update tag - api_response = api_instance.update_tag(id, aid=aid, tag_info=tag_info) - print("The response of TagsApi->update_tag:\n") - pprint(api_response) + api_instance.update_tag(id, aid=aid, tag_info=tag_info) except Exception as e: print("Exception when calling TagsApi->update_tag: %s\n" % e) ``` @@ -498,7 +486,7 @@ Name | Type | Description | Notes ### Return type -[**TagInfo**](TagInfo.md) +void (empty response body) ### Authorization diff --git a/thousandeyes-sdk-tags/docs/ValidationErrorItem.md b/thousandeyes-sdk-tags/docs/ValidationErrorItem.md index 850fe121..6a1ebda4 100644 --- a/thousandeyes-sdk-tags/docs/ValidationErrorItem.md +++ b/thousandeyes-sdk-tags/docs/ValidationErrorItem.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **code** | **str** | (Optional) A unique error type/code that can be referenced in the documentation for further details. | [optional] -**var_field** | **int** | Identifies the field that triggered this particular error. | [optional] +**var_field** | **str** | Identifies the field that triggered this particular error. | [optional] **message** | **str** | A short, human-readable summary of the error. | [optional] ## Example diff --git a/thousandeyes-sdk-tags/pyproject.toml b/thousandeyes-sdk-tags/pyproject.toml index eda7c8c8..265e65fc 100644 --- a/thousandeyes-sdk-tags/pyproject.toml +++ b/thousandeyes-sdk-tags/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "thousandeyes-sdk-tags" -version = "1.0.0" +dynamic = ["version"] authors = [ { name = "ThousandEyes API Team", email = "api-team@thousandeyes.com" } ] @@ -11,9 +11,12 @@ dependencies = [ "python-dateutil >=2.8.2", "pydantic >=2", "typing-extensions >=4.7.1", - "thousandeyes-sdk-client==1.0.0", + "thousandeyes-sdk-core", ] +[tool.setuptools.dynamic] +version = {attr = "thousandeyes_sdk.client.__version__"} + [project.optional-dependencies] test = [ "pytest~=7.1.3", diff --git a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/__init__.py b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/__init__.py index a630e2d2..e83a9aee 100644 --- a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/__init__.py +++ b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/__init__.py @@ -7,15 +7,13 @@ The ThousandEyes Tags API provides a tagging system with key/value pairs. It allows you to tag assets within the ThousandEyes platform (such as agents, tests, or alert rules) with meaningful metadata. For example: `branch:sfo`, `branch:nyc`, and `team:netops`. This feature provides: * Support for automation. * Powerful and flexible reports/dashboards. * Support for third-party integrations. Things to note with the ThousandEyes Tags API: * Tags are backwards-compatible with existing labels. * Tags are separated by Tests (CEA), Agents (CEA), Endpoint Agents, Scheduled Endpoint Tests, and Reports. A single tag can only apply to one type of target object, so each tag must specify the target type of object via a `type` field. * Tags are defined in a single table so that they can be represented using a single model - `Tag`. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 -__version__ = "1.0.0" - # import apis into sdk package from thousandeyes_sdk.tags.api.tag_assignment_api import TagAssignmentApi from thousandeyes_sdk.tags.api.tags_api import TagsApi diff --git a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/api/tag_assignment_api.py b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/api/tag_assignment_api.py index d6c14471..be63176d 100644 --- a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/api/tag_assignment_api.py +++ b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/api/tag_assignment_api.py @@ -5,7 +5,7 @@ The ThousandEyes Tags API provides a tagging system with key/value pairs. It allows you to tag assets within the ThousandEyes platform (such as agents, tests, or alert rules) with meaningful metadata. For example: `branch:sfo`, `branch:nyc`, and `team:netops`. This feature provides: * Support for automation. * Powerful and flexible reports/dashboards. * Support for third-party integrations. Things to note with the ThousandEyes Tags API: * Tags are backwards-compatible with existing labels. * Tags are separated by Tests (CEA), Agents (CEA), Endpoint Agents, Scheduled Endpoint Tests, and Reports. A single tag can only apply to one type of target object, so each tag must specify the target type of object via a `type` field. * Tags are defined in a single table so that they can be represented using a single model - `Tag`. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -21,13 +21,13 @@ import thousandeyes_sdk.tags.models from pydantic import Field, StrictStr from typing import Optional from typing_extensions import Annotated -from thousandeyes_sdk.tags.models.bulk_tag_assignment import BulkTagAssignment from thousandeyes_sdk.tags.models.bulk_tag_assignments import BulkTagAssignments from thousandeyes_sdk.tags.models.tag_assignment import TagAssignment from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class TagAssignmentApi: @@ -40,6 +40,7 @@ class TagAssignmentApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @@ -61,7 +62,7 @@ class TagAssignmentApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> BulkTagAssignment: + ) -> None: """Assign tag to multiple objects Assigns a tag to one or more objects. This endpoint has cumulative behavior: The tag is assigned to the specified objects, and the previous assignments persist. No unassignment takes place. @@ -105,7 +106,7 @@ class TagAssignmentApi: ) _response_types_map: Dict[str, Optional[str]] = { - '207': "BulkTagAssignment", + '207': None, '401': "UnauthorizedError", '403': "Error", '404': "Error", @@ -142,7 +143,7 @@ class TagAssignmentApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[BulkTagAssignment]: + ) -> ApiResponse[None]: """Assign tag to multiple objects Assigns a tag to one or more objects. This endpoint has cumulative behavior: The tag is assigned to the specified objects, and the previous assignments persist. No unassignment takes place. @@ -186,7 +187,7 @@ class TagAssignmentApi: ) _response_types_map: Dict[str, Optional[str]] = { - '207': "BulkTagAssignment", + '207': None, '401': "UnauthorizedError", '403': "Error", '404': "Error", @@ -267,7 +268,7 @@ class TagAssignmentApi: ) _response_types_map: Dict[str, Optional[str]] = { - '207': "BulkTagAssignment", + '207': None, '401': "UnauthorizedError", '403': "Error", '404': "Error", @@ -365,7 +366,7 @@ class TagAssignmentApi: @validate_call - def bulk_assign_tag( + def assign_tags( self, bulk_tag_assignments: BulkTagAssignments, 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, @@ -381,7 +382,7 @@ class TagAssignmentApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> BulkTagAssignments: + ) -> None: """Assign multiple tags to multiple objects Assigns the specified tags to the specified objects. This endpoint has cumulative behavior: The tags are assigned to the specified objects, and the previous assignments persist. No unassignment takes place. @@ -412,7 +413,7 @@ class TagAssignmentApi: :return: Returns the result object. """ # noqa: E501 - _param = self._bulk_assign_tag_serialize( + _param = self._assign_tags_serialize( bulk_tag_assignments=bulk_tag_assignments, aid=aid, _request_auth=_request_auth, @@ -422,7 +423,7 @@ class TagAssignmentApi: ) _response_types_map: Dict[str, Optional[str]] = { - '207': "BulkTagAssignments", + '207': None, '401': "UnauthorizedError", '403': "Error", '404': "Error", @@ -442,7 +443,7 @@ class TagAssignmentApi: @validate_call - def bulk_assign_tag_with_http_info( + def assign_tags_with_http_info( self, bulk_tag_assignments: BulkTagAssignments, 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, @@ -458,7 +459,7 @@ class TagAssignmentApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[BulkTagAssignments]: + ) -> ApiResponse[None]: """Assign multiple tags to multiple objects Assigns the specified tags to the specified objects. This endpoint has cumulative behavior: The tags are assigned to the specified objects, and the previous assignments persist. No unassignment takes place. @@ -489,7 +490,7 @@ class TagAssignmentApi: :return: Returns the result object. """ # noqa: E501 - _param = self._bulk_assign_tag_serialize( + _param = self._assign_tags_serialize( bulk_tag_assignments=bulk_tag_assignments, aid=aid, _request_auth=_request_auth, @@ -499,7 +500,7 @@ class TagAssignmentApi: ) _response_types_map: Dict[str, Optional[str]] = { - '207': "BulkTagAssignments", + '207': None, '401': "UnauthorizedError", '403': "Error", '404': "Error", @@ -519,7 +520,7 @@ class TagAssignmentApi: @validate_call - def bulk_assign_tag_without_preload_content( + def assign_tags_without_preload_content( self, bulk_tag_assignments: BulkTagAssignments, 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, @@ -566,7 +567,7 @@ class TagAssignmentApi: :return: Returns the result object. """ # noqa: E501 - _param = self._bulk_assign_tag_serialize( + _param = self._assign_tags_serialize( bulk_tag_assignments=bulk_tag_assignments, aid=aid, _request_auth=_request_auth, @@ -576,7 +577,7 @@ class TagAssignmentApi: ) _response_types_map: Dict[str, Optional[str]] = { - '207': "BulkTagAssignments", + '207': None, '401': "UnauthorizedError", '403': "Error", '404': "Error", @@ -590,7 +591,7 @@ class TagAssignmentApi: return response_data.response - def _bulk_assign_tag_serialize( + def _assign_tags_serialize( self, bulk_tag_assignments, aid, @@ -670,312 +671,6 @@ class TagAssignmentApi: - @validate_call - def bulk_un_assign_tag( - self, - bulk_tag_assignments: BulkTagAssignments, - 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, - ) -> BulkTagAssignments: - """Remove multiple tags from multiple objects - - Removes the specified tags from one or more objects. - - :param bulk_tag_assignments: (required) - :type bulk_tag_assignments: BulkTagAssignments - :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._bulk_un_assign_tag_serialize( - bulk_tag_assignments=bulk_tag_assignments, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '207': "BulkTagAssignments", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "ApiError", - } - 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.tags.models, - ).data - - - @validate_call - def bulk_un_assign_tag_with_http_info( - self, - bulk_tag_assignments: BulkTagAssignments, - 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[BulkTagAssignments]: - """Remove multiple tags from multiple objects - - Removes the specified tags from one or more objects. - - :param bulk_tag_assignments: (required) - :type bulk_tag_assignments: BulkTagAssignments - :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._bulk_un_assign_tag_serialize( - bulk_tag_assignments=bulk_tag_assignments, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '207': "BulkTagAssignments", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "ApiError", - } - 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.tags.models, - ) - - - @validate_call - def bulk_un_assign_tag_without_preload_content( - self, - bulk_tag_assignments: BulkTagAssignments, - 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: - """Remove multiple tags from multiple objects - - Removes the specified tags from one or more objects. - - :param bulk_tag_assignments: (required) - :type bulk_tag_assignments: BulkTagAssignments - :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._bulk_un_assign_tag_serialize( - bulk_tag_assignments=bulk_tag_assignments, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '207': "BulkTagAssignments", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "ApiError", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _bulk_un_assign_tag_serialize( - self, - bulk_tag_assignments, - 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 - if bulk_tag_assignments is not None: - _body_params = bulk_tag_assignments - - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - '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] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/v7/tags/unassign', - 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 unassign_tag( self, @@ -1255,8 +950,8 @@ class TagAssignmentApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ - 'application/problem+json', - 'application/json' + 'application/json', + 'application/problem+json' ] ) @@ -1295,3 +990,309 @@ class TagAssignmentApi: ) + + + @validate_call + def unassign_tags( + self, + bulk_tag_assignments: BulkTagAssignments, + 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, + ) -> None: + """Remove multiple tags from multiple objects + + Removes the specified tags from one or more objects. + + :param bulk_tag_assignments: (required) + :type bulk_tag_assignments: BulkTagAssignments + :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._unassign_tags_serialize( + bulk_tag_assignments=bulk_tag_assignments, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '207': None, + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "ApiError", + } + 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.tags.models, + ).data + + + @validate_call + def unassign_tags_with_http_info( + self, + bulk_tag_assignments: BulkTagAssignments, + 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[None]: + """Remove multiple tags from multiple objects + + Removes the specified tags from one or more objects. + + :param bulk_tag_assignments: (required) + :type bulk_tag_assignments: BulkTagAssignments + :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._unassign_tags_serialize( + bulk_tag_assignments=bulk_tag_assignments, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '207': None, + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "ApiError", + } + 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.tags.models, + ) + + + @validate_call + def unassign_tags_without_preload_content( + self, + bulk_tag_assignments: BulkTagAssignments, + 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: + """Remove multiple tags from multiple objects + + Removes the specified tags from one or more objects. + + :param bulk_tag_assignments: (required) + :type bulk_tag_assignments: BulkTagAssignments + :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._unassign_tags_serialize( + bulk_tag_assignments=bulk_tag_assignments, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '207': None, + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "ApiError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _unassign_tags_serialize( + self, + bulk_tag_assignments, + 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 + if bulk_tag_assignments is not None: + _body_params = bulk_tag_assignments + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '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] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v7/tags/unassign', + 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 + ) + + 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 2e9e6cf6..64107c46 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 @@ -5,7 +5,7 @@ The ThousandEyes Tags API provides a tagging system with key/value pairs. It allows you to tag assets within the ThousandEyes platform (such as agents, tests, or alert rules) with meaningful metadata. For example: `branch:sfo`, `branch:nyc`, and `team:netops`. This feature provides: * Support for automation. * Powerful and flexible reports/dashboards. * Support for third-party integrations. Things to note with the ThousandEyes Tags API: * Tags are backwards-compatible with existing labels. * Tags are separated by Tests (CEA), Agents (CEA), Endpoint Agents, Scheduled Endpoint Tests, and Reports. A single tag can only apply to one type of target object, so each tag must specify the target type of object via a `type` field. * Tags are defined in a single table so that they can be represented using a single model - `Tag`. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -23,13 +23,12 @@ from typing import List, Optional from typing_extensions import Annotated from thousandeyes_sdk.tags.models.bulk_tag_response import BulkTagResponse from thousandeyes_sdk.tags.models.expand import Expand -from thousandeyes_sdk.tags.models.tag import Tag from thousandeyes_sdk.tags.models.tag_info import TagInfo -from thousandeyes_sdk.tags.models.tags import Tags from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class TagsApi: @@ -42,6 +41,7 @@ class TagsApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @@ -62,7 +62,7 @@ class TagsApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> TagInfo: + ) -> None: """Create tag Creates a new tag. @@ -103,7 +103,7 @@ class TagsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '201': "TagInfo", + '201': None, '400': "ValidationError", '401': "UnauthorizedError", '409': None, @@ -138,7 +138,7 @@ class TagsApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[TagInfo]: + ) -> ApiResponse[None]: """Create tag Creates a new tag. @@ -179,7 +179,7 @@ class TagsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '201': "TagInfo", + '201': None, '400': "ValidationError", '401': "UnauthorizedError", '409': None, @@ -255,7 +255,7 @@ class TagsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '201': "TagInfo", + '201': None, '400': "ValidationError", '401': "UnauthorizedError", '409': None, @@ -349,7 +349,7 @@ class TagsApi: @validate_call - def create_tag_bulk( + def create_tags( 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, bulk_tag_response: Annotated[Optional[BulkTagResponse], Field(description="Tag resource")] = None, @@ -365,7 +365,7 @@ class TagsApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> BulkTagResponse: + ) -> None: """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. @@ -396,7 +396,7 @@ class TagsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._create_tag_bulk_serialize( + _param = self._create_tags_serialize( aid=aid, bulk_tag_response=bulk_tag_response, _request_auth=_request_auth, @@ -406,7 +406,7 @@ class TagsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '207': "BulkTagResponse", + '207': None, '400': "ValidationError", '401': "UnauthorizedError", '500': "ApiError", @@ -424,7 +424,7 @@ class TagsApi: @validate_call - def create_tag_bulk_with_http_info( + def create_tags_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, bulk_tag_response: Annotated[Optional[BulkTagResponse], Field(description="Tag resource")] = None, @@ -440,7 +440,7 @@ class TagsApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[BulkTagResponse]: + ) -> ApiResponse[None]: """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. @@ -471,7 +471,7 @@ class TagsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._create_tag_bulk_serialize( + _param = self._create_tags_serialize( aid=aid, bulk_tag_response=bulk_tag_response, _request_auth=_request_auth, @@ -481,7 +481,7 @@ class TagsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '207': "BulkTagResponse", + '207': None, '400': "ValidationError", '401': "UnauthorizedError", '500': "ApiError", @@ -499,7 +499,7 @@ class TagsApi: @validate_call - def create_tag_bulk_without_preload_content( + def create_tags_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, bulk_tag_response: Annotated[Optional[BulkTagResponse], Field(description="Tag resource")] = None, @@ -546,7 +546,7 @@ class TagsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._create_tag_bulk_serialize( + _param = self._create_tags_serialize( aid=aid, bulk_tag_response=bulk_tag_response, _request_auth=_request_auth, @@ -556,7 +556,7 @@ class TagsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '207': "BulkTagResponse", + '207': None, '400': "ValidationError", '401': "UnauthorizedError", '500': "ApiError", @@ -568,7 +568,7 @@ class TagsApi: return response_data.response - def _create_tag_bulk_serialize( + def _create_tags_serialize( self, aid, bulk_tag_response, @@ -912,8 +912,8 @@ class TagsApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ - 'application/problem+json', - 'application/json' + 'application/json', + 'application/problem+json' ] ) @@ -959,7 +959,7 @@ class TagsApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Tag: + ) -> None: """Retrieve tag Retrieves a tag using its ID. @@ -1003,7 +1003,7 @@ class TagsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Tag", + '200': None, '401': "UnauthorizedError", '403': "Error", '404': "Error", @@ -1040,7 +1040,7 @@ class TagsApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Tag]: + ) -> ApiResponse[None]: """Retrieve tag Retrieves a tag using its ID. @@ -1084,7 +1084,7 @@ class TagsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Tag", + '200': None, '401': "UnauthorizedError", '403': "Error", '404': "Error", @@ -1165,7 +1165,7 @@ class TagsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Tag", + '200': None, '401': "UnauthorizedError", '403': "Error", '404': "Error", @@ -1269,7 +1269,7 @@ class TagsApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Tags: + ) -> None: """List tags This endpoint returns a list of tags in the specified account group (`aid`). @@ -1310,7 +1310,7 @@ class TagsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Tags", + '200': None, '401': "UnauthorizedError", '403': "Error", '404': "Error", @@ -1346,7 +1346,7 @@ class TagsApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Tags]: + ) -> ApiResponse[None]: """List tags This endpoint returns a list of tags in the specified account group (`aid`). @@ -1387,7 +1387,7 @@ class TagsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Tags", + '200': None, '401': "UnauthorizedError", '403': "Error", '404': "Error", @@ -1464,7 +1464,7 @@ class TagsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Tags", + '200': None, '401': "UnauthorizedError", '403': "Error", '404': "Error", @@ -1566,7 +1566,7 @@ class TagsApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> TagInfo: + ) -> None: """Update tag Updates a tag. @@ -1610,7 +1610,7 @@ class TagsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TagInfo", + '200': None, '401': "UnauthorizedError", '403': "Error", '404': "Error", @@ -1647,7 +1647,7 @@ class TagsApi: _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[TagInfo]: + ) -> ApiResponse[None]: """Update tag Updates a tag. @@ -1691,7 +1691,7 @@ class TagsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TagInfo", + '200': None, '401': "UnauthorizedError", '403': "Error", '404': "Error", @@ -1772,7 +1772,7 @@ class TagsApi: ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TagInfo", + '200': None, '401': "UnauthorizedError", '403': "Error", '404': "Error", diff --git a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/__init__.py b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/__init__.py index 95aa5b9c..1d117a7a 100644 --- a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/__init__.py +++ b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/__init__.py @@ -6,7 +6,7 @@ The ThousandEyes Tags API provides a tagging system with key/value pairs. It allows you to tag assets within the ThousandEyes platform (such as agents, tests, or alert rules) with meaningful metadata. For example: `branch:sfo`, `branch:nyc`, and `team:netops`. This feature provides: * Support for automation. * Powerful and flexible reports/dashboards. * Support for third-party integrations. Things to note with the ThousandEyes Tags API: * Tags are backwards-compatible with existing labels. * Tags are separated by Tests (CEA), Agents (CEA), Endpoint Agents, Scheduled Endpoint Tests, and Reports. A single tag can only apply to one type of target object, so each tag must specify the target type of object via a `type` field. * Tags are defined in a single table so that they can be represented using a single model - `Tag`. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/access_type.py b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/access_type.py index bec2cab4..563172d0 100644 --- a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/access_type.py +++ b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/access_type.py @@ -5,7 +5,7 @@ The ThousandEyes Tags API provides a tagging system with key/value pairs. It allows you to tag assets within the ThousandEyes platform (such as agents, tests, or alert rules) with meaningful metadata. For example: `branch:sfo`, `branch:nyc`, and `team:netops`. This feature provides: * Support for automation. * Powerful and flexible reports/dashboards. * Support for third-party integrations. Things to note with the ThousandEyes Tags API: * Tags are backwards-compatible with existing labels. * Tags are separated by Tests (CEA), Agents (CEA), Endpoint Agents, Scheduled Endpoint Tests, and Reports. A single tag can only apply to one type of target object, so each tag must specify the target type of object via a `type` field. * Tags are defined in a single table so that they can be represented using a single model - `Tag`. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/api_error.py b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/api_error.py index 060aff87..1df19cc1 100644 --- a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/api_error.py +++ b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/api_error.py @@ -5,7 +5,7 @@ The ThousandEyes Tags API provides a tagging system with key/value pairs. It allows you to tag assets within the ThousandEyes platform (such as agents, tests, or alert rules) with meaningful metadata. For example: `branch:sfo`, `branch:nyc`, and `team:netops`. This feature provides: * Support for automation. * Powerful and flexible reports/dashboards. * Support for third-party integrations. Things to note with the ThousandEyes Tags API: * Tags are backwards-compatible with existing labels. * Tags are separated by Tests (CEA), Agents (CEA), Endpoint Agents, Scheduled Endpoint Tests, and Reports. A single tag can only apply to one type of target object, so each tag must specify the target type of object via a `type` field. * Tags are defined in a single table so that they can be represented using a single model - `Tag`. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class ApiError(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class ApiError(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/assignment.py b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/assignment.py index 60263f1b..c4221ac1 100644 --- a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/assignment.py +++ b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/assignment.py @@ -5,7 +5,7 @@ The ThousandEyes Tags API provides a tagging system with key/value pairs. It allows you to tag assets within the ThousandEyes platform (such as agents, tests, or alert rules) with meaningful metadata. For example: `branch:sfo`, `branch:nyc`, and `team:netops`. This feature provides: * Support for automation. * Powerful and flexible reports/dashboards. * Support for third-party integrations. Things to note with the ThousandEyes Tags API: * Tags are backwards-compatible with existing labels. * Tags are separated by Tests (CEA), Agents (CEA), Endpoint Agents, Scheduled Endpoint Tests, and Reports. A single tag can only apply to one type of target object, so each tag must specify the target type of object via a `type` field. * Tags are defined in a single table so that they can be represented using a single model - `Tag`. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class Assignment(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class Assignment(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/assignment_type.py b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/assignment_type.py index d42a0b99..25faf37f 100644 --- a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/assignment_type.py +++ b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/assignment_type.py @@ -5,7 +5,7 @@ The ThousandEyes Tags API provides a tagging system with key/value pairs. It allows you to tag assets within the ThousandEyes platform (such as agents, tests, or alert rules) with meaningful metadata. For example: `branch:sfo`, `branch:nyc`, and `team:netops`. This feature provides: * Support for automation. * Powerful and flexible reports/dashboards. * Support for third-party integrations. Things to note with the ThousandEyes Tags API: * Tags are backwards-compatible with existing labels. * Tags are separated by Tests (CEA), Agents (CEA), Endpoint Agents, Scheduled Endpoint Tests, and Reports. A single tag can only apply to one type of target object, so each tag must specify the target type of object via a `type` field. * Tags are defined in a single table so that they can be represented using a single model - `Tag`. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/bulk_tag_assignment.py b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/bulk_tag_assignment.py index c36a4687..5e564ada 100644 --- a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/bulk_tag_assignment.py +++ b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/bulk_tag_assignment.py @@ -5,7 +5,7 @@ The ThousandEyes Tags API provides a tagging system with key/value pairs. It allows you to tag assets within the ThousandEyes platform (such as agents, tests, or alert rules) with meaningful metadata. For example: `branch:sfo`, `branch:nyc`, and `team:netops`. This feature provides: * Support for automation. * Powerful and flexible reports/dashboards. * Support for third-party integrations. Things to note with the ThousandEyes Tags API: * Tags are backwards-compatible with existing labels. * Tags are separated by Tests (CEA), Agents (CEA), Endpoint Agents, Scheduled Endpoint Tests, and Reports. A single tag can only apply to one type of target object, so each tag must specify the target type of object via a `type` field. * Tags are defined in a single table so that they can be represented using a single model - `Tag`. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class BulkTagAssignment(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class BulkTagAssignment(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/bulk_tag_assignments.py b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/bulk_tag_assignments.py index 89463ad4..7f658c17 100644 --- a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/bulk_tag_assignments.py +++ b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/bulk_tag_assignments.py @@ -5,7 +5,7 @@ The ThousandEyes Tags API provides a tagging system with key/value pairs. It allows you to tag assets within the ThousandEyes platform (such as agents, tests, or alert rules) with meaningful metadata. For example: `branch:sfo`, `branch:nyc`, and `team:netops`. This feature provides: * Support for automation. * Powerful and flexible reports/dashboards. * Support for third-party integrations. Things to note with the ThousandEyes Tags API: * Tags are backwards-compatible with existing labels. * Tags are separated by Tests (CEA), Agents (CEA), Endpoint Agents, Scheduled Endpoint Tests, and Reports. A single tag can only apply to one type of target object, so each tag must specify the target type of object via a `type` field. * Tags are defined in a single table so that they can be represented using a single model - `Tag`. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class BulkTagAssignments(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class BulkTagAssignments(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/bulk_tag_response.py b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/bulk_tag_response.py index 8efc4b2e..7506f6a6 100644 --- a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/bulk_tag_response.py +++ b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/bulk_tag_response.py @@ -5,7 +5,7 @@ The ThousandEyes Tags API provides a tagging system with key/value pairs. It allows you to tag assets within the ThousandEyes platform (such as agents, tests, or alert rules) with meaningful metadata. For example: `branch:sfo`, `branch:nyc`, and `team:netops`. This feature provides: * Support for automation. * Powerful and flexible reports/dashboards. * Support for third-party integrations. Things to note with the ThousandEyes Tags API: * Tags are backwards-compatible with existing labels. * Tags are separated by Tests (CEA), Agents (CEA), Endpoint Agents, Scheduled Endpoint Tests, and Reports. A single tag can only apply to one type of target object, so each tag must specify the target type of object via a `type` field. * Tags are defined in a single table so that they can be represented using a single model - `Tag`. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class BulkTagResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class BulkTagResponse(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/error.py b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/error.py index 3b9e5ef3..dcee7d6c 100644 --- a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/error.py +++ b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/error.py @@ -5,7 +5,7 @@ The ThousandEyes Tags API provides a tagging system with key/value pairs. It allows you to tag assets within the ThousandEyes platform (such as agents, tests, or alert rules) with meaningful metadata. For example: `branch:sfo`, `branch:nyc`, and `team:netops`. This feature provides: * Support for automation. * Powerful and flexible reports/dashboards. * Support for third-party integrations. Things to note with the ThousandEyes Tags API: * Tags are backwards-compatible with existing labels. * Tags are separated by Tests (CEA), Agents (CEA), Endpoint Agents, Scheduled Endpoint Tests, and Reports. A single tag can only apply to one type of target object, so each tag must specify the target type of object via a `type` field. * Tags are defined in a single table so that they can be represented using a single model - `Tag`. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -37,6 +37,7 @@ class Error(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -47,7 +48,7 @@ class Error(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/expand.py b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/expand.py index 9698a9ea..be7d2b88 100644 --- a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/expand.py +++ b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/expand.py @@ -5,7 +5,7 @@ The ThousandEyes Tags API provides a tagging system with key/value pairs. It allows you to tag assets within the ThousandEyes platform (such as agents, tests, or alert rules) with meaningful metadata. For example: `branch:sfo`, `branch:nyc`, and `team:netops`. This feature provides: * Support for automation. * Powerful and flexible reports/dashboards. * Support for third-party integrations. Things to note with the ThousandEyes Tags API: * Tags are backwards-compatible with existing labels. * Tags are separated by Tests (CEA), Agents (CEA), Endpoint Agents, Scheduled Endpoint Tests, and Reports. A single tag can only apply to one type of target object, so each tag must specify the target type of object via a `type` field. * Tags are defined in a single table so that they can be represented using a single model - `Tag`. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/link.py b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/link.py index fb94c36a..b32beca4 100644 --- a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/link.py +++ b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/link.py @@ -5,7 +5,7 @@ The ThousandEyes Tags API provides a tagging system with key/value pairs. It allows you to tag assets within the ThousandEyes platform (such as agents, tests, or alert rules) with meaningful metadata. For example: `branch:sfo`, `branch:nyc`, and `team:netops`. This feature provides: * Support for automation. * Powerful and flexible reports/dashboards. * Support for third-party integrations. Things to note with the ThousandEyes Tags API: * Tags are backwards-compatible with existing labels. * Tags are separated by Tests (CEA), Agents (CEA), Endpoint Agents, Scheduled Endpoint Tests, and Reports. A single tag can only apply to one type of target object, so each tag must specify the target type of object via a `type` field. * Tags are defined in a single table so that they can be represented using a single model - `Tag`. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -40,6 +40,7 @@ class Link(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -50,7 +51,7 @@ class Link(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/object_type.py b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/object_type.py index fb6c9ad1..299d1de4 100644 --- a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/object_type.py +++ b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/object_type.py @@ -5,7 +5,7 @@ The ThousandEyes Tags API provides a tagging system with key/value pairs. It allows you to tag assets within the ThousandEyes platform (such as agents, tests, or alert rules) with meaningful metadata. For example: `branch:sfo`, `branch:nyc`, and `team:netops`. This feature provides: * Support for automation. * Powerful and flexible reports/dashboards. * Support for third-party integrations. Things to note with the ThousandEyes Tags API: * Tags are backwards-compatible with existing labels. * Tags are separated by Tests (CEA), Agents (CEA), Endpoint Agents, Scheduled Endpoint Tests, and Reports. A single tag can only apply to one type of target object, so each tag must specify the target type of object via a `type` field. * Tags are defined in a single table so that they can be represented using a single model - `Tag`. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/self_links.py b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/self_links.py index 954dc451..717abb00 100644 --- a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/self_links.py +++ b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/self_links.py @@ -5,7 +5,7 @@ The ThousandEyes Tags API provides a tagging system with key/value pairs. It allows you to tag assets within the ThousandEyes platform (such as agents, tests, or alert rules) with meaningful metadata. For example: `branch:sfo`, `branch:nyc`, and `team:netops`. This feature provides: * Support for automation. * Powerful and flexible reports/dashboards. * Support for third-party integrations. Things to note with the ThousandEyes Tags API: * Tags are backwards-compatible with existing labels. * Tags are separated by Tests (CEA), Agents (CEA), Endpoint Agents, Scheduled Endpoint Tests, and Reports. A single tag can only apply to one type of target object, so each tag must specify the target type of object via a `type` field. * Tags are defined in a single table so that they can be represented using a single model - `Tag`. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class SelfLinks(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class SelfLinks(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: 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 2f653751..155c61d4 100644 --- a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/tag.py +++ b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/tag.py @@ -5,7 +5,7 @@ The ThousandEyes Tags API provides a tagging system with key/value pairs. It allows you to tag assets within the ThousandEyes platform (such as agents, tests, or alert rules) with meaningful metadata. For example: `branch:sfo`, `branch:nyc`, and `team:netops`. This feature provides: * Support for automation. * Powerful and flexible reports/dashboards. * Support for third-party integrations. Things to note with the ThousandEyes Tags API: * Tags are backwards-compatible with existing labels. * Tags are separated by Tests (CEA), Agents (CEA), Endpoint Agents, Scheduled Endpoint Tests, and Reports. A single tag can only apply to one type of target object, so each tag must specify the target type of object via a `type` field. * Tags are defined in a single table so that they can be represented using a single model - `Tag`. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -48,6 +48,7 @@ class Tag(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -58,7 +59,7 @@ class Tag(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/tag_assignment.py b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/tag_assignment.py index f1d98abe..7ab00ea7 100644 --- a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/tag_assignment.py +++ b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/tag_assignment.py @@ -5,7 +5,7 @@ The ThousandEyes Tags API provides a tagging system with key/value pairs. It allows you to tag assets within the ThousandEyes platform (such as agents, tests, or alert rules) with meaningful metadata. For example: `branch:sfo`, `branch:nyc`, and `team:netops`. This feature provides: * Support for automation. * Powerful and flexible reports/dashboards. * Support for third-party integrations. Things to note with the ThousandEyes Tags API: * Tags are backwards-compatible with existing labels. * Tags are separated by Tests (CEA), Agents (CEA), Endpoint Agents, Scheduled Endpoint Tests, and Reports. A single tag can only apply to one type of target object, so each tag must specify the target type of object via a `type` field. * Tags are defined in a single table so that they can be represented using a single model - `Tag`. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class TagAssignment(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class TagAssignment(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: 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 3136211a..fd1843ce 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 @@ -5,7 +5,7 @@ The ThousandEyes Tags API provides a tagging system with key/value pairs. It allows you to tag assets within the ThousandEyes platform (such as agents, tests, or alert rules) with meaningful metadata. For example: `branch:sfo`, `branch:nyc`, and `team:netops`. This feature provides: * Support for automation. * Powerful and flexible reports/dashboards. * Support for third-party integrations. Things to note with the ThousandEyes Tags API: * Tags are backwards-compatible with existing labels. * Tags are separated by Tests (CEA), Agents (CEA), Endpoint Agents, Scheduled Endpoint Tests, and Reports. A single tag can only apply to one type of target object, so each tag must specify the target type of object via a `type` field. * Tags are defined in a single table so that they can be represented using a single model - `Tag`. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class TagBulkCreateError(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class TagBulkCreateError(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: 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 c95d33d0..e2d4b050 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 @@ -5,7 +5,7 @@ The ThousandEyes Tags API provides a tagging system with key/value pairs. It allows you to tag assets within the ThousandEyes platform (such as agents, tests, or alert rules) with meaningful metadata. For example: `branch:sfo`, `branch:nyc`, and `team:netops`. This feature provides: * Support for automation. * Powerful and flexible reports/dashboards. * Support for third-party integrations. Things to note with the ThousandEyes Tags API: * Tags are backwards-compatible with existing labels. * Tags are separated by Tests (CEA), Agents (CEA), Endpoint Agents, Scheduled Endpoint Tests, and Reports. A single tag can only apply to one type of target object, so each tag must specify the target type of object via a `type` field. * Tags are defined in a single table so that they can be represented using a single model - `Tag`. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -46,6 +46,7 @@ class TagInfo(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -56,7 +57,7 @@ class TagInfo(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/tags.py b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/tags.py index a89bc490..facb6778 100644 --- a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/tags.py +++ b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/tags.py @@ -5,7 +5,7 @@ The ThousandEyes Tags API provides a tagging system with key/value pairs. It allows you to tag assets within the ThousandEyes platform (such as agents, tests, or alert rules) with meaningful metadata. For example: `branch:sfo`, `branch:nyc`, and `team:netops`. This feature provides: * Support for automation. * Powerful and flexible reports/dashboards. * Support for third-party integrations. Things to note with the ThousandEyes Tags API: * Tags are backwards-compatible with existing labels. * Tags are separated by Tests (CEA), Agents (CEA), Endpoint Agents, Scheduled Endpoint Tests, and Reports. A single tag can only apply to one type of target object, so each tag must specify the target type of object via a `type` field. * Tags are defined in a single table so that they can be represented using a single model - `Tag`. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class Tags(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class Tags(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/unauthorized_error.py b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/unauthorized_error.py index 215249cb..7800a3ba 100644 --- a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/unauthorized_error.py +++ b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/unauthorized_error.py @@ -5,7 +5,7 @@ The ThousandEyes Tags API provides a tagging system with key/value pairs. It allows you to tag assets within the ThousandEyes platform (such as agents, tests, or alert rules) with meaningful metadata. For example: `branch:sfo`, `branch:nyc`, and `team:netops`. This feature provides: * Support for automation. * Powerful and flexible reports/dashboards. * Support for third-party integrations. Things to note with the ThousandEyes Tags API: * Tags are backwards-compatible with existing labels. * Tags are separated by Tests (CEA), Agents (CEA), Endpoint Agents, Scheduled Endpoint Tests, and Reports. A single tag can only apply to one type of target object, so each tag must specify the target type of object via a `type` field. * Tags are defined in a single table so that they can be represented using a single model - `Tag`. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class UnauthorizedError(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class UnauthorizedError(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/validation_error.py b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/validation_error.py index 6484d138..cb9a984e 100644 --- a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/validation_error.py +++ b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/validation_error.py @@ -5,7 +5,7 @@ The ThousandEyes Tags API provides a tagging system with key/value pairs. It allows you to tag assets within the ThousandEyes platform (such as agents, tests, or alert rules) with meaningful metadata. For example: `branch:sfo`, `branch:nyc`, and `team:netops`. This feature provides: * Support for automation. * Powerful and flexible reports/dashboards. * Support for third-party integrations. Things to note with the ThousandEyes Tags API: * Tags are backwards-compatible with existing labels. * Tags are separated by Tests (CEA), Agents (CEA), Endpoint Agents, Scheduled Endpoint Tests, and Reports. A single tag can only apply to one type of target object, so each tag must specify the target type of object via a `type` field. * Tags are defined in a single table so that they can be represented using a single model - `Tag`. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -39,6 +39,7 @@ class ValidationError(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -49,7 +50,7 @@ class ValidationError(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/validation_error_item.py b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/validation_error_item.py index 318b4149..85168e63 100644 --- a/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/validation_error_item.py +++ b/thousandeyes-sdk-tags/src/thousandeyes_sdk/tags/models/validation_error_item.py @@ -5,7 +5,7 @@ The ThousandEyes Tags API provides a tagging system with key/value pairs. It allows you to tag assets within the ThousandEyes platform (such as agents, tests, or alert rules) with meaningful metadata. For example: `branch:sfo`, `branch:nyc`, and `team:netops`. This feature provides: * Support for automation. * Powerful and flexible reports/dashboards. * Support for third-party integrations. Things to note with the ThousandEyes Tags API: * Tags are backwards-compatible with existing labels. * Tags are separated by Tests (CEA), Agents (CEA), Endpoint Agents, Scheduled Endpoint Tests, and Reports. A single tag can only apply to one type of target object, so each tag must specify the target type of object via a `type` field. * Tags are defined in a single table so that they can be represented using a single model - `Tag`. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,7 +17,7 @@ import pprint import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +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 @@ -27,7 +27,7 @@ class ValidationErrorItem(BaseModel): ValidationErrorItem """ # noqa: E501 code: Optional[StrictStr] = Field(default=None, description="(Optional) A unique error type/code that can be referenced in the documentation for further details.") - var_field: Optional[StrictInt] = Field(default=None, description="Identifies the field that triggered this particular error.", alias="field") + var_field: Optional[StrictStr] = Field(default=None, description="Identifies the field that triggered this particular error.", alias="field") message: Optional[StrictStr] = Field(default=None, description="A short, human-readable summary of the error.") __properties: ClassVar[List[str]] = ["code", "field", "message"] @@ -35,6 +35,7 @@ class ValidationErrorItem(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class ValidationErrorItem(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tags/test/test_tag_assignment_api.py b/thousandeyes-sdk-tags/test/test_tag_assignment_api.py new file mode 100644 index 00000000..1ee9567f --- /dev/null +++ b/thousandeyes-sdk-tags/test/test_tag_assignment_api.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + Tags API + + The ThousandEyes Tags API provides a tagging system with key/value pairs. It allows you to tag assets within the ThousandEyes platform (such as agents, tests, or alert rules) with meaningful metadata. For example: `branch:sfo`, `branch:nyc`, and `team:netops`. This feature provides: * Support for automation. * Powerful and flexible reports/dashboards. * Support for third-party integrations. Things to note with the ThousandEyes Tags API: * Tags are backwards-compatible with existing labels. * Tags are separated by Tests (CEA), Agents (CEA), Endpoint Agents, Scheduled Endpoint Tests, and Reports. A single tag can only apply to one type of target object, so each tag must specify the target type of object via a `type` field. * Tags are defined in a single table so that they can be represented using a single model - `Tag`. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.tags.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.tags.api.tag_assignment_api import TagAssignmentApi + + +class TestTagAssignmentApi(unittest.TestCase): + """TagAssignmentApi unit test stubs""" + + def setUp(self) -> None: + self.api = TagAssignmentApi() + + def tearDown(self) -> None: + pass + + def test_assign_tag_models_validation(self) -> None: + """Test case for assign_tag request and response models""" + request_body_json = """ + { + "assignments" : [ { + "id" : "123", + "type" : "test" + }, { + "id" : "123", + "type" : "test" + } ] + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.tags.models.TagAssignment.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + + def test_assign_tags_models_validation(self) -> None: + """Test case for assign_tags request and response models""" + request_body_json = """ + { + "tags" : [ { + "assignments" : [ { + "id" : "123", + "type" : "test" + }, { + "id" : "123", + "type" : "test" + } ], + "tagId" : "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" + }, { + "assignments" : [ { + "id" : "123", + "type" : "test" + }, { + "id" : "123", + "type" : "test" + } ], + "tagId" : "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" + } ] + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.tags.models.BulkTagAssignments.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + + def test_unassign_tag_models_validation(self) -> None: + """Test case for unassign_tag request and response models""" + request_body_json = """ + { + "assignments" : [ { + "id" : "123", + "type" : "test" + }, { + "id" : "123", + "type" : "test" + } ] + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.tags.models.TagAssignment.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + + def test_unassign_tags_models_validation(self) -> None: + """Test case for unassign_tags request and response models""" + request_body_json = """ + { + "tags" : [ { + "assignments" : [ { + "id" : "123", + "type" : "test" + }, { + "id" : "123", + "type" : "test" + } ], + "tagId" : "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" + }, { + "assignments" : [ { + "id" : "123", + "type" : "test" + }, { + "id" : "123", + "type" : "test" + } ], + "tagId" : "c6b78e57-81a2-4c5f-a11a-d96c3c664d55" + } ] + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.tags.models.BulkTagAssignments.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + + +if __name__ == '__main__': + unittest.main() diff --git a/thousandeyes-sdk-tags/test/test_tags_api.py b/thousandeyes-sdk-tags/test/test_tags_api.py new file mode 100644 index 00000000..dba3f69c --- /dev/null +++ b/thousandeyes-sdk-tags/test/test_tags_api.py @@ -0,0 +1,223 @@ +# coding: utf-8 + +""" + Tags API + + The ThousandEyes Tags API provides a tagging system with key/value pairs. It allows you to tag assets within the ThousandEyes platform (such as agents, tests, or alert rules) with meaningful metadata. For example: `branch:sfo`, `branch:nyc`, and `team:netops`. This feature provides: * Support for automation. * Powerful and flexible reports/dashboards. * Support for third-party integrations. Things to note with the ThousandEyes Tags API: * Tags are backwards-compatible with existing labels. * Tags are separated by Tests (CEA), Agents (CEA), Endpoint Agents, Scheduled Endpoint Tests, and Reports. A single tag can only apply to one type of target object, so each tag must specify the target type of object via a `type` field. * Tags are defined in a single table so that they can be represented using a single model - `Tag`. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.tags.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.tags.api.tags_api import TagsApi + + +class TestTagsApi(unittest.TestCase): + """TagsApi unit test stubs""" + + def setUp(self) -> None: + self.api = TagsApi() + + def tearDown(self) -> None: + pass + + def test_create_tag_models_validation(self) -> None: + """Test case for create_tag request and response models""" + request_body_json = """ + { + "accessType" : "all", + "assignments" : [ { + "id" : "123", + "type" : "test" + }, { + "id" : "123", + "type" : "test" + } ], + "color" : "#FF0000", + "icon" : "icon", + "legacyId" : "legacyId", + "id" : "5aeab5d5-0d34-4d44-a7ac-fb440185295c", + "aid" : 1234, + "value" : "sfo", + "key" : "branch", + "createDate" : "2022-03-01T23:31:11Z", + "objectType" : "test" + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.tags.models.TagInfo.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + + def test_create_tags_models_validation(self) -> None: + """Test case for create_tags request and response models""" + request_body_json = """ + { + "errors" : [ { + "tag" : { + "key" : { + "accessType" : "all", + "assignments" : [ { + "id" : "123", + "type" : "test" + }, { + "id" : "123", + "type" : "test" + } ], + "color" : "#FF0000", + "icon" : "icon", + "legacyId" : "legacyId", + "id" : "5aeab5d5-0d34-4d44-a7ac-fb440185295c", + "aid" : 1234, + "value" : "sfo", + "key" : "branch", + "createDate" : "2022-03-01T23:31:11Z", + "objectType" : "test" + } + }, + "message" : "Object successfully created", + "responseCode" : 200 + }, { + "tag" : { + "key" : { + "accessType" : "all", + "assignments" : [ { + "id" : "123", + "type" : "test" + }, { + "id" : "123", + "type" : "test" + } ], + "color" : "#FF0000", + "icon" : "icon", + "legacyId" : "legacyId", + "id" : "5aeab5d5-0d34-4d44-a7ac-fb440185295c", + "aid" : 1234, + "value" : "sfo", + "key" : "branch", + "createDate" : "2022-03-01T23:31:11Z", + "objectType" : "test" + } + }, + "message" : "Object successfully created", + "responseCode" : 200 + } ], + "tags" : [ { + "accessType" : "all", + "assignments" : [ { + "id" : "123", + "type" : "test" + }, { + "id" : "123", + "type" : "test" + } ], + "color" : "#FF0000", + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "icon" : "icon", + "legacyId" : "legacyId", + "id" : "5aeab5d5-0d34-4d44-a7ac-fb440185295c", + "aid" : 1234, + "value" : "sfo", + "key" : "branch", + "createDate" : "2022-03-01T23:31:11Z", + "objectType" : "test" + }, { + "accessType" : "all", + "assignments" : [ { + "id" : "123", + "type" : "test" + }, { + "id" : "123", + "type" : "test" + } ], + "color" : "#FF0000", + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "icon" : "icon", + "legacyId" : "legacyId", + "id" : "5aeab5d5-0d34-4d44-a7ac-fb440185295c", + "aid" : 1234, + "value" : "sfo", + "key" : "branch", + "createDate" : "2022-03-01T23:31:11Z", + "objectType" : "test" + } ] + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.tags.models.BulkTagResponse.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + + def test_delete_tag_models_validation(self) -> None: + """Test case for delete_tag request and response models""" + + + def test_get_tag_models_validation(self) -> None: + """Test case for get_tag request and response models""" + + + def test_get_tags_models_validation(self) -> None: + """Test case for get_tags request and response models""" + + + def test_update_tag_models_validation(self) -> None: + """Test case for update_tag request and response models""" + request_body_json = """ + { + "accessType" : "all", + "assignments" : [ { + "id" : "123", + "type" : "test" + }, { + "id" : "123", + "type" : "test" + } ], + "color" : "#FF0000", + "icon" : "icon", + "legacyId" : "legacyId", + "id" : "5aeab5d5-0d34-4d44-a7ac-fb440185295c", + "aid" : 1234, + "value" : "sfo", + "key" : "branch", + "createDate" : "2022-03-01T23:31:11Z", + "objectType" : "test" + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.tags.models.TagInfo.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + + +if __name__ == '__main__': + unittest.main() diff --git a/thousandeyes-sdk-tags/test/test_utils.py b/thousandeyes-sdk-tags/test/test_utils.py new file mode 100644 index 00000000..930528d9 --- /dev/null +++ b/thousandeyes-sdk-tags/test/test_utils.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +import json +import unittest + +from pydantic import BaseModel + + +def assert_constructed_model_matches_example_json(model: BaseModel, loaded_json: dict): + test_case = unittest.TestCase() + test_case.maxDiff = None + test_case.assertIsNotNone(model) + constructed_json = json.loads(model.to_json()) + sorted_loaded_json = json.dumps(loaded_json, sort_keys=True) + sorted_constructed_json = json.dumps(constructed_json, sort_keys=True) + test_case.assertEqual(sorted_loaded_json, sorted_constructed_json) diff --git a/thousandeyes-sdk-test-results/.openapi-generator/FILES b/thousandeyes-sdk-test-results/.openapi-generator/FILES index d7030d08..ac70bb5a 100644 --- a/thousandeyes-sdk-test-results/.openapi-generator/FILES +++ b/thousandeyes-sdk-test-results/.openapi-generator/FILES @@ -175,75 +175,16 @@ src/thousandeyes_sdk/test_results/models/web_transaction_test_result.py src/thousandeyes_sdk/test_results/models/web_transaction_test_results.py src/thousandeyes_sdk/test_results/py.typed test/__init__.py -test/test_agent.py -test/test_api_detail_test_result.py -test/test_api_detail_test_results.py -test/test_api_request_detail.py -test/test_api_request_detail_assertion.py -test/test_api_test_result.py -test/test_api_test_results.py -test/test_app_links.py -test/test_bgp_basic_test_result.py -test/test_bgp_hop.py -test/test_bgp_test_result.py -test/test_bgp_test_results.py -test/test_bgp_test_route_information_result.py -test/test_bgp_test_route_information_results.py -test/test_dns_server_test_result.py -test/test_dns_server_test_results.py -test/test_dns_trace_test_result.py -test/test_dns_trace_test_results.py -test/test_dnssec_test_result.py -test/test_dnssec_test_results.py -test/test_epoch_time_window.py -test/test_error.py -test/test_expand.py -test/test_ftp_server_test_result.py -test/test_ftp_server_test_results.py -test/test_http_test_result.py -test/test_http_test_result_headers.py -test/test_http_test_results.py -test/test_link.py -test/test_marker.py -test/test_monitor.py -test/test_network_test_result.py -test/test_network_test_results.py -test/test_page.py -test/test_page_load_detail_test_result.py -test/test_page_load_detail_test_results.py -test/test_page_load_test_result.py -test/test_page_load_test_results.py -test/test_pagination_links.py -test/test_path_vis_base_test_result.py -test/test_path_vis_detail_test_result.py -test/test_path_vis_detail_test_results.py -test/test_path_vis_direction.py -test/test_path_vis_endpoint.py -test/test_path_vis_hop.py -test/test_path_vis_route.py -test/test_path_vis_test_result.py -test/test_path_vis_test_results.py -test/test_rtp_stream_test_result.py -test/test_rtp_stream_test_results.py -test/test_self_links.py -test/test_simple_test.py -test/test_sip_server_error_type.py -test/test_sip_server_test_result.py -test/test_sip_server_test_results.py -test/test_ssl_cert.py -test/test_test_direction.py -test/test_test_interval.py -test/test_test_links.py -test/test_test_result.py -test/test_test_result_app_links.py -test/test_test_self_link.py -test/test_test_type.py -test/test_unauthorized_error.py -test/test_validation_error.py -test/test_validation_error_item.py -test/test_web_transaction_detail_test_result.py -test/test_web_transaction_detail_test_results.py -test/test_web_transaction_page_detail_test_result.py -test/test_web_transaction_page_detail_test_results.py -test/test_web_transaction_test_result.py -test/test_web_transaction_test_results.py +test/test_api_test_metrics_api.py +test/test_dns_server_test_metrics_api.py +test/test_dns_trace_test_metrics_api.py +test/test_dnssec_test_metrics_api.py +test/test_network_bgp_test_metrics_api.py +test/test_network_test_metrics_api.py +test/test_utils.py +test/test_voice_rtp_server_test_metrics_api.py +test/test_voice_sip_server_test_metrics_api.py +test/test_web_ftp_server_test_metrics_api.py +test/test_web_http_server_test_metrics_api.py +test/test_web_page_load_test_metrics_api.py +test/test_web_transactions_test_metrics_api.py diff --git a/thousandeyes-sdk-test-results/README.md b/thousandeyes-sdk-test-results/README.md index b52196bf..6df1e4d4 100644 --- a/thousandeyes-sdk-test-results/README.md +++ b/thousandeyes-sdk-test-results/README.md @@ -3,8 +3,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.4 -- Package version: 1.0.0 +- API version: 7.0.6 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator @@ -18,9 +17,9 @@ Python 3.7+ If the python package is hosted on a repository, you can install directly using: ```sh -pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +pip install -e git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git#egg=thousandeyes-sdk-test-results\&subdirectory=thousandeyes-sdk-test-results ``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) +(you may need to run `pip` with root permission: `sudo pip install -e git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git#egg=thousandeyes-sdk-test-results\&subdirectory=thousandeyes-sdk-test-results`) Then import the package: ```python @@ -78,19 +77,17 @@ with thousandeyes_sdk.client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = thousandeyes_sdk.test_results.APITestMetricsApi(api_client) test_id = '202701' # str | Test ID + agent_id = '11' # str | Agent ID + round_id = '1384309800' # str | Round ID 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) - window = '12h' # str | 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`. (optional) - start_date = '2022-07-17T22:00:54Z' # datetime | 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`. (optional) - end_date = '2022-07-18T22:00:54Z' # datetime | Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. (optional) - cursor = 'cursor_example' # str | (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. (optional) try: - # Get API test results - api_response = api_instance.get_test_result_api(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) - print("The response of APITestMetricsApi->get_test_result_api:\n") + # Get API test results by agent and round + api_response = api_instance.get_test_api_agent_round_results(test_id, agent_id, round_id, aid=aid) + print("The response of APITestMetricsApi->get_test_api_agent_round_results:\n") pprint(api_response) except ApiException as e: - print("Exception when calling APITestMetricsApi->get_test_result_api: %s\n" % e) + print("Exception when calling APITestMetricsApi->get_test_api_agent_round_results: %s\n" % e) ``` @@ -100,26 +97,26 @@ All URIs are relative to *https://api.thousandeyes.com* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*APITestMetricsApi* | [**get_test_result_api**](docs/APITestMetricsApi.md#get_test_result_api) | **GET** /v7/test-results/{testId}/api | Get API test results -*APITestMetricsApi* | [**get_test_result_api_component_detail**](docs/APITestMetricsApi.md#get_test_result_api_component_detail) | **GET** /v7/test-results/{testId}/api/agent/{agentId}/round/{roundId} | Get API test results by agent and round -*DNSSECTestMetricsApi* | [**get_test_result_dnssec**](docs/DNSSECTestMetricsApi.md#get_test_result_dnssec) | **GET** /v7/test-results/{testId}/dnssec | Get DNSSEC test results -*DNSServerTestMetricsApi* | [**get_test_result_dns_server**](docs/DNSServerTestMetricsApi.md#get_test_result_dns_server) | **GET** /v7/test-results/{testId}/dns-server/{serverId} | Get DNS server test results by server -*DNSServerTestMetricsApi* | [**get_test_result_dns_servers**](docs/DNSServerTestMetricsApi.md#get_test_result_dns_servers) | **GET** /v7/test-results/{testId}/dns-server | Get DNS server test results -*DNSTraceTestMetricsApi* | [**get_test_result_dns_trace**](docs/DNSTraceTestMetricsApi.md#get_test_result_dns_trace) | **GET** /v7/test-results/{testId}/dns-trace | Get DNS trace test results -*NetworkBGPTestMetricsApi* | [**get_test_results_bgp**](docs/NetworkBGPTestMetricsApi.md#get_test_results_bgp) | **GET** /v7/test-results/{testId}/bgp | Get BGP test results -*NetworkBGPTestMetricsApi* | [**get_test_results_bgp_prefix**](docs/NetworkBGPTestMetricsApi.md#get_test_results_bgp_prefix) | **GET** /v7/test-results/{testId}/bgp/routes/prefix/{prefixId}/round/{roundId} | Get BGP route test results by prefix -*NetworkTestMetricsApi* | [**get_test_pathvis_agent_round**](docs/NetworkTestMetricsApi.md#get_test_pathvis_agent_round) | **GET** /v7/test-results/{testId}/path-vis/agent/{agentId}/round/{roundId} | Get path visualization test results by agent and round -*NetworkTestMetricsApi* | [**get_test_result_metrics**](docs/NetworkTestMetricsApi.md#get_test_result_metrics) | **GET** /v7/test-results/{testId}/network | Get network test results -*NetworkTestMetricsApi* | [**get_test_result_network_path_vis**](docs/NetworkTestMetricsApi.md#get_test_result_network_path_vis) | **GET** /v7/test-results/{testId}/path-vis | Get path visualization network test results -*VoiceRTPServerTestMetricsApi* | [**get_test_result_rtp_stream**](docs/VoiceRTPServerTestMetricsApi.md#get_test_result_rtp_stream) | **GET** /v7/test-results/{testId}/rtp-server | Retrieve RTP server test metrics -*VoiceSIPServerTestMetricsApi* | [**get_test_result_sip_server**](docs/VoiceSIPServerTestMetricsApi.md#get_test_result_sip_server) | **GET** /v7/test-results/{testId}/sip-server | Get SIP server test results -*WebFTPServerTestMetricsApi* | [**get_test_result_ftp_server**](docs/WebFTPServerTestMetricsApi.md#get_test_result_ftp_server) | **GET** /v7/test-results/{testId}/ftp-server | Get FTP server test results -*WebHTTPServerTestMetricsApi* | [**get_test_result_http_server**](docs/WebHTTPServerTestMetricsApi.md#get_test_result_http_server) | **GET** /v7/test-results/{testId}/http-server | Get HTTP server test results -*WebPageLoadTestMetricsApi* | [**get_test_result_page_load**](docs/WebPageLoadTestMetricsApi.md#get_test_result_page_load) | **GET** /v7/test-results/{testId}/page-load | Get page load server test results -*WebPageLoadTestMetricsApi* | [**get_test_result_page_load_component_detail**](docs/WebPageLoadTestMetricsApi.md#get_test_result_page_load_component_detail) | **GET** /v7/test-results/{testId}/page-load/agent/{agentId}/round/{roundId} | Get page load server test results by agent and round -*WebTransactionsTestMetricsApi* | [**get_test_result_web_transactions**](docs/WebTransactionsTestMetricsApi.md#get_test_result_web_transactions) | **GET** /v7/test-results/{testId}/web-transactions | Get web transactions test results -*WebTransactionsTestMetricsApi* | [**get_test_result_web_transactions_component_detail**](docs/WebTransactionsTestMetricsApi.md#get_test_result_web_transactions_component_detail) | **GET** /v7/test-results/{testId}/web-transactions/agent/{agentId}/round/{roundId} | Get web transactions test results by agent and round -*WebTransactionsTestMetricsApi* | [**get_test_result_web_transactions_component_page_detail**](docs/WebTransactionsTestMetricsApi.md#get_test_result_web_transactions_component_page_detail) | **GET** /v7/test-results/{testId}/web-transactions/agent/{agentId}/round/{roundId}/page/{pageId} | Get detailed web transactions test result by agent, round, and page +*APITestMetricsApi* | [**get_test_api_agent_round_results**](docs/APITestMetricsApi.md#get_test_api_agent_round_results) | **GET** /v7/test-results/{testId}/api/agent/{agentId}/round/{roundId} | Get API test results by agent and round +*APITestMetricsApi* | [**get_test_api_results**](docs/APITestMetricsApi.md#get_test_api_results) | **GET** /v7/test-results/{testId}/api | Get API test results +*DNSSECTestMetricsApi* | [**get_test_dns_sec_results**](docs/DNSSECTestMetricsApi.md#get_test_dns_sec_results) | **GET** /v7/test-results/{testId}/dnssec | Get DNSSEC test results +*DNSServerTestMetricsApi* | [**get_test_dns_server_result**](docs/DNSServerTestMetricsApi.md#get_test_dns_server_result) | **GET** /v7/test-results/{testId}/dns-server/{serverId} | Get DNS server test results by server +*DNSServerTestMetricsApi* | [**get_test_dns_servers_results**](docs/DNSServerTestMetricsApi.md#get_test_dns_servers_results) | **GET** /v7/test-results/{testId}/dns-server | Get DNS server test results +*DNSTraceTestMetricsApi* | [**get_test_dns_trace_results**](docs/DNSTraceTestMetricsApi.md#get_test_dns_trace_results) | **GET** /v7/test-results/{testId}/dns-trace | Get DNS trace test results +*NetworkBGPTestMetricsApi* | [**get_test_bgp_results**](docs/NetworkBGPTestMetricsApi.md#get_test_bgp_results) | **GET** /v7/test-results/{testId}/bgp | Get BGP test results +*NetworkBGPTestMetricsApi* | [**get_test_bgp_routes_prefix_round_results**](docs/NetworkBGPTestMetricsApi.md#get_test_bgp_routes_prefix_round_results) | **GET** /v7/test-results/{testId}/bgp/routes/prefix/{prefixId}/round/{roundId} | Get BGP route test results by prefix +*NetworkTestMetricsApi* | [**get_test_network_results**](docs/NetworkTestMetricsApi.md#get_test_network_results) | **GET** /v7/test-results/{testId}/network | Get network test results +*NetworkTestMetricsApi* | [**get_test_path_vis_agent_round_results**](docs/NetworkTestMetricsApi.md#get_test_path_vis_agent_round_results) | **GET** /v7/test-results/{testId}/path-vis/agent/{agentId}/round/{roundId} | Get path visualization test results by agent and round +*NetworkTestMetricsApi* | [**get_test_path_vis_results**](docs/NetworkTestMetricsApi.md#get_test_path_vis_results) | **GET** /v7/test-results/{testId}/path-vis | Get path visualization network test results +*VoiceRTPServerTestMetricsApi* | [**get_test_rtp_server_results**](docs/VoiceRTPServerTestMetricsApi.md#get_test_rtp_server_results) | **GET** /v7/test-results/{testId}/rtp-server | Retrieve RTP server test metrics +*VoiceSIPServerTestMetricsApi* | [**get_test_sip_server_results**](docs/VoiceSIPServerTestMetricsApi.md#get_test_sip_server_results) | **GET** /v7/test-results/{testId}/sip-server | Get SIP server test results +*WebFTPServerTestMetricsApi* | [**get_test_ftp_server_results**](docs/WebFTPServerTestMetricsApi.md#get_test_ftp_server_results) | **GET** /v7/test-results/{testId}/ftp-server | Get FTP server test results +*WebHTTPServerTestMetricsApi* | [**get_test_http_server_results**](docs/WebHTTPServerTestMetricsApi.md#get_test_http_server_results) | **GET** /v7/test-results/{testId}/http-server | Get HTTP server test results +*WebPageLoadTestMetricsApi* | [**get_test_page_load_agent_round_results**](docs/WebPageLoadTestMetricsApi.md#get_test_page_load_agent_round_results) | **GET** /v7/test-results/{testId}/page-load/agent/{agentId}/round/{roundId} | Get page load server test results by agent and round +*WebPageLoadTestMetricsApi* | [**get_test_page_load_results**](docs/WebPageLoadTestMetricsApi.md#get_test_page_load_results) | **GET** /v7/test-results/{testId}/page-load | Get page load server test results +*WebTransactionsTestMetricsApi* | [**get_test_web_transaction_agent_round_page_results**](docs/WebTransactionsTestMetricsApi.md#get_test_web_transaction_agent_round_page_results) | **GET** /v7/test-results/{testId}/web-transactions/agent/{agentId}/round/{roundId}/page/{pageId} | Get detailed web transactions test result by agent, round, and page +*WebTransactionsTestMetricsApi* | [**get_test_web_transaction_agent_round_results**](docs/WebTransactionsTestMetricsApi.md#get_test_web_transaction_agent_round_results) | **GET** /v7/test-results/{testId}/web-transactions/agent/{agentId}/round/{roundId} | Get web transactions test results by agent and round +*WebTransactionsTestMetricsApi* | [**get_test_web_transaction_results**](docs/WebTransactionsTestMetricsApi.md#get_test_web_transaction_results) | **GET** /v7/test-results/{testId}/web-transactions | Get web transactions test results ## Documentation For Models diff --git a/thousandeyes-sdk-test-results/docs/APITestMetricsApi.md b/thousandeyes-sdk-test-results/docs/APITestMetricsApi.md index e633771b..ee5d0aa0 100644 --- a/thousandeyes-sdk-test-results/docs/APITestMetricsApi.md +++ b/thousandeyes-sdk-test-results/docs/APITestMetricsApi.md @@ -4,12 +4,104 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**get_test_result_api**](APITestMetricsApi.md#get_test_result_api) | **GET** /v7/test-results/{testId}/api | Get API test results -[**get_test_result_api_component_detail**](APITestMetricsApi.md#get_test_result_api_component_detail) | **GET** /v7/test-results/{testId}/api/agent/{agentId}/round/{roundId} | Get API test results by agent and round +[**get_test_api_agent_round_results**](APITestMetricsApi.md#get_test_api_agent_round_results) | **GET** /v7/test-results/{testId}/api/agent/{agentId}/round/{roundId} | Get API test results by agent and round +[**get_test_api_results**](APITestMetricsApi.md#get_test_api_results) | **GET** /v7/test-results/{testId}/api | Get API test results -# **get_test_result_api** -> ApiTestResults get_test_result_api(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) +# **get_test_api_agent_round_results** +> ApiDetailTestResults get_test_api_agent_round_results(test_id, agent_id, round_id, aid=aid) + +Get API test results by agent and round + +Returns test results for API for a given agent and round. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.test_results +from thousandeyes_sdk.test_results.models.api_detail_test_results import ApiDetailTestResults +from thousandeyes_sdk.test_results.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.test_results.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.test_results.APITestMetricsApi(api_client) + test_id = '202701' # str | Test ID + agent_id = '11' # str | Agent ID + round_id = '1384309800' # str | Round ID + 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: + # Get API test results by agent and round + api_response = api_instance.get_test_api_agent_round_results(test_id, agent_id, round_id, aid=aid) + print("The response of APITestMetricsApi->get_test_api_agent_round_results:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling APITestMetricsApi->get_test_api_agent_round_results: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **test_id** | **str**| Test ID | + **agent_id** | **str**| Agent ID | + **round_id** | **str**| Round ID | + **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 + +[**ApiDetailTestResults**](ApiDetailTestResults.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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 | - | +**429** | Exhausted rate limit for the organization | - | +**500** | Internal server error | - | +**502** | Bad Gateway | - | +**0** | An error occurred | - | + +[[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_test_api_results** +> ApiTestResults get_test_api_results(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) Get API test results @@ -54,11 +146,11 @@ with thousandeyes_sdk.test_results.ApiClient(configuration) as api_client: try: # Get API test results - api_response = api_instance.get_test_result_api(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) - print("The response of APITestMetricsApi->get_test_result_api:\n") + api_response = api_instance.get_test_api_results(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) + print("The response of APITestMetricsApi->get_test_api_results:\n") pprint(api_response) except Exception as e: - print("Exception when calling APITestMetricsApi->get_test_result_api: %s\n" % e) + print("Exception when calling APITestMetricsApi->get_test_api_results: %s\n" % e) ``` @@ -86,99 +178,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+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 | - | -**429** | Exhausted rate limit for the organization | - | -**500** | Internal server error | - | -**502** | Bad Gateway | - | -**0** | An error occurred | - | - -[[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_test_result_api_component_detail** -> ApiDetailTestResults get_test_result_api_component_detail(test_id, agent_id, round_id, aid=aid) - -Get API test results by agent and round - -Returns test results for API for a given agent and round. - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import thousandeyes_sdk.test_results -from thousandeyes_sdk.test_results.models.api_detail_test_results import ApiDetailTestResults -from thousandeyes_sdk.test_results.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.thousandeyes.com -# See configuration.py for a list of all supported configuration parameters. -configuration = thousandeyes_sdk.client.Configuration( - host = "https://api.thousandeyes.com" -) - -# 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.client.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with thousandeyes_sdk.test_results.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = thousandeyes_sdk.test_results.APITestMetricsApi(api_client) - test_id = '202701' # str | Test ID - agent_id = '11' # str | Agent ID - round_id = '1384309800' # str | Round ID - 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: - # Get API test results by agent and round - api_response = api_instance.get_test_result_api_component_detail(test_id, agent_id, round_id, aid=aid) - print("The response of APITestMetricsApi->get_test_result_api_component_detail:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling APITestMetricsApi->get_test_result_api_component_detail: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **test_id** | **str**| Test ID | - **agent_id** | **str**| Agent ID | - **round_id** | **str**| Round ID | - **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 - -[**ApiDetailTestResults**](ApiDetailTestResults.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-test-results/docs/ApiDetailTestResult.md b/thousandeyes-sdk-test-results/docs/ApiDetailTestResult.md index 3f1044f2..35cba406 100644 --- a/thousandeyes-sdk-test-results/docs/ApiDetailTestResult.md +++ b/thousandeyes-sdk-test-results/docs/ApiDetailTestResult.md @@ -8,6 +8,8 @@ Name | Type | Description | Notes **var_date** | **datetime** | Data point date UTC (ISO date-time format). | [optional] [readonly] **round_id** | **int** | Epoch time (seconds) indicating the start time of the round | [optional] [readonly] **links** | [**TestResultAppLinks**](TestResultAppLinks.md) | | [optional] +**start_time** | **int** | Epoch time (seconds) indicating the start time of the round | [optional] [readonly] +**end_time** | **int** | Epoch time (seconds) indicating the end time of the round | [optional] [readonly] **agent** | [**Agent**](Agent.md) | | [optional] **api_transaction_time** | **float** | Elapsed execution time of the API steps. | [optional] [readonly] **completion** | **float** | Percentage of steps which completed successfully and passed assertions. | [optional] [readonly] diff --git a/thousandeyes-sdk-test-results/docs/ApiTestResult.md b/thousandeyes-sdk-test-results/docs/ApiTestResult.md index 61b8c06e..fa3fd22b 100644 --- a/thousandeyes-sdk-test-results/docs/ApiTestResult.md +++ b/thousandeyes-sdk-test-results/docs/ApiTestResult.md @@ -8,6 +8,8 @@ Name | Type | Description | Notes **var_date** | **datetime** | Data point date UTC (ISO date-time format). | [optional] [readonly] **round_id** | **int** | Epoch time (seconds) indicating the start time of the round | [optional] [readonly] **links** | [**TestResultAppLinks**](TestResultAppLinks.md) | | [optional] +**start_time** | **int** | Epoch time (seconds) indicating the start time of the round | [optional] [readonly] +**end_time** | **int** | Epoch time (seconds) indicating the end time of the round | [optional] [readonly] **agent** | [**Agent**](Agent.md) | | [optional] **api_transaction_time** | **float** | Elapsed execution time of the API steps. | [optional] [readonly] **completion** | **float** | Percentage of steps which completed successfully and passed assertions. | [optional] [readonly] diff --git a/thousandeyes-sdk-test-results/docs/BgpHop.md b/thousandeyes-sdk-test-results/docs/BgpHop.md index f7b71690..c89b4ae0 100644 --- a/thousandeyes-sdk-test-results/docs/BgpHop.md +++ b/thousandeyes-sdk-test-results/docs/BgpHop.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**asn** | **float** | ASN of transit autonomous system | [optional] [readonly] +**asn** | **int** | ASN of transit autonomous system | [optional] [readonly] **as_name** | **str** | Name of autonomous system. | [optional] [readonly] ## Example diff --git a/thousandeyes-sdk-test-results/docs/DNSSECTestMetricsApi.md b/thousandeyes-sdk-test-results/docs/DNSSECTestMetricsApi.md index f85de676..4c8af5fb 100644 --- a/thousandeyes-sdk-test-results/docs/DNSSECTestMetricsApi.md +++ b/thousandeyes-sdk-test-results/docs/DNSSECTestMetricsApi.md @@ -4,11 +4,11 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**get_test_result_dnssec**](DNSSECTestMetricsApi.md#get_test_result_dnssec) | **GET** /v7/test-results/{testId}/dnssec | Get DNSSEC test results +[**get_test_dns_sec_results**](DNSSECTestMetricsApi.md#get_test_dns_sec_results) | **GET** /v7/test-results/{testId}/dnssec | Get DNSSEC test results -# **get_test_result_dnssec** -> DnssecTestResults get_test_result_dnssec(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) +# **get_test_dns_sec_results** +> DnssecTestResults get_test_dns_sec_results(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) Get DNSSEC test results @@ -53,11 +53,11 @@ with thousandeyes_sdk.test_results.ApiClient(configuration) as api_client: try: # Get DNSSEC test results - api_response = api_instance.get_test_result_dnssec(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) - print("The response of DNSSECTestMetricsApi->get_test_result_dnssec:\n") + api_response = api_instance.get_test_dns_sec_results(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) + print("The response of DNSSECTestMetricsApi->get_test_dns_sec_results:\n") pprint(api_response) except Exception as e: - print("Exception when calling DNSSECTestMetricsApi->get_test_result_dnssec: %s\n" % e) + print("Exception when calling DNSSECTestMetricsApi->get_test_dns_sec_results: %s\n" % e) ``` @@ -85,7 +85,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-test-results/docs/DNSServerTestMetricsApi.md b/thousandeyes-sdk-test-results/docs/DNSServerTestMetricsApi.md index d55c8929..f0aec4d8 100644 --- a/thousandeyes-sdk-test-results/docs/DNSServerTestMetricsApi.md +++ b/thousandeyes-sdk-test-results/docs/DNSServerTestMetricsApi.md @@ -4,12 +4,12 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**get_test_result_dns_server**](DNSServerTestMetricsApi.md#get_test_result_dns_server) | **GET** /v7/test-results/{testId}/dns-server/{serverId} | Get DNS server test results by server -[**get_test_result_dns_servers**](DNSServerTestMetricsApi.md#get_test_result_dns_servers) | **GET** /v7/test-results/{testId}/dns-server | Get DNS server test results +[**get_test_dns_server_result**](DNSServerTestMetricsApi.md#get_test_dns_server_result) | **GET** /v7/test-results/{testId}/dns-server/{serverId} | Get DNS server test results by server +[**get_test_dns_servers_results**](DNSServerTestMetricsApi.md#get_test_dns_servers_results) | **GET** /v7/test-results/{testId}/dns-server | Get DNS server test results -# **get_test_result_dns_server** -> DnsServerTestResults get_test_result_dns_server(test_id, server_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) +# **get_test_dns_server_result** +> DnsServerTestResults get_test_dns_server_result(test_id, server_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) Get DNS server test results by server @@ -55,11 +55,11 @@ with thousandeyes_sdk.test_results.ApiClient(configuration) as api_client: try: # Get DNS server test results by server - api_response = api_instance.get_test_result_dns_server(test_id, server_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) - print("The response of DNSServerTestMetricsApi->get_test_result_dns_server:\n") + api_response = api_instance.get_test_dns_server_result(test_id, server_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) + print("The response of DNSServerTestMetricsApi->get_test_dns_server_result:\n") pprint(api_response) except Exception as e: - print("Exception when calling DNSServerTestMetricsApi->get_test_result_dns_server: %s\n" % e) + print("Exception when calling DNSServerTestMetricsApi->get_test_dns_server_result: %s\n" % e) ``` @@ -88,7 +88,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -106,8 +106,8 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_test_result_dns_servers** -> DnsServerTestResults get_test_result_dns_servers(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) +# **get_test_dns_servers_results** +> DnsServerTestResults get_test_dns_servers_results(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) Get DNS server test results @@ -152,11 +152,11 @@ with thousandeyes_sdk.test_results.ApiClient(configuration) as api_client: try: # Get DNS server test results - api_response = api_instance.get_test_result_dns_servers(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) - print("The response of DNSServerTestMetricsApi->get_test_result_dns_servers:\n") + api_response = api_instance.get_test_dns_servers_results(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) + print("The response of DNSServerTestMetricsApi->get_test_dns_servers_results:\n") pprint(api_response) except Exception as e: - print("Exception when calling DNSServerTestMetricsApi->get_test_result_dns_servers: %s\n" % e) + print("Exception when calling DNSServerTestMetricsApi->get_test_dns_servers_results: %s\n" % e) ``` @@ -184,7 +184,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-test-results/docs/DNSTraceTestMetricsApi.md b/thousandeyes-sdk-test-results/docs/DNSTraceTestMetricsApi.md index 71245764..6ccfbfc9 100644 --- a/thousandeyes-sdk-test-results/docs/DNSTraceTestMetricsApi.md +++ b/thousandeyes-sdk-test-results/docs/DNSTraceTestMetricsApi.md @@ -4,11 +4,11 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**get_test_result_dns_trace**](DNSTraceTestMetricsApi.md#get_test_result_dns_trace) | **GET** /v7/test-results/{testId}/dns-trace | Get DNS trace test results +[**get_test_dns_trace_results**](DNSTraceTestMetricsApi.md#get_test_dns_trace_results) | **GET** /v7/test-results/{testId}/dns-trace | Get DNS trace test results -# **get_test_result_dns_trace** -> DnsTraceTestResults get_test_result_dns_trace(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) +# **get_test_dns_trace_results** +> DnsTraceTestResults get_test_dns_trace_results(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) Get DNS trace test results @@ -53,11 +53,11 @@ with thousandeyes_sdk.test_results.ApiClient(configuration) as api_client: try: # Get DNS trace test results - api_response = api_instance.get_test_result_dns_trace(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) - print("The response of DNSTraceTestMetricsApi->get_test_result_dns_trace:\n") + api_response = api_instance.get_test_dns_trace_results(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) + print("The response of DNSTraceTestMetricsApi->get_test_dns_trace_results:\n") pprint(api_response) except Exception as e: - print("Exception when calling DNSTraceTestMetricsApi->get_test_result_dns_trace: %s\n" % e) + print("Exception when calling DNSTraceTestMetricsApi->get_test_dns_trace_results: %s\n" % e) ``` @@ -85,7 +85,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-test-results/docs/FtpServerTestResult.md b/thousandeyes-sdk-test-results/docs/FtpServerTestResult.md index 007e0dc1..f61198b2 100644 --- a/thousandeyes-sdk-test-results/docs/FtpServerTestResult.md +++ b/thousandeyes-sdk-test-results/docs/FtpServerTestResult.md @@ -19,11 +19,11 @@ Name | Type | Description | Notes **wait_time** | **float** | Time elapsed between completion of request and first byte of response in milliseconds | [optional] [readonly] **response_time** | **float** | Sum of DNS, connect, negotiation and wait times in milliseconds | [optional] [readonly] **transfer_time** | **float** | Elapsed time between first and last byte of the transfer in milliseconds | [optional] [readonly] -**wire_size** | **float** | Size of content in bytes | [optional] [readonly] +**wire_size** | **int** | Size of content in bytes | [optional] [readonly] **total_time** | **float** | Sum of response + transfer time in milliseconds | [optional] [readonly] **error_type** | **str** | Type of error encountered; corresponds to phase of connection | [optional] [readonly] **error_details** | **str** | Error details, if an error were encountered | [optional] [readonly] -**throughput** | **float** | WireSize divided by receiveTime in byter per second | [optional] [readonly] +**throughput** | **int** | WireSize divided by receiveTime in byter per second | [optional] [readonly] ## Example diff --git a/thousandeyes-sdk-test-results/docs/NetworkBGPTestMetricsApi.md b/thousandeyes-sdk-test-results/docs/NetworkBGPTestMetricsApi.md index 126d4577..b6725a9a 100644 --- a/thousandeyes-sdk-test-results/docs/NetworkBGPTestMetricsApi.md +++ b/thousandeyes-sdk-test-results/docs/NetworkBGPTestMetricsApi.md @@ -4,12 +4,12 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**get_test_results_bgp**](NetworkBGPTestMetricsApi.md#get_test_results_bgp) | **GET** /v7/test-results/{testId}/bgp | Get BGP test results -[**get_test_results_bgp_prefix**](NetworkBGPTestMetricsApi.md#get_test_results_bgp_prefix) | **GET** /v7/test-results/{testId}/bgp/routes/prefix/{prefixId}/round/{roundId} | Get BGP route test results by prefix +[**get_test_bgp_results**](NetworkBGPTestMetricsApi.md#get_test_bgp_results) | **GET** /v7/test-results/{testId}/bgp | Get BGP test results +[**get_test_bgp_routes_prefix_round_results**](NetworkBGPTestMetricsApi.md#get_test_bgp_routes_prefix_round_results) | **GET** /v7/test-results/{testId}/bgp/routes/prefix/{prefixId}/round/{roundId} | Get BGP route test results by prefix -# **get_test_results_bgp** -> BgpTestResults get_test_results_bgp(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) +# **get_test_bgp_results** +> BgpTestResults get_test_bgp_results(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) Get BGP test results @@ -54,11 +54,11 @@ with thousandeyes_sdk.test_results.ApiClient(configuration) as api_client: try: # Get BGP test results - api_response = api_instance.get_test_results_bgp(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) - print("The response of NetworkBGPTestMetricsApi->get_test_results_bgp:\n") + api_response = api_instance.get_test_bgp_results(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) + print("The response of NetworkBGPTestMetricsApi->get_test_bgp_results:\n") pprint(api_response) except Exception as e: - print("Exception when calling NetworkBGPTestMetricsApi->get_test_results_bgp: %s\n" % e) + print("Exception when calling NetworkBGPTestMetricsApi->get_test_bgp_results: %s\n" % e) ``` @@ -86,7 +86,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -104,8 +104,8 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_test_results_bgp_prefix** -> BgpTestRouteInformationResults get_test_results_bgp_prefix(test_id, prefix_id, round_id, aid=aid) +# **get_test_bgp_routes_prefix_round_results** +> BgpTestRouteInformationResults get_test_bgp_routes_prefix_round_results(test_id, prefix_id, round_id, aid=aid) Get BGP route test results by prefix @@ -148,11 +148,11 @@ with thousandeyes_sdk.test_results.ApiClient(configuration) as api_client: try: # Get BGP route test results by prefix - api_response = api_instance.get_test_results_bgp_prefix(test_id, prefix_id, round_id, aid=aid) - print("The response of NetworkBGPTestMetricsApi->get_test_results_bgp_prefix:\n") + api_response = api_instance.get_test_bgp_routes_prefix_round_results(test_id, prefix_id, round_id, aid=aid) + print("The response of NetworkBGPTestMetricsApi->get_test_bgp_routes_prefix_round_results:\n") pprint(api_response) except Exception as e: - print("Exception when calling NetworkBGPTestMetricsApi->get_test_results_bgp_prefix: %s\n" % e) + print("Exception when calling NetworkBGPTestMetricsApi->get_test_bgp_routes_prefix_round_results: %s\n" % e) ``` @@ -178,7 +178,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-test-results/docs/NetworkTestMetricsApi.md b/thousandeyes-sdk-test-results/docs/NetworkTestMetricsApi.md index a588f060..02af386c 100644 --- a/thousandeyes-sdk-test-results/docs/NetworkTestMetricsApi.md +++ b/thousandeyes-sdk-test-results/docs/NetworkTestMetricsApi.md @@ -4,108 +4,13 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**get_test_pathvis_agent_round**](NetworkTestMetricsApi.md#get_test_pathvis_agent_round) | **GET** /v7/test-results/{testId}/path-vis/agent/{agentId}/round/{roundId} | Get path visualization test results by agent and round -[**get_test_result_metrics**](NetworkTestMetricsApi.md#get_test_result_metrics) | **GET** /v7/test-results/{testId}/network | Get network test results -[**get_test_result_network_path_vis**](NetworkTestMetricsApi.md#get_test_result_network_path_vis) | **GET** /v7/test-results/{testId}/path-vis | Get path visualization network test results +[**get_test_network_results**](NetworkTestMetricsApi.md#get_test_network_results) | **GET** /v7/test-results/{testId}/network | Get network test results +[**get_test_path_vis_agent_round_results**](NetworkTestMetricsApi.md#get_test_path_vis_agent_round_results) | **GET** /v7/test-results/{testId}/path-vis/agent/{agentId}/round/{roundId} | Get path visualization test results by agent and round +[**get_test_path_vis_results**](NetworkTestMetricsApi.md#get_test_path_vis_results) | **GET** /v7/test-results/{testId}/path-vis | Get path visualization network test results -# **get_test_pathvis_agent_round** -> PathVisDetailTestResults get_test_pathvis_agent_round(test_id, agent_id, round_id, aid=aid, direction=direction) - -Get path visualization test results by agent and round - -Returns a summary of the path trace data collected during path visualization for a given agent and round. With each attempt, three tries are made to reach the destination. The entire path is displayed in order. Bidirectional agent-to-agent tests also support the `direction` parameter. For example, if agents A, B, and C are testing agent D bidirectionally, and you want results from the route from agent A to agent D, you can use the query `direction=to-target`. For results from agent D to agent A, you can use `direction=from-target`. To get both results for both routes, query without the direction parameter. The source will always be agent A and the destination will be agent D, but the direction field will indicate which trace direction you want test results from. - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import thousandeyes_sdk.test_results -from thousandeyes_sdk.test_results.models.path_vis_detail_test_results import PathVisDetailTestResults -from thousandeyes_sdk.test_results.models.path_vis_direction import PathVisDirection -from thousandeyes_sdk.test_results.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.thousandeyes.com -# See configuration.py for a list of all supported configuration parameters. -configuration = thousandeyes_sdk.client.Configuration( - host = "https://api.thousandeyes.com" -) - -# 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.client.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with thousandeyes_sdk.test_results.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = thousandeyes_sdk.test_results.NetworkTestMetricsApi(api_client) - test_id = '202701' # str | Test ID - agent_id = '11' # str | Agent ID - round_id = '1384309800' # str | Round ID - 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) - direction = thousandeyes_sdk.test_results.PathVisDirection() # PathVisDirection | Choose the direction for the metrics you want: [`from-target`, `to-target`]. This applies when you're doing bidirectional Agent-to-Agent tests. Omitting the parameter will default the results to both `from-target` and `to-target` values (bidirectional); otherwise, you'll get data for one direction. If you try to get unidirectional test data with an incorrect direction parameter, it will trigger an error response. (optional) - - try: - # Get path visualization test results by agent and round - api_response = api_instance.get_test_pathvis_agent_round(test_id, agent_id, round_id, aid=aid, direction=direction) - print("The response of NetworkTestMetricsApi->get_test_pathvis_agent_round:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling NetworkTestMetricsApi->get_test_pathvis_agent_round: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **test_id** | **str**| Test ID | - **agent_id** | **str**| Agent ID | - **round_id** | **str**| Round ID | - **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] - **direction** | [**PathVisDirection**](.md)| Choose the direction for the metrics you want: [`from-target`, `to-target`]. This applies when you're doing bidirectional Agent-to-Agent tests. Omitting the parameter will default the results to both `from-target` and `to-target` values (bidirectional); otherwise, you'll get data for one direction. If you try to get unidirectional test data with an incorrect direction parameter, it will trigger an error response. | [optional] - -### Return type - -[**PathVisDetailTestResults**](PathVisDetailTestResults.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/hal+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 | - | -**429** | Exhausted rate limit for the organization | - | -**500** | Internal server error | - | -**502** | Bad Gateway | - | -**0** | An error occurred | - | - -[[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_test_result_metrics** -> NetworkTestResults get_test_result_metrics(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor, direction=direction) +# **get_test_network_results** +> NetworkTestResults get_test_network_results(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor, direction=direction) Get network test results @@ -152,11 +57,11 @@ with thousandeyes_sdk.test_results.ApiClient(configuration) as api_client: try: # Get network test results - api_response = api_instance.get_test_result_metrics(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor, direction=direction) - print("The response of NetworkTestMetricsApi->get_test_result_metrics:\n") + api_response = api_instance.get_test_network_results(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor, direction=direction) + print("The response of NetworkTestMetricsApi->get_test_network_results:\n") pprint(api_response) except Exception as e: - print("Exception when calling NetworkTestMetricsApi->get_test_result_metrics: %s\n" % e) + print("Exception when calling NetworkTestMetricsApi->get_test_network_results: %s\n" % e) ``` @@ -185,7 +90,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -203,8 +108,103 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_test_result_network_path_vis** -> PathVisTestResults get_test_result_network_path_vis(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor, direction=direction) +# **get_test_path_vis_agent_round_results** +> PathVisDetailTestResults get_test_path_vis_agent_round_results(test_id, agent_id, round_id, aid=aid, direction=direction) + +Get path visualization test results by agent and round + +Returns a summary of the path trace data collected during path visualization for a given agent and round. With each attempt, three tries are made to reach the destination. The entire path is displayed in order. Bidirectional agent-to-agent tests also support the `direction` parameter. For example, if agents A, B, and C are testing agent D bidirectionally, and you want results from the route from agent A to agent D, you can use the query `direction=to-target`. For results from agent D to agent A, you can use `direction=from-target`. To get both results for both routes, query without the direction parameter. The source will always be agent A and the destination will be agent D, but the direction field will indicate which trace direction you want test results from. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.test_results +from thousandeyes_sdk.test_results.models.path_vis_detail_test_results import PathVisDetailTestResults +from thousandeyes_sdk.test_results.models.path_vis_direction import PathVisDirection +from thousandeyes_sdk.test_results.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.test_results.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.test_results.NetworkTestMetricsApi(api_client) + test_id = '202701' # str | Test ID + agent_id = '11' # str | Agent ID + round_id = '1384309800' # str | Round ID + 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) + direction = thousandeyes_sdk.test_results.PathVisDirection() # PathVisDirection | Choose the direction for the metrics you want: [`from-target`, `to-target`]. This applies when you're doing bidirectional Agent-to-Agent tests. Omitting the parameter will default the results to both `from-target` and `to-target` values (bidirectional); otherwise, you'll get data for one direction. If you try to get unidirectional test data with an incorrect direction parameter, it will trigger an error response. (optional) + + try: + # Get path visualization test results by agent and round + api_response = api_instance.get_test_path_vis_agent_round_results(test_id, agent_id, round_id, aid=aid, direction=direction) + print("The response of NetworkTestMetricsApi->get_test_path_vis_agent_round_results:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling NetworkTestMetricsApi->get_test_path_vis_agent_round_results: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **test_id** | **str**| Test ID | + **agent_id** | **str**| Agent ID | + **round_id** | **str**| Round ID | + **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] + **direction** | [**PathVisDirection**](.md)| Choose the direction for the metrics you want: [`from-target`, `to-target`]. This applies when you're doing bidirectional Agent-to-Agent tests. Omitting the parameter will default the results to both `from-target` and `to-target` values (bidirectional); otherwise, you'll get data for one direction. If you try to get unidirectional test data with an incorrect direction parameter, it will trigger an error response. | [optional] + +### Return type + +[**PathVisDetailTestResults**](PathVisDetailTestResults.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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 | - | +**429** | Exhausted rate limit for the organization | - | +**500** | Internal server error | - | +**502** | Bad Gateway | - | +**0** | An error occurred | - | + +[[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_test_path_vis_results** +> PathVisTestResults get_test_path_vis_results(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor, direction=direction) Get path visualization network test results @@ -251,11 +251,11 @@ with thousandeyes_sdk.test_results.ApiClient(configuration) as api_client: try: # Get path visualization network test results - api_response = api_instance.get_test_result_network_path_vis(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor, direction=direction) - print("The response of NetworkTestMetricsApi->get_test_result_network_path_vis:\n") + api_response = api_instance.get_test_path_vis_results(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor, direction=direction) + print("The response of NetworkTestMetricsApi->get_test_path_vis_results:\n") pprint(api_response) except Exception as e: - print("Exception when calling NetworkTestMetricsApi->get_test_result_network_path_vis: %s\n" % e) + print("Exception when calling NetworkTestMetricsApi->get_test_path_vis_results: %s\n" % e) ``` @@ -284,7 +284,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-test-results/docs/ValidationErrorItem.md b/thousandeyes-sdk-test-results/docs/ValidationErrorItem.md index 246f3a26..c1fe2825 100644 --- a/thousandeyes-sdk-test-results/docs/ValidationErrorItem.md +++ b/thousandeyes-sdk-test-results/docs/ValidationErrorItem.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **code** | **str** | (Optional) A unique error type/code that can be referenced in the documentation for further details. | [optional] -**var_field** | **int** | Identifies the field that triggered this particular error. | [optional] +**var_field** | **str** | Identifies the field that triggered this particular error. | [optional] **message** | **str** | A short, human-readable summary of the error. | [optional] ## Example diff --git a/thousandeyes-sdk-test-results/docs/VoiceRTPServerTestMetricsApi.md b/thousandeyes-sdk-test-results/docs/VoiceRTPServerTestMetricsApi.md index 9ec689d7..6408f1a1 100644 --- a/thousandeyes-sdk-test-results/docs/VoiceRTPServerTestMetricsApi.md +++ b/thousandeyes-sdk-test-results/docs/VoiceRTPServerTestMetricsApi.md @@ -4,11 +4,11 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**get_test_result_rtp_stream**](VoiceRTPServerTestMetricsApi.md#get_test_result_rtp_stream) | **GET** /v7/test-results/{testId}/rtp-server | Retrieve RTP server test metrics +[**get_test_rtp_server_results**](VoiceRTPServerTestMetricsApi.md#get_test_rtp_server_results) | **GET** /v7/test-results/{testId}/rtp-server | Retrieve RTP server test metrics -# **get_test_result_rtp_stream** -> RtpStreamTestResults get_test_result_rtp_stream(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) +# **get_test_rtp_server_results** +> RtpStreamTestResults get_test_rtp_server_results(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) Retrieve RTP server test metrics @@ -53,11 +53,11 @@ with thousandeyes_sdk.test_results.ApiClient(configuration) as api_client: try: # Retrieve RTP server test metrics - api_response = api_instance.get_test_result_rtp_stream(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) - print("The response of VoiceRTPServerTestMetricsApi->get_test_result_rtp_stream:\n") + api_response = api_instance.get_test_rtp_server_results(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) + print("The response of VoiceRTPServerTestMetricsApi->get_test_rtp_server_results:\n") pprint(api_response) except Exception as e: - print("Exception when calling VoiceRTPServerTestMetricsApi->get_test_result_rtp_stream: %s\n" % e) + print("Exception when calling VoiceRTPServerTestMetricsApi->get_test_rtp_server_results: %s\n" % e) ``` @@ -85,7 +85,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-test-results/docs/VoiceSIPServerTestMetricsApi.md b/thousandeyes-sdk-test-results/docs/VoiceSIPServerTestMetricsApi.md index e82db0ab..1350233f 100644 --- a/thousandeyes-sdk-test-results/docs/VoiceSIPServerTestMetricsApi.md +++ b/thousandeyes-sdk-test-results/docs/VoiceSIPServerTestMetricsApi.md @@ -4,11 +4,11 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**get_test_result_sip_server**](VoiceSIPServerTestMetricsApi.md#get_test_result_sip_server) | **GET** /v7/test-results/{testId}/sip-server | Get SIP server test results +[**get_test_sip_server_results**](VoiceSIPServerTestMetricsApi.md#get_test_sip_server_results) | **GET** /v7/test-results/{testId}/sip-server | Get SIP server test results -# **get_test_result_sip_server** -> SipServerTestResults get_test_result_sip_server(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) +# **get_test_sip_server_results** +> SipServerTestResults get_test_sip_server_results(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) Get SIP server test results @@ -53,11 +53,11 @@ with thousandeyes_sdk.test_results.ApiClient(configuration) as api_client: try: # Get SIP server test results - api_response = api_instance.get_test_result_sip_server(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) - print("The response of VoiceSIPServerTestMetricsApi->get_test_result_sip_server:\n") + api_response = api_instance.get_test_sip_server_results(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) + print("The response of VoiceSIPServerTestMetricsApi->get_test_sip_server_results:\n") pprint(api_response) except Exception as e: - print("Exception when calling VoiceSIPServerTestMetricsApi->get_test_result_sip_server: %s\n" % e) + print("Exception when calling VoiceSIPServerTestMetricsApi->get_test_sip_server_results: %s\n" % e) ``` @@ -85,7 +85,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-test-results/docs/WebFTPServerTestMetricsApi.md b/thousandeyes-sdk-test-results/docs/WebFTPServerTestMetricsApi.md index c686309c..fd5b78b6 100644 --- a/thousandeyes-sdk-test-results/docs/WebFTPServerTestMetricsApi.md +++ b/thousandeyes-sdk-test-results/docs/WebFTPServerTestMetricsApi.md @@ -4,11 +4,11 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**get_test_result_ftp_server**](WebFTPServerTestMetricsApi.md#get_test_result_ftp_server) | **GET** /v7/test-results/{testId}/ftp-server | Get FTP server test results +[**get_test_ftp_server_results**](WebFTPServerTestMetricsApi.md#get_test_ftp_server_results) | **GET** /v7/test-results/{testId}/ftp-server | Get FTP server test results -# **get_test_result_ftp_server** -> FtpServerTestResults get_test_result_ftp_server(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) +# **get_test_ftp_server_results** +> FtpServerTestResults get_test_ftp_server_results(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) Get FTP server test results @@ -53,11 +53,11 @@ with thousandeyes_sdk.test_results.ApiClient(configuration) as api_client: try: # Get FTP server test results - api_response = api_instance.get_test_result_ftp_server(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) - print("The response of WebFTPServerTestMetricsApi->get_test_result_ftp_server:\n") + api_response = api_instance.get_test_ftp_server_results(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) + print("The response of WebFTPServerTestMetricsApi->get_test_ftp_server_results:\n") pprint(api_response) except Exception as e: - print("Exception when calling WebFTPServerTestMetricsApi->get_test_result_ftp_server: %s\n" % e) + print("Exception when calling WebFTPServerTestMetricsApi->get_test_ftp_server_results: %s\n" % e) ``` @@ -85,7 +85,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-test-results/docs/WebHTTPServerTestMetricsApi.md b/thousandeyes-sdk-test-results/docs/WebHTTPServerTestMetricsApi.md index ae730788..76fa680b 100644 --- a/thousandeyes-sdk-test-results/docs/WebHTTPServerTestMetricsApi.md +++ b/thousandeyes-sdk-test-results/docs/WebHTTPServerTestMetricsApi.md @@ -4,11 +4,11 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**get_test_result_http_server**](WebHTTPServerTestMetricsApi.md#get_test_result_http_server) | **GET** /v7/test-results/{testId}/http-server | Get HTTP server test results +[**get_test_http_server_results**](WebHTTPServerTestMetricsApi.md#get_test_http_server_results) | **GET** /v7/test-results/{testId}/http-server | Get HTTP server test results -# **get_test_result_http_server** -> HttpTestResults get_test_result_http_server(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor, expand=expand) +# **get_test_http_server_results** +> HttpTestResults get_test_http_server_results(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor, expand=expand) Get HTTP server test results @@ -55,11 +55,11 @@ with thousandeyes_sdk.test_results.ApiClient(configuration) as api_client: try: # Get HTTP server test results - api_response = api_instance.get_test_result_http_server(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor, expand=expand) - print("The response of WebHTTPServerTestMetricsApi->get_test_result_http_server:\n") + api_response = api_instance.get_test_http_server_results(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor, expand=expand) + print("The response of WebHTTPServerTestMetricsApi->get_test_http_server_results:\n") pprint(api_response) except Exception as e: - print("Exception when calling WebHTTPServerTestMetricsApi->get_test_result_http_server: %s\n" % e) + print("Exception when calling WebHTTPServerTestMetricsApi->get_test_http_server_results: %s\n" % e) ``` @@ -88,7 +88,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-test-results/docs/WebPageLoadTestMetricsApi.md b/thousandeyes-sdk-test-results/docs/WebPageLoadTestMetricsApi.md index c4b44896..120472b7 100644 --- a/thousandeyes-sdk-test-results/docs/WebPageLoadTestMetricsApi.md +++ b/thousandeyes-sdk-test-results/docs/WebPageLoadTestMetricsApi.md @@ -4,12 +4,104 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**get_test_result_page_load**](WebPageLoadTestMetricsApi.md#get_test_result_page_load) | **GET** /v7/test-results/{testId}/page-load | Get page load server test results -[**get_test_result_page_load_component_detail**](WebPageLoadTestMetricsApi.md#get_test_result_page_load_component_detail) | **GET** /v7/test-results/{testId}/page-load/agent/{agentId}/round/{roundId} | Get page load server test results by agent and round +[**get_test_page_load_agent_round_results**](WebPageLoadTestMetricsApi.md#get_test_page_load_agent_round_results) | **GET** /v7/test-results/{testId}/page-load/agent/{agentId}/round/{roundId} | Get page load server test results by agent and round +[**get_test_page_load_results**](WebPageLoadTestMetricsApi.md#get_test_page_load_results) | **GET** /v7/test-results/{testId}/page-load | Get page load server test results -# **get_test_result_page_load** -> PageLoadTestResults get_test_result_page_load(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) +# **get_test_page_load_agent_round_results** +> PageLoadDetailTestResults get_test_page_load_agent_round_results(test_id, agent_id, round_id, aid=aid) + +Get page load server test results by agent and round + +Returns test results for a given agent and round in [HAR (http archive)](http://www.softwareishard.com/blog/har-12-spec/) format. These results contain a list of components and their load times in a page load test, similar to the waterfall view for a page load test. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.test_results +from thousandeyes_sdk.test_results.models.page_load_detail_test_results import PageLoadDetailTestResults +from thousandeyes_sdk.test_results.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.test_results.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.test_results.WebPageLoadTestMetricsApi(api_client) + test_id = '202701' # str | Test ID + agent_id = '11' # str | Agent ID + round_id = '1384309800' # str | Round ID + 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: + # Get page load server test results by agent and round + api_response = api_instance.get_test_page_load_agent_round_results(test_id, agent_id, round_id, aid=aid) + print("The response of WebPageLoadTestMetricsApi->get_test_page_load_agent_round_results:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WebPageLoadTestMetricsApi->get_test_page_load_agent_round_results: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **test_id** | **str**| Test ID | + **agent_id** | **str**| Agent ID | + **round_id** | **str**| Round ID | + **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 + +[**PageLoadDetailTestResults**](PageLoadDetailTestResults.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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 | - | +**429** | Exhausted rate limit for the organization | - | +**500** | Internal server error | - | +**502** | Bad Gateway | - | +**0** | An error occurred | - | + +[[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_test_page_load_results** +> PageLoadTestResults get_test_page_load_results(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) Get page load server test results @@ -54,11 +146,11 @@ with thousandeyes_sdk.test_results.ApiClient(configuration) as api_client: try: # Get page load server test results - api_response = api_instance.get_test_result_page_load(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) - print("The response of WebPageLoadTestMetricsApi->get_test_result_page_load:\n") + api_response = api_instance.get_test_page_load_results(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) + print("The response of WebPageLoadTestMetricsApi->get_test_page_load_results:\n") pprint(api_response) except Exception as e: - print("Exception when calling WebPageLoadTestMetricsApi->get_test_result_page_load: %s\n" % e) + print("Exception when calling WebPageLoadTestMetricsApi->get_test_page_load_results: %s\n" % e) ``` @@ -86,99 +178,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+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 | - | -**429** | Exhausted rate limit for the organization | - | -**500** | Internal server error | - | -**502** | Bad Gateway | - | -**0** | An error occurred | - | - -[[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_test_result_page_load_component_detail** -> PageLoadDetailTestResults get_test_result_page_load_component_detail(test_id, agent_id, round_id, aid=aid) - -Get page load server test results by agent and round - -Returns test results for a given agent and round in [HAR (http archive)](http://www.softwareishard.com/blog/har-12-spec/) format. These results contain a list of components and their load times in a page load test, similar to the waterfall view for a page load test. - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import thousandeyes_sdk.test_results -from thousandeyes_sdk.test_results.models.page_load_detail_test_results import PageLoadDetailTestResults -from thousandeyes_sdk.test_results.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.thousandeyes.com -# See configuration.py for a list of all supported configuration parameters. -configuration = thousandeyes_sdk.client.Configuration( - host = "https://api.thousandeyes.com" -) - -# 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.client.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with thousandeyes_sdk.test_results.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = thousandeyes_sdk.test_results.WebPageLoadTestMetricsApi(api_client) - test_id = '202701' # str | Test ID - agent_id = '11' # str | Agent ID - round_id = '1384309800' # str | Round ID - 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: - # Get page load server test results by agent and round - api_response = api_instance.get_test_result_page_load_component_detail(test_id, agent_id, round_id, aid=aid) - print("The response of WebPageLoadTestMetricsApi->get_test_result_page_load_component_detail:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling WebPageLoadTestMetricsApi->get_test_result_page_load_component_detail: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **test_id** | **str**| Test ID | - **agent_id** | **str**| Agent ID | - **round_id** | **str**| Round ID | - **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 - -[**PageLoadDetailTestResults**](PageLoadDetailTestResults.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-test-results/docs/WebTransactionsTestMetricsApi.md b/thousandeyes-sdk-test-results/docs/WebTransactionsTestMetricsApi.md index cf9a16d0..9c9c75f1 100644 --- a/thousandeyes-sdk-test-results/docs/WebTransactionsTestMetricsApi.md +++ b/thousandeyes-sdk-test-results/docs/WebTransactionsTestMetricsApi.md @@ -4,13 +4,199 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**get_test_result_web_transactions**](WebTransactionsTestMetricsApi.md#get_test_result_web_transactions) | **GET** /v7/test-results/{testId}/web-transactions | Get web transactions test results -[**get_test_result_web_transactions_component_detail**](WebTransactionsTestMetricsApi.md#get_test_result_web_transactions_component_detail) | **GET** /v7/test-results/{testId}/web-transactions/agent/{agentId}/round/{roundId} | Get web transactions test results by agent and round -[**get_test_result_web_transactions_component_page_detail**](WebTransactionsTestMetricsApi.md#get_test_result_web_transactions_component_page_detail) | **GET** /v7/test-results/{testId}/web-transactions/agent/{agentId}/round/{roundId}/page/{pageId} | Get detailed web transactions test result by agent, round, and page +[**get_test_web_transaction_agent_round_page_results**](WebTransactionsTestMetricsApi.md#get_test_web_transaction_agent_round_page_results) | **GET** /v7/test-results/{testId}/web-transactions/agent/{agentId}/round/{roundId}/page/{pageId} | Get detailed web transactions test result by agent, round, and page +[**get_test_web_transaction_agent_round_results**](WebTransactionsTestMetricsApi.md#get_test_web_transaction_agent_round_results) | **GET** /v7/test-results/{testId}/web-transactions/agent/{agentId}/round/{roundId} | Get web transactions test results by agent and round +[**get_test_web_transaction_results**](WebTransactionsTestMetricsApi.md#get_test_web_transaction_results) | **GET** /v7/test-results/{testId}/web-transactions | Get web transactions test results -# **get_test_result_web_transactions** -> WebTransactionTestResults get_test_result_web_transactions(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) +# **get_test_web_transaction_agent_round_page_results** +> WebTransactionPageDetailTestResults get_test_web_transaction_agent_round_page_results(test_id, agent_id, round_id, page_id, aid=aid) + +Get detailed web transactions test result by agent, round, and page + +Returns a page of web transaction test results for an agent and round. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.test_results +from thousandeyes_sdk.test_results.models.web_transaction_page_detail_test_results import WebTransactionPageDetailTestResults +from thousandeyes_sdk.test_results.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.test_results.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.test_results.WebTransactionsTestMetricsApi(api_client) + test_id = '202701' # str | Test ID + agent_id = '11' # str | Agent ID + round_id = '1384309800' # str | Round ID + page_id = '281474976710706' # str | Web page ID + 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: + # Get detailed web transactions test result by agent, round, and page + api_response = api_instance.get_test_web_transaction_agent_round_page_results(test_id, agent_id, round_id, page_id, aid=aid) + print("The response of WebTransactionsTestMetricsApi->get_test_web_transaction_agent_round_page_results:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WebTransactionsTestMetricsApi->get_test_web_transaction_agent_round_page_results: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **test_id** | **str**| Test ID | + **agent_id** | **str**| Agent ID | + **round_id** | **str**| Round ID | + **page_id** | **str**| Web page ID | + **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 + +[**WebTransactionPageDetailTestResults**](WebTransactionPageDetailTestResults.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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 | - | +**429** | Exhausted rate limit for the organization | - | +**500** | Internal server error | - | +**502** | Bad Gateway | - | +**0** | An error occurred | - | + +[[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_test_web_transaction_agent_round_results** +> WebTransactionDetailTestResults get_test_web_transaction_agent_round_results(test_id, agent_id, round_id, aid=aid) + +Get web transactions test results by agent and round + +Returns test results for web transactions for a given agent and round. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import thousandeyes_sdk.test_results +from thousandeyes_sdk.test_results.models.web_transaction_detail_test_results import WebTransactionDetailTestResults +from thousandeyes_sdk.test_results.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.thousandeyes.com +# See configuration.py for a list of all supported configuration parameters. +configuration = thousandeyes_sdk.client.Configuration( + host = "https://api.thousandeyes.com" +) + +# 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.client.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with thousandeyes_sdk.test_results.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = thousandeyes_sdk.test_results.WebTransactionsTestMetricsApi(api_client) + test_id = '202701' # str | Test ID + agent_id = '11' # str | Agent ID + round_id = '1384309800' # str | Round ID + 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: + # Get web transactions test results by agent and round + api_response = api_instance.get_test_web_transaction_agent_round_results(test_id, agent_id, round_id, aid=aid) + print("The response of WebTransactionsTestMetricsApi->get_test_web_transaction_agent_round_results:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WebTransactionsTestMetricsApi->get_test_web_transaction_agent_round_results: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **test_id** | **str**| Test ID | + **agent_id** | **str**| Agent ID | + **round_id** | **str**| Round ID | + **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 + +[**WebTransactionDetailTestResults**](WebTransactionDetailTestResults.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **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 | - | +**429** | Exhausted rate limit for the organization | - | +**500** | Internal server error | - | +**502** | Bad Gateway | - | +**0** | An error occurred | - | + +[[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_test_web_transaction_results** +> WebTransactionTestResults get_test_web_transaction_results(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) Get web transactions test results @@ -55,11 +241,11 @@ with thousandeyes_sdk.test_results.ApiClient(configuration) as api_client: try: # Get web transactions test results - api_response = api_instance.get_test_result_web_transactions(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) - print("The response of WebTransactionsTestMetricsApi->get_test_result_web_transactions:\n") + api_response = api_instance.get_test_web_transaction_results(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor) + print("The response of WebTransactionsTestMetricsApi->get_test_web_transaction_results:\n") pprint(api_response) except Exception as e: - print("Exception when calling WebTransactionsTestMetricsApi->get_test_result_web_transactions: %s\n" % e) + print("Exception when calling WebTransactionsTestMetricsApi->get_test_web_transaction_results: %s\n" % e) ``` @@ -87,193 +273,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+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 | - | -**429** | Exhausted rate limit for the organization | - | -**500** | Internal server error | - | -**502** | Bad Gateway | - | -**0** | An error occurred | - | - -[[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_test_result_web_transactions_component_detail** -> WebTransactionDetailTestResults get_test_result_web_transactions_component_detail(test_id, agent_id, round_id, aid=aid) - -Get web transactions test results by agent and round - -Returns test results for web transactions for a given agent and round. - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import thousandeyes_sdk.test_results -from thousandeyes_sdk.test_results.models.web_transaction_detail_test_results import WebTransactionDetailTestResults -from thousandeyes_sdk.test_results.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.thousandeyes.com -# See configuration.py for a list of all supported configuration parameters. -configuration = thousandeyes_sdk.client.Configuration( - host = "https://api.thousandeyes.com" -) - -# 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.client.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with thousandeyes_sdk.test_results.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = thousandeyes_sdk.test_results.WebTransactionsTestMetricsApi(api_client) - test_id = '202701' # str | Test ID - agent_id = '11' # str | Agent ID - round_id = '1384309800' # str | Round ID - 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: - # Get web transactions test results by agent and round - api_response = api_instance.get_test_result_web_transactions_component_detail(test_id, agent_id, round_id, aid=aid) - print("The response of WebTransactionsTestMetricsApi->get_test_result_web_transactions_component_detail:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling WebTransactionsTestMetricsApi->get_test_result_web_transactions_component_detail: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **test_id** | **str**| Test ID | - **agent_id** | **str**| Agent ID | - **round_id** | **str**| Round ID | - **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 - -[**WebTransactionDetailTestResults**](WebTransactionDetailTestResults.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/hal+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 | - | -**429** | Exhausted rate limit for the organization | - | -**500** | Internal server error | - | -**502** | Bad Gateway | - | -**0** | An error occurred | - | - -[[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_test_result_web_transactions_component_page_detail** -> WebTransactionPageDetailTestResults get_test_result_web_transactions_component_page_detail(test_id, agent_id, round_id, page_id, aid=aid) - -Get detailed web transactions test result by agent, round, and page - -Returns a page of web transaction test results for an agent and round. - -### Example - -* Bearer Authentication (BearerAuth): - -```python -import thousandeyes_sdk.test_results -from thousandeyes_sdk.test_results.models.web_transaction_page_detail_test_results import WebTransactionPageDetailTestResults -from thousandeyes_sdk.test_results.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.thousandeyes.com -# See configuration.py for a list of all supported configuration parameters. -configuration = thousandeyes_sdk.client.Configuration( - host = "https://api.thousandeyes.com" -) - -# 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.client.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with thousandeyes_sdk.test_results.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = thousandeyes_sdk.test_results.WebTransactionsTestMetricsApi(api_client) - test_id = '202701' # str | Test ID - agent_id = '11' # str | Agent ID - round_id = '1384309800' # str | Round ID - page_id = '281474976710706' # str | Web page ID - 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: - # Get detailed web transactions test result by agent, round, and page - api_response = api_instance.get_test_result_web_transactions_component_page_detail(test_id, agent_id, round_id, page_id, aid=aid) - print("The response of WebTransactionsTestMetricsApi->get_test_result_web_transactions_component_page_detail:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling WebTransactionsTestMetricsApi->get_test_result_web_transactions_component_page_detail: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **test_id** | **str**| Test ID | - **agent_id** | **str**| Agent ID | - **round_id** | **str**| Round ID | - **page_id** | **str**| Web page ID | - **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 - -[**WebTransactionPageDetailTestResults**](WebTransactionPageDetailTestResults.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-test-results/pyproject.toml b/thousandeyes-sdk-test-results/pyproject.toml index e3b547b0..51fe7a34 100644 --- a/thousandeyes-sdk-test-results/pyproject.toml +++ b/thousandeyes-sdk-test-results/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "thousandeyes-sdk-test-results" -version = "1.0.0" +dynamic = ["version"] authors = [ { name = "ThousandEyes API Team", email = "api-team@thousandeyes.com" } ] @@ -11,9 +11,12 @@ dependencies = [ "python-dateutil >=2.8.2", "pydantic >=2", "typing-extensions >=4.7.1", - "thousandeyes-sdk-client==1.0.0", + "thousandeyes-sdk-core", ] +[tool.setuptools.dynamic] +version = {attr = "thousandeyes_sdk.client.__version__"} + [project.optional-dependencies] test = [ "pytest~=7.1.3", diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/__init__.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/__init__.py index e1985276..7bb9b8da 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/__init__.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/__init__.py @@ -7,15 +7,13 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 -__version__ = "1.0.0" - # import apis into sdk package from thousandeyes_sdk.test_results.api.api_test_metrics_api import APITestMetricsApi from thousandeyes_sdk.test_results.api.dnssec_test_metrics_api import DNSSECTestMetricsApi diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/api_test_metrics_api.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/api_test_metrics_api.py index 38ba165d..af4b9cd2 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/api_test_metrics_api.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/api_test_metrics_api.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -28,6 +28,7 @@ from thousandeyes_sdk.test_results.models.api_test_results import ApiTestResults from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class APITestMetricsApi: @@ -40,11 +41,342 @@ class APITestMetricsApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @validate_call - def get_test_result_api( + def get_test_api_agent_round_results( + self, + test_id: Annotated[StrictStr, Field(description="Test ID")], + agent_id: Annotated[StrictStr, Field(description="Agent ID")], + round_id: Annotated[StrictStr, Field(description="Round ID")], + 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, + ) -> ApiDetailTestResults: + """Get API test results by agent and round + + Returns test results for API for a given agent and round. + + :param test_id: Test ID (required) + :type test_id: str + :param agent_id: Agent ID (required) + :type agent_id: str + :param round_id: Round ID (required) + :type round_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 + 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_test_api_agent_round_results_serialize( + test_id=test_id, + agent_id=agent_id, + round_id=round_id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiDetailTestResults", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "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.test_results.models, + ).data + + + @validate_call + def get_test_api_agent_round_results_with_http_info( + self, + test_id: Annotated[StrictStr, Field(description="Test ID")], + agent_id: Annotated[StrictStr, Field(description="Agent ID")], + round_id: Annotated[StrictStr, Field(description="Round ID")], + 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[ApiDetailTestResults]: + """Get API test results by agent and round + + Returns test results for API for a given agent and round. + + :param test_id: Test ID (required) + :type test_id: str + :param agent_id: Agent ID (required) + :type agent_id: str + :param round_id: Round ID (required) + :type round_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 + 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_test_api_agent_round_results_serialize( + test_id=test_id, + agent_id=agent_id, + round_id=round_id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiDetailTestResults", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "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.test_results.models, + ) + + + @validate_call + def get_test_api_agent_round_results_without_preload_content( + self, + test_id: Annotated[StrictStr, Field(description="Test ID")], + agent_id: Annotated[StrictStr, Field(description="Agent ID")], + round_id: Annotated[StrictStr, Field(description="Round ID")], + 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: + """Get API test results by agent and round + + Returns test results for API for a given agent and round. + + :param test_id: Test ID (required) + :type test_id: str + :param agent_id: Agent ID (required) + :type agent_id: str + :param round_id: Round ID (required) + :type round_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 + 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_test_api_agent_round_results_serialize( + test_id=test_id, + agent_id=agent_id, + round_id=round_id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ApiDetailTestResults", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_test_api_agent_round_results_serialize( + self, + test_id, + agent_id, + round_id, + 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 + if test_id is not None: + _path_params['testId'] = test_id + if agent_id is not None: + _path_params['agentId'] = agent_id + if round_id is not None: + _path_params['roundId'] = round_id + # 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='/v7/test-results/{testId}/api/agent/{agentId}/round/{roundId}', + 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_test_api_results( self, test_id: Annotated[StrictStr, Field(description="Test ID")], 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, @@ -103,7 +435,7 @@ class APITestMetricsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_result_api_serialize( + _param = self._get_test_api_results_serialize( test_id=test_id, aid=aid, window=window, @@ -139,7 +471,7 @@ class APITestMetricsApi: @validate_call - def get_test_result_api_with_http_info( + def get_test_api_results_with_http_info( self, test_id: Annotated[StrictStr, Field(description="Test ID")], 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, @@ -198,7 +530,7 @@ class APITestMetricsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_result_api_serialize( + _param = self._get_test_api_results_serialize( test_id=test_id, aid=aid, window=window, @@ -234,7 +566,7 @@ class APITestMetricsApi: @validate_call - def get_test_result_api_without_preload_content( + def get_test_api_results_without_preload_content( self, test_id: Annotated[StrictStr, Field(description="Test ID")], 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, @@ -293,7 +625,7 @@ class APITestMetricsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_result_api_serialize( + _param = self._get_test_api_results_serialize( test_id=test_id, aid=aid, window=window, @@ -323,7 +655,7 @@ class APITestMetricsApi: return response_data.response - def _get_test_result_api_serialize( + def _get_test_api_results_serialize( self, test_id, aid, @@ -400,6 +732,7 @@ class APITestMetricsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -426,332 +759,3 @@ class APITestMetricsApi: ) - - - @validate_call - def get_test_result_api_component_detail( - self, - test_id: Annotated[StrictStr, Field(description="Test ID")], - agent_id: Annotated[StrictStr, Field(description="Agent ID")], - round_id: Annotated[StrictStr, Field(description="Round ID")], - 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, - ) -> ApiDetailTestResults: - """Get API test results by agent and round - - Returns test results for API for a given agent and round. - - :param test_id: Test ID (required) - :type test_id: str - :param agent_id: Agent ID (required) - :type agent_id: str - :param round_id: Round ID (required) - :type round_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 - 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_test_result_api_component_detail_serialize( - test_id=test_id, - agent_id=agent_id, - round_id=round_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiDetailTestResults", - '400': "ValidationError", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "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.test_results.models, - ).data - - - @validate_call - def get_test_result_api_component_detail_with_http_info( - self, - test_id: Annotated[StrictStr, Field(description="Test ID")], - agent_id: Annotated[StrictStr, Field(description="Agent ID")], - round_id: Annotated[StrictStr, Field(description="Round ID")], - 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[ApiDetailTestResults]: - """Get API test results by agent and round - - Returns test results for API for a given agent and round. - - :param test_id: Test ID (required) - :type test_id: str - :param agent_id: Agent ID (required) - :type agent_id: str - :param round_id: Round ID (required) - :type round_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 - 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_test_result_api_component_detail_serialize( - test_id=test_id, - agent_id=agent_id, - round_id=round_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiDetailTestResults", - '400': "ValidationError", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "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.test_results.models, - ) - - - @validate_call - def get_test_result_api_component_detail_without_preload_content( - self, - test_id: Annotated[StrictStr, Field(description="Test ID")], - agent_id: Annotated[StrictStr, Field(description="Agent ID")], - round_id: Annotated[StrictStr, Field(description="Round ID")], - 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: - """Get API test results by agent and round - - Returns test results for API for a given agent and round. - - :param test_id: Test ID (required) - :type test_id: str - :param agent_id: Agent ID (required) - :type agent_id: str - :param round_id: Round ID (required) - :type round_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 - 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_test_result_api_component_detail_serialize( - test_id=test_id, - agent_id=agent_id, - round_id=round_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiDetailTestResults", - '400': "ValidationError", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_test_result_api_component_detail_serialize( - self, - test_id, - agent_id, - round_id, - 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 - if test_id is not None: - _path_params['testId'] = test_id - if agent_id is not None: - _path_params['agentId'] = agent_id - if round_id is not None: - _path_params['roundId'] = round_id - # 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/problem+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v7/test-results/{testId}/api/agent/{agentId}/round/{roundId}', - 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 - ) - - diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/dns_server_test_metrics_api.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/dns_server_test_metrics_api.py index a214f124..0f14bda2 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/dns_server_test_metrics_api.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/dns_server_test_metrics_api.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -27,6 +27,7 @@ from thousandeyes_sdk.test_results.models.dns_server_test_results import DnsServ from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class DNSServerTestMetricsApi: @@ -39,11 +40,12 @@ class DNSServerTestMetricsApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @validate_call - def get_test_result_dns_server( + def get_test_dns_server_result( self, test_id: Annotated[StrictStr, Field(description="Test ID")], server_id: Annotated[StrictStr, Field(description="DNS server ID")], @@ -105,7 +107,7 @@ class DNSServerTestMetricsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_result_dns_server_serialize( + _param = self._get_test_dns_server_result_serialize( test_id=test_id, server_id=server_id, aid=aid, @@ -142,7 +144,7 @@ class DNSServerTestMetricsApi: @validate_call - def get_test_result_dns_server_with_http_info( + def get_test_dns_server_result_with_http_info( self, test_id: Annotated[StrictStr, Field(description="Test ID")], server_id: Annotated[StrictStr, Field(description="DNS server ID")], @@ -204,7 +206,7 @@ class DNSServerTestMetricsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_result_dns_server_serialize( + _param = self._get_test_dns_server_result_serialize( test_id=test_id, server_id=server_id, aid=aid, @@ -241,7 +243,7 @@ class DNSServerTestMetricsApi: @validate_call - def get_test_result_dns_server_without_preload_content( + def get_test_dns_server_result_without_preload_content( self, test_id: Annotated[StrictStr, Field(description="Test ID")], server_id: Annotated[StrictStr, Field(description="DNS server ID")], @@ -303,7 +305,7 @@ class DNSServerTestMetricsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_result_dns_server_serialize( + _param = self._get_test_dns_server_result_serialize( test_id=test_id, server_id=server_id, aid=aid, @@ -334,7 +336,7 @@ class DNSServerTestMetricsApi: return response_data.response - def _get_test_result_dns_server_serialize( + def _get_test_dns_server_result_serialize( self, test_id, server_id, @@ -414,6 +416,7 @@ class DNSServerTestMetricsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -443,7 +446,7 @@ class DNSServerTestMetricsApi: @validate_call - def get_test_result_dns_servers( + def get_test_dns_servers_results( self, test_id: Annotated[StrictStr, Field(description="Test ID")], 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, @@ -502,7 +505,7 @@ class DNSServerTestMetricsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_result_dns_servers_serialize( + _param = self._get_test_dns_servers_results_serialize( test_id=test_id, aid=aid, window=window, @@ -538,7 +541,7 @@ class DNSServerTestMetricsApi: @validate_call - def get_test_result_dns_servers_with_http_info( + def get_test_dns_servers_results_with_http_info( self, test_id: Annotated[StrictStr, Field(description="Test ID")], 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, @@ -597,7 +600,7 @@ class DNSServerTestMetricsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_result_dns_servers_serialize( + _param = self._get_test_dns_servers_results_serialize( test_id=test_id, aid=aid, window=window, @@ -633,7 +636,7 @@ class DNSServerTestMetricsApi: @validate_call - def get_test_result_dns_servers_without_preload_content( + def get_test_dns_servers_results_without_preload_content( self, test_id: Annotated[StrictStr, Field(description="Test ID")], 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, @@ -692,7 +695,7 @@ class DNSServerTestMetricsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_result_dns_servers_serialize( + _param = self._get_test_dns_servers_results_serialize( test_id=test_id, aid=aid, window=window, @@ -722,7 +725,7 @@ class DNSServerTestMetricsApi: return response_data.response - def _get_test_result_dns_servers_serialize( + def _get_test_dns_servers_results_serialize( self, test_id, aid, @@ -799,6 +802,7 @@ class DNSServerTestMetricsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/dns_trace_test_metrics_api.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/dns_trace_test_metrics_api.py index 87bf2ecc..53562b8f 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/dns_trace_test_metrics_api.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/dns_trace_test_metrics_api.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -27,6 +27,7 @@ from thousandeyes_sdk.test_results.models.dns_trace_test_results import DnsTrace from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class DNSTraceTestMetricsApi: @@ -39,11 +40,12 @@ class DNSTraceTestMetricsApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @validate_call - def get_test_result_dns_trace( + def get_test_dns_trace_results( self, test_id: Annotated[StrictStr, Field(description="Test ID")], 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, @@ -102,7 +104,7 @@ class DNSTraceTestMetricsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_result_dns_trace_serialize( + _param = self._get_test_dns_trace_results_serialize( test_id=test_id, aid=aid, window=window, @@ -138,7 +140,7 @@ class DNSTraceTestMetricsApi: @validate_call - def get_test_result_dns_trace_with_http_info( + def get_test_dns_trace_results_with_http_info( self, test_id: Annotated[StrictStr, Field(description="Test ID")], 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, @@ -197,7 +199,7 @@ class DNSTraceTestMetricsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_result_dns_trace_serialize( + _param = self._get_test_dns_trace_results_serialize( test_id=test_id, aid=aid, window=window, @@ -233,7 +235,7 @@ class DNSTraceTestMetricsApi: @validate_call - def get_test_result_dns_trace_without_preload_content( + def get_test_dns_trace_results_without_preload_content( self, test_id: Annotated[StrictStr, Field(description="Test ID")], 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, @@ -292,7 +294,7 @@ class DNSTraceTestMetricsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_result_dns_trace_serialize( + _param = self._get_test_dns_trace_results_serialize( test_id=test_id, aid=aid, window=window, @@ -322,7 +324,7 @@ class DNSTraceTestMetricsApi: return response_data.response - def _get_test_result_dns_trace_serialize( + def _get_test_dns_trace_results_serialize( self, test_id, aid, @@ -399,6 +401,7 @@ class DNSTraceTestMetricsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/dnssec_test_metrics_api.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/dnssec_test_metrics_api.py index 16549c73..6d9ff8f0 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/dnssec_test_metrics_api.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/dnssec_test_metrics_api.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -27,6 +27,7 @@ from thousandeyes_sdk.test_results.models.dnssec_test_results import DnssecTestR from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class DNSSECTestMetricsApi: @@ -39,11 +40,12 @@ class DNSSECTestMetricsApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @validate_call - def get_test_result_dnssec( + def get_test_dns_sec_results( self, test_id: Annotated[StrictStr, Field(description="Test ID")], 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, @@ -102,7 +104,7 @@ class DNSSECTestMetricsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_result_dnssec_serialize( + _param = self._get_test_dns_sec_results_serialize( test_id=test_id, aid=aid, window=window, @@ -138,7 +140,7 @@ class DNSSECTestMetricsApi: @validate_call - def get_test_result_dnssec_with_http_info( + def get_test_dns_sec_results_with_http_info( self, test_id: Annotated[StrictStr, Field(description="Test ID")], 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, @@ -197,7 +199,7 @@ class DNSSECTestMetricsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_result_dnssec_serialize( + _param = self._get_test_dns_sec_results_serialize( test_id=test_id, aid=aid, window=window, @@ -233,7 +235,7 @@ class DNSSECTestMetricsApi: @validate_call - def get_test_result_dnssec_without_preload_content( + def get_test_dns_sec_results_without_preload_content( self, test_id: Annotated[StrictStr, Field(description="Test ID")], 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, @@ -292,7 +294,7 @@ class DNSSECTestMetricsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_result_dnssec_serialize( + _param = self._get_test_dns_sec_results_serialize( test_id=test_id, aid=aid, window=window, @@ -322,7 +324,7 @@ class DNSSECTestMetricsApi: return response_data.response - def _get_test_result_dnssec_serialize( + def _get_test_dns_sec_results_serialize( self, test_id, aid, @@ -399,6 +401,7 @@ class DNSSECTestMetricsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/network_bgp_test_metrics_api.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/network_bgp_test_metrics_api.py index 158e98e8..e2c5bd8c 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/network_bgp_test_metrics_api.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/network_bgp_test_metrics_api.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -28,6 +28,7 @@ from thousandeyes_sdk.test_results.models.bgp_test_route_information_results imp from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class NetworkBGPTestMetricsApi: @@ -40,11 +41,12 @@ class NetworkBGPTestMetricsApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @validate_call - def get_test_results_bgp( + def get_test_bgp_results( self, test_id: Annotated[StrictStr, Field(description="Test ID")], 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, @@ -103,7 +105,7 @@ class NetworkBGPTestMetricsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_results_bgp_serialize( + _param = self._get_test_bgp_results_serialize( test_id=test_id, aid=aid, window=window, @@ -139,7 +141,7 @@ class NetworkBGPTestMetricsApi: @validate_call - def get_test_results_bgp_with_http_info( + def get_test_bgp_results_with_http_info( self, test_id: Annotated[StrictStr, Field(description="Test ID")], 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, @@ -198,7 +200,7 @@ class NetworkBGPTestMetricsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_results_bgp_serialize( + _param = self._get_test_bgp_results_serialize( test_id=test_id, aid=aid, window=window, @@ -234,7 +236,7 @@ class NetworkBGPTestMetricsApi: @validate_call - def get_test_results_bgp_without_preload_content( + def get_test_bgp_results_without_preload_content( self, test_id: Annotated[StrictStr, Field(description="Test ID")], 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, @@ -293,7 +295,7 @@ class NetworkBGPTestMetricsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_results_bgp_serialize( + _param = self._get_test_bgp_results_serialize( test_id=test_id, aid=aid, window=window, @@ -323,7 +325,7 @@ class NetworkBGPTestMetricsApi: return response_data.response - def _get_test_results_bgp_serialize( + def _get_test_bgp_results_serialize( self, test_id, aid, @@ -400,6 +402,7 @@ class NetworkBGPTestMetricsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -429,7 +432,7 @@ class NetworkBGPTestMetricsApi: @validate_call - def get_test_results_bgp_prefix( + def get_test_bgp_routes_prefix_round_results( self, test_id: Annotated[StrictStr, Field(description="Test ID")], prefix_id: Annotated[StrictStr, Field(description="The ID of the prefix. You can get `prefixId` from the `/test-results/{testId}/bgp` endpoint.")], @@ -482,7 +485,7 @@ class NetworkBGPTestMetricsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_results_bgp_prefix_serialize( + _param = self._get_test_bgp_routes_prefix_round_results_serialize( test_id=test_id, prefix_id=prefix_id, round_id=round_id, @@ -516,7 +519,7 @@ class NetworkBGPTestMetricsApi: @validate_call - def get_test_results_bgp_prefix_with_http_info( + def get_test_bgp_routes_prefix_round_results_with_http_info( self, test_id: Annotated[StrictStr, Field(description="Test ID")], prefix_id: Annotated[StrictStr, Field(description="The ID of the prefix. You can get `prefixId` from the `/test-results/{testId}/bgp` endpoint.")], @@ -569,7 +572,7 @@ class NetworkBGPTestMetricsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_results_bgp_prefix_serialize( + _param = self._get_test_bgp_routes_prefix_round_results_serialize( test_id=test_id, prefix_id=prefix_id, round_id=round_id, @@ -603,7 +606,7 @@ class NetworkBGPTestMetricsApi: @validate_call - def get_test_results_bgp_prefix_without_preload_content( + def get_test_bgp_routes_prefix_round_results_without_preload_content( self, test_id: Annotated[StrictStr, Field(description="Test ID")], prefix_id: Annotated[StrictStr, Field(description="The ID of the prefix. You can get `prefixId` from the `/test-results/{testId}/bgp` endpoint.")], @@ -656,7 +659,7 @@ class NetworkBGPTestMetricsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_results_bgp_prefix_serialize( + _param = self._get_test_bgp_routes_prefix_round_results_serialize( test_id=test_id, prefix_id=prefix_id, round_id=round_id, @@ -684,7 +687,7 @@ class NetworkBGPTestMetricsApi: return response_data.response - def _get_test_results_bgp_prefix_serialize( + def _get_test_bgp_routes_prefix_round_results_serialize( self, test_id, prefix_id, @@ -729,6 +732,7 @@ class NetworkBGPTestMetricsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/network_test_metrics_api.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/network_test_metrics_api.py index 7494728e..62fe9b2c 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/network_test_metrics_api.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/network_test_metrics_api.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -31,6 +31,7 @@ from thousandeyes_sdk.test_results.models.test_direction import TestDirection from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class NetworkTestMetricsApi: @@ -43,357 +44,12 @@ class NetworkTestMetricsApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @validate_call - def get_test_pathvis_agent_round( - self, - test_id: Annotated[StrictStr, Field(description="Test ID")], - agent_id: Annotated[StrictStr, Field(description="Agent ID")], - round_id: Annotated[StrictStr, Field(description="Round ID")], - 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, - direction: Annotated[Optional[PathVisDirection], Field(description="Choose the direction for the metrics you want: [`from-target`, `to-target`]. This applies when you're doing bidirectional Agent-to-Agent tests. Omitting the parameter will default the results to both `from-target` and `to-target` values (bidirectional); otherwise, you'll get data for one direction. If you try to get unidirectional test data with an incorrect direction parameter, it will trigger 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, - ) -> PathVisDetailTestResults: - """Get path visualization test results by agent and round - - Returns a summary of the path trace data collected during path visualization for a given agent and round. With each attempt, three tries are made to reach the destination. The entire path is displayed in order. Bidirectional agent-to-agent tests also support the `direction` parameter. For example, if agents A, B, and C are testing agent D bidirectionally, and you want results from the route from agent A to agent D, you can use the query `direction=to-target`. For results from agent D to agent A, you can use `direction=from-target`. To get both results for both routes, query without the direction parameter. The source will always be agent A and the destination will be agent D, but the direction field will indicate which trace direction you want test results from. - - :param test_id: Test ID (required) - :type test_id: str - :param agent_id: Agent ID (required) - :type agent_id: str - :param round_id: Round ID (required) - :type round_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 direction: Choose the direction for the metrics you want: [`from-target`, `to-target`]. This applies when you're doing bidirectional Agent-to-Agent tests. Omitting the parameter will default the results to both `from-target` and `to-target` values (bidirectional); otherwise, you'll get data for one direction. If you try to get unidirectional test data with an incorrect direction parameter, it will trigger an error response. - :type direction: PathVisDirection - :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_test_pathvis_agent_round_serialize( - test_id=test_id, - agent_id=agent_id, - round_id=round_id, - aid=aid, - direction=direction, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "PathVisDetailTestResults", - '400': "ValidationError", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "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.test_results.models, - ).data - - - @validate_call - def get_test_pathvis_agent_round_with_http_info( - self, - test_id: Annotated[StrictStr, Field(description="Test ID")], - agent_id: Annotated[StrictStr, Field(description="Agent ID")], - round_id: Annotated[StrictStr, Field(description="Round ID")], - 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, - direction: Annotated[Optional[PathVisDirection], Field(description="Choose the direction for the metrics you want: [`from-target`, `to-target`]. This applies when you're doing bidirectional Agent-to-Agent tests. Omitting the parameter will default the results to both `from-target` and `to-target` values (bidirectional); otherwise, you'll get data for one direction. If you try to get unidirectional test data with an incorrect direction parameter, it will trigger 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[PathVisDetailTestResults]: - """Get path visualization test results by agent and round - - Returns a summary of the path trace data collected during path visualization for a given agent and round. With each attempt, three tries are made to reach the destination. The entire path is displayed in order. Bidirectional agent-to-agent tests also support the `direction` parameter. For example, if agents A, B, and C are testing agent D bidirectionally, and you want results from the route from agent A to agent D, you can use the query `direction=to-target`. For results from agent D to agent A, you can use `direction=from-target`. To get both results for both routes, query without the direction parameter. The source will always be agent A and the destination will be agent D, but the direction field will indicate which trace direction you want test results from. - - :param test_id: Test ID (required) - :type test_id: str - :param agent_id: Agent ID (required) - :type agent_id: str - :param round_id: Round ID (required) - :type round_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 direction: Choose the direction for the metrics you want: [`from-target`, `to-target`]. This applies when you're doing bidirectional Agent-to-Agent tests. Omitting the parameter will default the results to both `from-target` and `to-target` values (bidirectional); otherwise, you'll get data for one direction. If you try to get unidirectional test data with an incorrect direction parameter, it will trigger an error response. - :type direction: PathVisDirection - :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_test_pathvis_agent_round_serialize( - test_id=test_id, - agent_id=agent_id, - round_id=round_id, - aid=aid, - direction=direction, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "PathVisDetailTestResults", - '400': "ValidationError", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "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.test_results.models, - ) - - - @validate_call - def get_test_pathvis_agent_round_without_preload_content( - self, - test_id: Annotated[StrictStr, Field(description="Test ID")], - agent_id: Annotated[StrictStr, Field(description="Agent ID")], - round_id: Annotated[StrictStr, Field(description="Round ID")], - 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, - direction: Annotated[Optional[PathVisDirection], Field(description="Choose the direction for the metrics you want: [`from-target`, `to-target`]. This applies when you're doing bidirectional Agent-to-Agent tests. Omitting the parameter will default the results to both `from-target` and `to-target` values (bidirectional); otherwise, you'll get data for one direction. If you try to get unidirectional test data with an incorrect direction parameter, it will trigger 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: - """Get path visualization test results by agent and round - - Returns a summary of the path trace data collected during path visualization for a given agent and round. With each attempt, three tries are made to reach the destination. The entire path is displayed in order. Bidirectional agent-to-agent tests also support the `direction` parameter. For example, if agents A, B, and C are testing agent D bidirectionally, and you want results from the route from agent A to agent D, you can use the query `direction=to-target`. For results from agent D to agent A, you can use `direction=from-target`. To get both results for both routes, query without the direction parameter. The source will always be agent A and the destination will be agent D, but the direction field will indicate which trace direction you want test results from. - - :param test_id: Test ID (required) - :type test_id: str - :param agent_id: Agent ID (required) - :type agent_id: str - :param round_id: Round ID (required) - :type round_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 direction: Choose the direction for the metrics you want: [`from-target`, `to-target`]. This applies when you're doing bidirectional Agent-to-Agent tests. Omitting the parameter will default the results to both `from-target` and `to-target` values (bidirectional); otherwise, you'll get data for one direction. If you try to get unidirectional test data with an incorrect direction parameter, it will trigger an error response. - :type direction: PathVisDirection - :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_test_pathvis_agent_round_serialize( - test_id=test_id, - agent_id=agent_id, - round_id=round_id, - aid=aid, - direction=direction, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "PathVisDetailTestResults", - '400': "ValidationError", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_test_pathvis_agent_round_serialize( - self, - test_id, - agent_id, - round_id, - aid, - direction, - _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 test_id is not None: - _path_params['testId'] = test_id - if agent_id is not None: - _path_params['agentId'] = agent_id - if round_id is not None: - _path_params['roundId'] = round_id - # process the query parameters - if aid is not None: - - _query_params.append(('aid', aid)) - - if direction is not None: - - _query_params.append(('direction', direction.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/problem+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v7/test-results/{testId}/path-vis/agent/{agentId}/round/{roundId}', - 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_test_result_metrics( + def get_test_network_results( self, test_id: Annotated[StrictStr, Field(description="Test ID")], 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, @@ -455,7 +111,7 @@ class NetworkTestMetricsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_result_metrics_serialize( + _param = self._get_test_network_results_serialize( test_id=test_id, aid=aid, window=window, @@ -492,7 +148,7 @@ class NetworkTestMetricsApi: @validate_call - def get_test_result_metrics_with_http_info( + def get_test_network_results_with_http_info( self, test_id: Annotated[StrictStr, Field(description="Test ID")], 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, @@ -554,7 +210,7 @@ class NetworkTestMetricsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_result_metrics_serialize( + _param = self._get_test_network_results_serialize( test_id=test_id, aid=aid, window=window, @@ -591,7 +247,7 @@ class NetworkTestMetricsApi: @validate_call - def get_test_result_metrics_without_preload_content( + def get_test_network_results_without_preload_content( self, test_id: Annotated[StrictStr, Field(description="Test ID")], 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, @@ -653,7 +309,7 @@ class NetworkTestMetricsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_result_metrics_serialize( + _param = self._get_test_network_results_serialize( test_id=test_id, aid=aid, window=window, @@ -684,7 +340,7 @@ class NetworkTestMetricsApi: return response_data.response - def _get_test_result_metrics_serialize( + def _get_test_network_results_serialize( self, test_id, aid, @@ -766,6 +422,7 @@ class NetworkTestMetricsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -795,7 +452,354 @@ class NetworkTestMetricsApi: @validate_call - def get_test_result_network_path_vis( + def get_test_path_vis_agent_round_results( + self, + test_id: Annotated[StrictStr, Field(description="Test ID")], + agent_id: Annotated[StrictStr, Field(description="Agent ID")], + round_id: Annotated[StrictStr, Field(description="Round ID")], + 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, + direction: Annotated[Optional[PathVisDirection], Field(description="Choose the direction for the metrics you want: [`from-target`, `to-target`]. This applies when you're doing bidirectional Agent-to-Agent tests. Omitting the parameter will default the results to both `from-target` and `to-target` values (bidirectional); otherwise, you'll get data for one direction. If you try to get unidirectional test data with an incorrect direction parameter, it will trigger 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, + ) -> PathVisDetailTestResults: + """Get path visualization test results by agent and round + + Returns a summary of the path trace data collected during path visualization for a given agent and round. With each attempt, three tries are made to reach the destination. The entire path is displayed in order. Bidirectional agent-to-agent tests also support the `direction` parameter. For example, if agents A, B, and C are testing agent D bidirectionally, and you want results from the route from agent A to agent D, you can use the query `direction=to-target`. For results from agent D to agent A, you can use `direction=from-target`. To get both results for both routes, query without the direction parameter. The source will always be agent A and the destination will be agent D, but the direction field will indicate which trace direction you want test results from. + + :param test_id: Test ID (required) + :type test_id: str + :param agent_id: Agent ID (required) + :type agent_id: str + :param round_id: Round ID (required) + :type round_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 direction: Choose the direction for the metrics you want: [`from-target`, `to-target`]. This applies when you're doing bidirectional Agent-to-Agent tests. Omitting the parameter will default the results to both `from-target` and `to-target` values (bidirectional); otherwise, you'll get data for one direction. If you try to get unidirectional test data with an incorrect direction parameter, it will trigger an error response. + :type direction: PathVisDirection + :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_test_path_vis_agent_round_results_serialize( + test_id=test_id, + agent_id=agent_id, + round_id=round_id, + aid=aid, + direction=direction, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PathVisDetailTestResults", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "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.test_results.models, + ).data + + + @validate_call + def get_test_path_vis_agent_round_results_with_http_info( + self, + test_id: Annotated[StrictStr, Field(description="Test ID")], + agent_id: Annotated[StrictStr, Field(description="Agent ID")], + round_id: Annotated[StrictStr, Field(description="Round ID")], + 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, + direction: Annotated[Optional[PathVisDirection], Field(description="Choose the direction for the metrics you want: [`from-target`, `to-target`]. This applies when you're doing bidirectional Agent-to-Agent tests. Omitting the parameter will default the results to both `from-target` and `to-target` values (bidirectional); otherwise, you'll get data for one direction. If you try to get unidirectional test data with an incorrect direction parameter, it will trigger 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[PathVisDetailTestResults]: + """Get path visualization test results by agent and round + + Returns a summary of the path trace data collected during path visualization for a given agent and round. With each attempt, three tries are made to reach the destination. The entire path is displayed in order. Bidirectional agent-to-agent tests also support the `direction` parameter. For example, if agents A, B, and C are testing agent D bidirectionally, and you want results from the route from agent A to agent D, you can use the query `direction=to-target`. For results from agent D to agent A, you can use `direction=from-target`. To get both results for both routes, query without the direction parameter. The source will always be agent A and the destination will be agent D, but the direction field will indicate which trace direction you want test results from. + + :param test_id: Test ID (required) + :type test_id: str + :param agent_id: Agent ID (required) + :type agent_id: str + :param round_id: Round ID (required) + :type round_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 direction: Choose the direction for the metrics you want: [`from-target`, `to-target`]. This applies when you're doing bidirectional Agent-to-Agent tests. Omitting the parameter will default the results to both `from-target` and `to-target` values (bidirectional); otherwise, you'll get data for one direction. If you try to get unidirectional test data with an incorrect direction parameter, it will trigger an error response. + :type direction: PathVisDirection + :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_test_path_vis_agent_round_results_serialize( + test_id=test_id, + agent_id=agent_id, + round_id=round_id, + aid=aid, + direction=direction, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PathVisDetailTestResults", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "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.test_results.models, + ) + + + @validate_call + def get_test_path_vis_agent_round_results_without_preload_content( + self, + test_id: Annotated[StrictStr, Field(description="Test ID")], + agent_id: Annotated[StrictStr, Field(description="Agent ID")], + round_id: Annotated[StrictStr, Field(description="Round ID")], + 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, + direction: Annotated[Optional[PathVisDirection], Field(description="Choose the direction for the metrics you want: [`from-target`, `to-target`]. This applies when you're doing bidirectional Agent-to-Agent tests. Omitting the parameter will default the results to both `from-target` and `to-target` values (bidirectional); otherwise, you'll get data for one direction. If you try to get unidirectional test data with an incorrect direction parameter, it will trigger 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: + """Get path visualization test results by agent and round + + Returns a summary of the path trace data collected during path visualization for a given agent and round. With each attempt, three tries are made to reach the destination. The entire path is displayed in order. Bidirectional agent-to-agent tests also support the `direction` parameter. For example, if agents A, B, and C are testing agent D bidirectionally, and you want results from the route from agent A to agent D, you can use the query `direction=to-target`. For results from agent D to agent A, you can use `direction=from-target`. To get both results for both routes, query without the direction parameter. The source will always be agent A and the destination will be agent D, but the direction field will indicate which trace direction you want test results from. + + :param test_id: Test ID (required) + :type test_id: str + :param agent_id: Agent ID (required) + :type agent_id: str + :param round_id: Round ID (required) + :type round_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 direction: Choose the direction for the metrics you want: [`from-target`, `to-target`]. This applies when you're doing bidirectional Agent-to-Agent tests. Omitting the parameter will default the results to both `from-target` and `to-target` values (bidirectional); otherwise, you'll get data for one direction. If you try to get unidirectional test data with an incorrect direction parameter, it will trigger an error response. + :type direction: PathVisDirection + :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_test_path_vis_agent_round_results_serialize( + test_id=test_id, + agent_id=agent_id, + round_id=round_id, + aid=aid, + direction=direction, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PathVisDetailTestResults", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_test_path_vis_agent_round_results_serialize( + self, + test_id, + agent_id, + round_id, + aid, + direction, + _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 test_id is not None: + _path_params['testId'] = test_id + if agent_id is not None: + _path_params['agentId'] = agent_id + if round_id is not None: + _path_params['roundId'] = round_id + # process the query parameters + if aid is not None: + + _query_params.append(('aid', aid)) + + if direction is not None: + + _query_params.append(('direction', direction.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='/v7/test-results/{testId}/path-vis/agent/{agentId}/round/{roundId}', + 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_test_path_vis_results( self, test_id: Annotated[StrictStr, Field(description="Test ID")], 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, @@ -857,7 +861,7 @@ class NetworkTestMetricsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_result_network_path_vis_serialize( + _param = self._get_test_path_vis_results_serialize( test_id=test_id, aid=aid, window=window, @@ -894,7 +898,7 @@ class NetworkTestMetricsApi: @validate_call - def get_test_result_network_path_vis_with_http_info( + def get_test_path_vis_results_with_http_info( self, test_id: Annotated[StrictStr, Field(description="Test ID")], 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, @@ -956,7 +960,7 @@ class NetworkTestMetricsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_result_network_path_vis_serialize( + _param = self._get_test_path_vis_results_serialize( test_id=test_id, aid=aid, window=window, @@ -993,7 +997,7 @@ class NetworkTestMetricsApi: @validate_call - def get_test_result_network_path_vis_without_preload_content( + def get_test_path_vis_results_without_preload_content( self, test_id: Annotated[StrictStr, Field(description="Test ID")], 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, @@ -1055,7 +1059,7 @@ class NetworkTestMetricsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_result_network_path_vis_serialize( + _param = self._get_test_path_vis_results_serialize( test_id=test_id, aid=aid, window=window, @@ -1086,7 +1090,7 @@ class NetworkTestMetricsApi: return response_data.response - def _get_test_result_network_path_vis_serialize( + def _get_test_path_vis_results_serialize( self, test_id, aid, @@ -1168,6 +1172,7 @@ class NetworkTestMetricsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/voice_rtp_server_test_metrics_api.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/voice_rtp_server_test_metrics_api.py index 38a340cc..8a576625 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/voice_rtp_server_test_metrics_api.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/voice_rtp_server_test_metrics_api.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -27,6 +27,7 @@ from thousandeyes_sdk.test_results.models.rtp_stream_test_results import RtpStre from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class VoiceRTPServerTestMetricsApi: @@ -39,11 +40,12 @@ class VoiceRTPServerTestMetricsApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @validate_call - def get_test_result_rtp_stream( + def get_test_rtp_server_results( self, test_id: Annotated[StrictStr, Field(description="Test ID")], 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, @@ -102,7 +104,7 @@ class VoiceRTPServerTestMetricsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_result_rtp_stream_serialize( + _param = self._get_test_rtp_server_results_serialize( test_id=test_id, aid=aid, window=window, @@ -138,7 +140,7 @@ class VoiceRTPServerTestMetricsApi: @validate_call - def get_test_result_rtp_stream_with_http_info( + def get_test_rtp_server_results_with_http_info( self, test_id: Annotated[StrictStr, Field(description="Test ID")], 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, @@ -197,7 +199,7 @@ class VoiceRTPServerTestMetricsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_result_rtp_stream_serialize( + _param = self._get_test_rtp_server_results_serialize( test_id=test_id, aid=aid, window=window, @@ -233,7 +235,7 @@ class VoiceRTPServerTestMetricsApi: @validate_call - def get_test_result_rtp_stream_without_preload_content( + def get_test_rtp_server_results_without_preload_content( self, test_id: Annotated[StrictStr, Field(description="Test ID")], 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, @@ -292,7 +294,7 @@ class VoiceRTPServerTestMetricsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_result_rtp_stream_serialize( + _param = self._get_test_rtp_server_results_serialize( test_id=test_id, aid=aid, window=window, @@ -322,7 +324,7 @@ class VoiceRTPServerTestMetricsApi: return response_data.response - def _get_test_result_rtp_stream_serialize( + def _get_test_rtp_server_results_serialize( self, test_id, aid, @@ -399,6 +401,7 @@ class VoiceRTPServerTestMetricsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/voice_sip_server_test_metrics_api.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/voice_sip_server_test_metrics_api.py index be5f88b2..16031618 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/voice_sip_server_test_metrics_api.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/voice_sip_server_test_metrics_api.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -27,6 +27,7 @@ from thousandeyes_sdk.test_results.models.sip_server_test_results import SipServ from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class VoiceSIPServerTestMetricsApi: @@ -39,11 +40,12 @@ class VoiceSIPServerTestMetricsApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @validate_call - def get_test_result_sip_server( + def get_test_sip_server_results( self, test_id: Annotated[StrictStr, Field(description="Test ID")], 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, @@ -102,7 +104,7 @@ class VoiceSIPServerTestMetricsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_result_sip_server_serialize( + _param = self._get_test_sip_server_results_serialize( test_id=test_id, aid=aid, window=window, @@ -138,7 +140,7 @@ class VoiceSIPServerTestMetricsApi: @validate_call - def get_test_result_sip_server_with_http_info( + def get_test_sip_server_results_with_http_info( self, test_id: Annotated[StrictStr, Field(description="Test ID")], 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, @@ -197,7 +199,7 @@ class VoiceSIPServerTestMetricsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_result_sip_server_serialize( + _param = self._get_test_sip_server_results_serialize( test_id=test_id, aid=aid, window=window, @@ -233,7 +235,7 @@ class VoiceSIPServerTestMetricsApi: @validate_call - def get_test_result_sip_server_without_preload_content( + def get_test_sip_server_results_without_preload_content( self, test_id: Annotated[StrictStr, Field(description="Test ID")], 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, @@ -292,7 +294,7 @@ class VoiceSIPServerTestMetricsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_result_sip_server_serialize( + _param = self._get_test_sip_server_results_serialize( test_id=test_id, aid=aid, window=window, @@ -322,7 +324,7 @@ class VoiceSIPServerTestMetricsApi: return response_data.response - def _get_test_result_sip_server_serialize( + def _get_test_sip_server_results_serialize( self, test_id, aid, @@ -399,6 +401,7 @@ class VoiceSIPServerTestMetricsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/web_ftp_server_test_metrics_api.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/web_ftp_server_test_metrics_api.py index 357db559..a65d032e 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/web_ftp_server_test_metrics_api.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/web_ftp_server_test_metrics_api.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -27,6 +27,7 @@ from thousandeyes_sdk.test_results.models.ftp_server_test_results import FtpServ from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class WebFTPServerTestMetricsApi: @@ -39,11 +40,12 @@ class WebFTPServerTestMetricsApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @validate_call - def get_test_result_ftp_server( + def get_test_ftp_server_results( self, test_id: Annotated[StrictStr, Field(description="Test ID")], 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, @@ -102,7 +104,7 @@ class WebFTPServerTestMetricsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_result_ftp_server_serialize( + _param = self._get_test_ftp_server_results_serialize( test_id=test_id, aid=aid, window=window, @@ -138,7 +140,7 @@ class WebFTPServerTestMetricsApi: @validate_call - def get_test_result_ftp_server_with_http_info( + def get_test_ftp_server_results_with_http_info( self, test_id: Annotated[StrictStr, Field(description="Test ID")], 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, @@ -197,7 +199,7 @@ class WebFTPServerTestMetricsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_result_ftp_server_serialize( + _param = self._get_test_ftp_server_results_serialize( test_id=test_id, aid=aid, window=window, @@ -233,7 +235,7 @@ class WebFTPServerTestMetricsApi: @validate_call - def get_test_result_ftp_server_without_preload_content( + def get_test_ftp_server_results_without_preload_content( self, test_id: Annotated[StrictStr, Field(description="Test ID")], 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, @@ -292,7 +294,7 @@ class WebFTPServerTestMetricsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_result_ftp_server_serialize( + _param = self._get_test_ftp_server_results_serialize( test_id=test_id, aid=aid, window=window, @@ -322,7 +324,7 @@ class WebFTPServerTestMetricsApi: return response_data.response - def _get_test_result_ftp_server_serialize( + def _get_test_ftp_server_results_serialize( self, test_id, aid, @@ -399,6 +401,7 @@ class WebFTPServerTestMetricsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/web_http_server_test_metrics_api.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/web_http_server_test_metrics_api.py index 4a56f8df..e9639d50 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/web_http_server_test_metrics_api.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/web_http_server_test_metrics_api.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -28,6 +28,7 @@ from thousandeyes_sdk.test_results.models.http_test_results import HttpTestResul from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class WebHTTPServerTestMetricsApi: @@ -40,11 +41,12 @@ class WebHTTPServerTestMetricsApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @validate_call - def get_test_result_http_server( + def get_test_http_server_results( self, test_id: Annotated[StrictStr, Field(description="Test ID")], 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, @@ -106,7 +108,7 @@ class WebHTTPServerTestMetricsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_result_http_server_serialize( + _param = self._get_test_http_server_results_serialize( test_id=test_id, aid=aid, window=window, @@ -143,7 +145,7 @@ class WebHTTPServerTestMetricsApi: @validate_call - def get_test_result_http_server_with_http_info( + def get_test_http_server_results_with_http_info( self, test_id: Annotated[StrictStr, Field(description="Test ID")], 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, @@ -205,7 +207,7 @@ class WebHTTPServerTestMetricsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_result_http_server_serialize( + _param = self._get_test_http_server_results_serialize( test_id=test_id, aid=aid, window=window, @@ -242,7 +244,7 @@ class WebHTTPServerTestMetricsApi: @validate_call - def get_test_result_http_server_without_preload_content( + def get_test_http_server_results_without_preload_content( self, test_id: Annotated[StrictStr, Field(description="Test ID")], 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, @@ -304,7 +306,7 @@ class WebHTTPServerTestMetricsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_result_http_server_serialize( + _param = self._get_test_http_server_results_serialize( test_id=test_id, aid=aid, window=window, @@ -335,7 +337,7 @@ class WebHTTPServerTestMetricsApi: return response_data.response - def _get_test_result_http_server_serialize( + def _get_test_http_server_results_serialize( self, test_id, aid, @@ -418,6 +420,7 @@ class WebHTTPServerTestMetricsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/web_page_load_test_metrics_api.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/web_page_load_test_metrics_api.py index 44035919..acd0a95b 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/web_page_load_test_metrics_api.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/web_page_load_test_metrics_api.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -28,6 +28,7 @@ from thousandeyes_sdk.test_results.models.page_load_test_results import PageLoad from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class WebPageLoadTestMetricsApi: @@ -40,11 +41,342 @@ class WebPageLoadTestMetricsApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @validate_call - def get_test_result_page_load( + def get_test_page_load_agent_round_results( + self, + test_id: Annotated[StrictStr, Field(description="Test ID")], + agent_id: Annotated[StrictStr, Field(description="Agent ID")], + round_id: Annotated[StrictStr, Field(description="Round ID")], + 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, + ) -> PageLoadDetailTestResults: + """Get page load server test results by agent and round + + Returns test results for a given agent and round in [HAR (http archive)](http://www.softwareishard.com/blog/har-12-spec/) format. These results contain a list of components and their load times in a page load test, similar to the waterfall view for a page load test. + + :param test_id: Test ID (required) + :type test_id: str + :param agent_id: Agent ID (required) + :type agent_id: str + :param round_id: Round ID (required) + :type round_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 + 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_test_page_load_agent_round_results_serialize( + test_id=test_id, + agent_id=agent_id, + round_id=round_id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PageLoadDetailTestResults", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "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.test_results.models, + ).data + + + @validate_call + def get_test_page_load_agent_round_results_with_http_info( + self, + test_id: Annotated[StrictStr, Field(description="Test ID")], + agent_id: Annotated[StrictStr, Field(description="Agent ID")], + round_id: Annotated[StrictStr, Field(description="Round ID")], + 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[PageLoadDetailTestResults]: + """Get page load server test results by agent and round + + Returns test results for a given agent and round in [HAR (http archive)](http://www.softwareishard.com/blog/har-12-spec/) format. These results contain a list of components and their load times in a page load test, similar to the waterfall view for a page load test. + + :param test_id: Test ID (required) + :type test_id: str + :param agent_id: Agent ID (required) + :type agent_id: str + :param round_id: Round ID (required) + :type round_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 + 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_test_page_load_agent_round_results_serialize( + test_id=test_id, + agent_id=agent_id, + round_id=round_id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PageLoadDetailTestResults", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "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.test_results.models, + ) + + + @validate_call + def get_test_page_load_agent_round_results_without_preload_content( + self, + test_id: Annotated[StrictStr, Field(description="Test ID")], + agent_id: Annotated[StrictStr, Field(description="Agent ID")], + round_id: Annotated[StrictStr, Field(description="Round ID")], + 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: + """Get page load server test results by agent and round + + Returns test results for a given agent and round in [HAR (http archive)](http://www.softwareishard.com/blog/har-12-spec/) format. These results contain a list of components and their load times in a page load test, similar to the waterfall view for a page load test. + + :param test_id: Test ID (required) + :type test_id: str + :param agent_id: Agent ID (required) + :type agent_id: str + :param round_id: Round ID (required) + :type round_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 + 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_test_page_load_agent_round_results_serialize( + test_id=test_id, + agent_id=agent_id, + round_id=round_id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PageLoadDetailTestResults", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_test_page_load_agent_round_results_serialize( + self, + test_id, + agent_id, + round_id, + 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 + if test_id is not None: + _path_params['testId'] = test_id + if agent_id is not None: + _path_params['agentId'] = agent_id + if round_id is not None: + _path_params['roundId'] = round_id + # 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='/v7/test-results/{testId}/page-load/agent/{agentId}/round/{roundId}', + 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_test_page_load_results( self, test_id: Annotated[StrictStr, Field(description="Test ID")], 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, @@ -103,7 +435,7 @@ class WebPageLoadTestMetricsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_result_page_load_serialize( + _param = self._get_test_page_load_results_serialize( test_id=test_id, aid=aid, window=window, @@ -139,7 +471,7 @@ class WebPageLoadTestMetricsApi: @validate_call - def get_test_result_page_load_with_http_info( + def get_test_page_load_results_with_http_info( self, test_id: Annotated[StrictStr, Field(description="Test ID")], 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, @@ -198,7 +530,7 @@ class WebPageLoadTestMetricsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_result_page_load_serialize( + _param = self._get_test_page_load_results_serialize( test_id=test_id, aid=aid, window=window, @@ -234,7 +566,7 @@ class WebPageLoadTestMetricsApi: @validate_call - def get_test_result_page_load_without_preload_content( + def get_test_page_load_results_without_preload_content( self, test_id: Annotated[StrictStr, Field(description="Test ID")], 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, @@ -293,7 +625,7 @@ class WebPageLoadTestMetricsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_result_page_load_serialize( + _param = self._get_test_page_load_results_serialize( test_id=test_id, aid=aid, window=window, @@ -323,7 +655,7 @@ class WebPageLoadTestMetricsApi: return response_data.response - def _get_test_result_page_load_serialize( + def _get_test_page_load_results_serialize( self, test_id, aid, @@ -400,6 +732,7 @@ class WebPageLoadTestMetricsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -426,332 +759,3 @@ class WebPageLoadTestMetricsApi: ) - - - @validate_call - def get_test_result_page_load_component_detail( - self, - test_id: Annotated[StrictStr, Field(description="Test ID")], - agent_id: Annotated[StrictStr, Field(description="Agent ID")], - round_id: Annotated[StrictStr, Field(description="Round ID")], - 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, - ) -> PageLoadDetailTestResults: - """Get page load server test results by agent and round - - Returns test results for a given agent and round in [HAR (http archive)](http://www.softwareishard.com/blog/har-12-spec/) format. These results contain a list of components and their load times in a page load test, similar to the waterfall view for a page load test. - - :param test_id: Test ID (required) - :type test_id: str - :param agent_id: Agent ID (required) - :type agent_id: str - :param round_id: Round ID (required) - :type round_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 - 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_test_result_page_load_component_detail_serialize( - test_id=test_id, - agent_id=agent_id, - round_id=round_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "PageLoadDetailTestResults", - '400': "ValidationError", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "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.test_results.models, - ).data - - - @validate_call - def get_test_result_page_load_component_detail_with_http_info( - self, - test_id: Annotated[StrictStr, Field(description="Test ID")], - agent_id: Annotated[StrictStr, Field(description="Agent ID")], - round_id: Annotated[StrictStr, Field(description="Round ID")], - 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[PageLoadDetailTestResults]: - """Get page load server test results by agent and round - - Returns test results for a given agent and round in [HAR (http archive)](http://www.softwareishard.com/blog/har-12-spec/) format. These results contain a list of components and their load times in a page load test, similar to the waterfall view for a page load test. - - :param test_id: Test ID (required) - :type test_id: str - :param agent_id: Agent ID (required) - :type agent_id: str - :param round_id: Round ID (required) - :type round_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 - 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_test_result_page_load_component_detail_serialize( - test_id=test_id, - agent_id=agent_id, - round_id=round_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "PageLoadDetailTestResults", - '400': "ValidationError", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "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.test_results.models, - ) - - - @validate_call - def get_test_result_page_load_component_detail_without_preload_content( - self, - test_id: Annotated[StrictStr, Field(description="Test ID")], - agent_id: Annotated[StrictStr, Field(description="Agent ID")], - round_id: Annotated[StrictStr, Field(description="Round ID")], - 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: - """Get page load server test results by agent and round - - Returns test results for a given agent and round in [HAR (http archive)](http://www.softwareishard.com/blog/har-12-spec/) format. These results contain a list of components and their load times in a page load test, similar to the waterfall view for a page load test. - - :param test_id: Test ID (required) - :type test_id: str - :param agent_id: Agent ID (required) - :type agent_id: str - :param round_id: Round ID (required) - :type round_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 - 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_test_result_page_load_component_detail_serialize( - test_id=test_id, - agent_id=agent_id, - round_id=round_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "PageLoadDetailTestResults", - '400': "ValidationError", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_test_result_page_load_component_detail_serialize( - self, - test_id, - agent_id, - round_id, - 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 - if test_id is not None: - _path_params['testId'] = test_id - if agent_id is not None: - _path_params['agentId'] = agent_id - if round_id is not None: - _path_params['roundId'] = round_id - # 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/problem+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v7/test-results/{testId}/page-load/agent/{agentId}/round/{roundId}', - 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 - ) - - diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/web_transactions_test_metrics_api.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/web_transactions_test_metrics_api.py index faacaa88..0356e63b 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/web_transactions_test_metrics_api.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/api/web_transactions_test_metrics_api.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -29,6 +29,7 @@ from thousandeyes_sdk.test_results.models.web_transaction_test_results import We from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class WebTransactionsTestMetricsApi: @@ -41,11 +42,687 @@ class WebTransactionsTestMetricsApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @validate_call - def get_test_result_web_transactions( + def get_test_web_transaction_agent_round_page_results( + self, + test_id: Annotated[StrictStr, Field(description="Test ID")], + agent_id: Annotated[StrictStr, Field(description="Agent ID")], + round_id: Annotated[StrictStr, Field(description="Round ID")], + page_id: Annotated[StrictStr, Field(description="Web page ID")], + 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, + ) -> WebTransactionPageDetailTestResults: + """Get detailed web transactions test result by agent, round, and page + + Returns a page of web transaction test results for an agent and round. + + :param test_id: Test ID (required) + :type test_id: str + :param agent_id: Agent ID (required) + :type agent_id: str + :param round_id: Round ID (required) + :type round_id: str + :param page_id: Web page ID (required) + :type page_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 + 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_test_web_transaction_agent_round_page_results_serialize( + test_id=test_id, + agent_id=agent_id, + round_id=round_id, + page_id=page_id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebTransactionPageDetailTestResults", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "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.test_results.models, + ).data + + + @validate_call + def get_test_web_transaction_agent_round_page_results_with_http_info( + self, + test_id: Annotated[StrictStr, Field(description="Test ID")], + agent_id: Annotated[StrictStr, Field(description="Agent ID")], + round_id: Annotated[StrictStr, Field(description="Round ID")], + page_id: Annotated[StrictStr, Field(description="Web page ID")], + 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[WebTransactionPageDetailTestResults]: + """Get detailed web transactions test result by agent, round, and page + + Returns a page of web transaction test results for an agent and round. + + :param test_id: Test ID (required) + :type test_id: str + :param agent_id: Agent ID (required) + :type agent_id: str + :param round_id: Round ID (required) + :type round_id: str + :param page_id: Web page ID (required) + :type page_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 + 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_test_web_transaction_agent_round_page_results_serialize( + test_id=test_id, + agent_id=agent_id, + round_id=round_id, + page_id=page_id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebTransactionPageDetailTestResults", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "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.test_results.models, + ) + + + @validate_call + def get_test_web_transaction_agent_round_page_results_without_preload_content( + self, + test_id: Annotated[StrictStr, Field(description="Test ID")], + agent_id: Annotated[StrictStr, Field(description="Agent ID")], + round_id: Annotated[StrictStr, Field(description="Round ID")], + page_id: Annotated[StrictStr, Field(description="Web page ID")], + 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: + """Get detailed web transactions test result by agent, round, and page + + Returns a page of web transaction test results for an agent and round. + + :param test_id: Test ID (required) + :type test_id: str + :param agent_id: Agent ID (required) + :type agent_id: str + :param round_id: Round ID (required) + :type round_id: str + :param page_id: Web page ID (required) + :type page_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 + 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_test_web_transaction_agent_round_page_results_serialize( + test_id=test_id, + agent_id=agent_id, + round_id=round_id, + page_id=page_id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebTransactionPageDetailTestResults", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_test_web_transaction_agent_round_page_results_serialize( + self, + test_id, + agent_id, + round_id, + page_id, + 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 + if test_id is not None: + _path_params['testId'] = test_id + if agent_id is not None: + _path_params['agentId'] = agent_id + if round_id is not None: + _path_params['roundId'] = round_id + if page_id is not None: + _path_params['pageId'] = page_id + # 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='/v7/test-results/{testId}/web-transactions/agent/{agentId}/round/{roundId}/page/{pageId}', + 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_test_web_transaction_agent_round_results( + self, + test_id: Annotated[StrictStr, Field(description="Test ID")], + agent_id: Annotated[StrictStr, Field(description="Agent ID")], + round_id: Annotated[StrictStr, Field(description="Round ID")], + 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, + ) -> WebTransactionDetailTestResults: + """Get web transactions test results by agent and round + + Returns test results for web transactions for a given agent and round. + + :param test_id: Test ID (required) + :type test_id: str + :param agent_id: Agent ID (required) + :type agent_id: str + :param round_id: Round ID (required) + :type round_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 + 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_test_web_transaction_agent_round_results_serialize( + test_id=test_id, + agent_id=agent_id, + round_id=round_id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebTransactionDetailTestResults", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "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.test_results.models, + ).data + + + @validate_call + def get_test_web_transaction_agent_round_results_with_http_info( + self, + test_id: Annotated[StrictStr, Field(description="Test ID")], + agent_id: Annotated[StrictStr, Field(description="Agent ID")], + round_id: Annotated[StrictStr, Field(description="Round ID")], + 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[WebTransactionDetailTestResults]: + """Get web transactions test results by agent and round + + Returns test results for web transactions for a given agent and round. + + :param test_id: Test ID (required) + :type test_id: str + :param agent_id: Agent ID (required) + :type agent_id: str + :param round_id: Round ID (required) + :type round_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 + 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_test_web_transaction_agent_round_results_serialize( + test_id=test_id, + agent_id=agent_id, + round_id=round_id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebTransactionDetailTestResults", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "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.test_results.models, + ) + + + @validate_call + def get_test_web_transaction_agent_round_results_without_preload_content( + self, + test_id: Annotated[StrictStr, Field(description="Test ID")], + agent_id: Annotated[StrictStr, Field(description="Agent ID")], + round_id: Annotated[StrictStr, Field(description="Round ID")], + 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: + """Get web transactions test results by agent and round + + Returns test results for web transactions for a given agent and round. + + :param test_id: Test ID (required) + :type test_id: str + :param agent_id: Agent ID (required) + :type agent_id: str + :param round_id: Round ID (required) + :type round_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 + 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_test_web_transaction_agent_round_results_serialize( + test_id=test_id, + agent_id=agent_id, + round_id=round_id, + aid=aid, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebTransactionDetailTestResults", + '400': "ValidationError", + '401': "UnauthorizedError", + '403': "Error", + '404': "Error", + '429': "Error", + '500': "Error", + '502': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_test_web_transaction_agent_round_results_serialize( + self, + test_id, + agent_id, + round_id, + 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 + if test_id is not None: + _path_params['testId'] = test_id + if agent_id is not None: + _path_params['agentId'] = agent_id + if round_id is not None: + _path_params['roundId'] = round_id + # 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='/v7/test-results/{testId}/web-transactions/agent/{agentId}/round/{roundId}', + 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_test_web_transaction_results( self, test_id: Annotated[StrictStr, Field(description="Test ID")], 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, @@ -104,7 +781,7 @@ class WebTransactionsTestMetricsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_result_web_transactions_serialize( + _param = self._get_test_web_transaction_results_serialize( test_id=test_id, aid=aid, window=window, @@ -140,7 +817,7 @@ class WebTransactionsTestMetricsApi: @validate_call - def get_test_result_web_transactions_with_http_info( + def get_test_web_transaction_results_with_http_info( self, test_id: Annotated[StrictStr, Field(description="Test ID")], 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, @@ -199,7 +876,7 @@ class WebTransactionsTestMetricsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_result_web_transactions_serialize( + _param = self._get_test_web_transaction_results_serialize( test_id=test_id, aid=aid, window=window, @@ -235,7 +912,7 @@ class WebTransactionsTestMetricsApi: @validate_call - def get_test_result_web_transactions_without_preload_content( + def get_test_web_transaction_results_without_preload_content( self, test_id: Annotated[StrictStr, Field(description="Test ID")], 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, @@ -294,7 +971,7 @@ class WebTransactionsTestMetricsApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_result_web_transactions_serialize( + _param = self._get_test_web_transaction_results_serialize( test_id=test_id, aid=aid, window=window, @@ -324,7 +1001,7 @@ class WebTransactionsTestMetricsApi: return response_data.response - def _get_test_result_web_transactions_serialize( + def _get_test_web_transaction_results_serialize( self, test_id, aid, @@ -401,6 +1078,7 @@ class WebTransactionsTestMetricsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -427,676 +1105,3 @@ class WebTransactionsTestMetricsApi: ) - - - @validate_call - def get_test_result_web_transactions_component_detail( - self, - test_id: Annotated[StrictStr, Field(description="Test ID")], - agent_id: Annotated[StrictStr, Field(description="Agent ID")], - round_id: Annotated[StrictStr, Field(description="Round ID")], - 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, - ) -> WebTransactionDetailTestResults: - """Get web transactions test results by agent and round - - Returns test results for web transactions for a given agent and round. - - :param test_id: Test ID (required) - :type test_id: str - :param agent_id: Agent ID (required) - :type agent_id: str - :param round_id: Round ID (required) - :type round_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 - 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_test_result_web_transactions_component_detail_serialize( - test_id=test_id, - agent_id=agent_id, - round_id=round_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "WebTransactionDetailTestResults", - '400': "ValidationError", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "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.test_results.models, - ).data - - - @validate_call - def get_test_result_web_transactions_component_detail_with_http_info( - self, - test_id: Annotated[StrictStr, Field(description="Test ID")], - agent_id: Annotated[StrictStr, Field(description="Agent ID")], - round_id: Annotated[StrictStr, Field(description="Round ID")], - 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[WebTransactionDetailTestResults]: - """Get web transactions test results by agent and round - - Returns test results for web transactions for a given agent and round. - - :param test_id: Test ID (required) - :type test_id: str - :param agent_id: Agent ID (required) - :type agent_id: str - :param round_id: Round ID (required) - :type round_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 - 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_test_result_web_transactions_component_detail_serialize( - test_id=test_id, - agent_id=agent_id, - round_id=round_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "WebTransactionDetailTestResults", - '400': "ValidationError", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "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.test_results.models, - ) - - - @validate_call - def get_test_result_web_transactions_component_detail_without_preload_content( - self, - test_id: Annotated[StrictStr, Field(description="Test ID")], - agent_id: Annotated[StrictStr, Field(description="Agent ID")], - round_id: Annotated[StrictStr, Field(description="Round ID")], - 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: - """Get web transactions test results by agent and round - - Returns test results for web transactions for a given agent and round. - - :param test_id: Test ID (required) - :type test_id: str - :param agent_id: Agent ID (required) - :type agent_id: str - :param round_id: Round ID (required) - :type round_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 - 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_test_result_web_transactions_component_detail_serialize( - test_id=test_id, - agent_id=agent_id, - round_id=round_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "WebTransactionDetailTestResults", - '400': "ValidationError", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_test_result_web_transactions_component_detail_serialize( - self, - test_id, - agent_id, - round_id, - 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 - if test_id is not None: - _path_params['testId'] = test_id - if agent_id is not None: - _path_params['agentId'] = agent_id - if round_id is not None: - _path_params['roundId'] = round_id - # 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/problem+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v7/test-results/{testId}/web-transactions/agent/{agentId}/round/{roundId}', - 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_test_result_web_transactions_component_page_detail( - self, - test_id: Annotated[StrictStr, Field(description="Test ID")], - agent_id: Annotated[StrictStr, Field(description="Agent ID")], - round_id: Annotated[StrictStr, Field(description="Round ID")], - page_id: Annotated[StrictStr, Field(description="Web page ID")], - 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, - ) -> WebTransactionPageDetailTestResults: - """Get detailed web transactions test result by agent, round, and page - - Returns a page of web transaction test results for an agent and round. - - :param test_id: Test ID (required) - :type test_id: str - :param agent_id: Agent ID (required) - :type agent_id: str - :param round_id: Round ID (required) - :type round_id: str - :param page_id: Web page ID (required) - :type page_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 - 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_test_result_web_transactions_component_page_detail_serialize( - test_id=test_id, - agent_id=agent_id, - round_id=round_id, - page_id=page_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "WebTransactionPageDetailTestResults", - '400': "ValidationError", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "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.test_results.models, - ).data - - - @validate_call - def get_test_result_web_transactions_component_page_detail_with_http_info( - self, - test_id: Annotated[StrictStr, Field(description="Test ID")], - agent_id: Annotated[StrictStr, Field(description="Agent ID")], - round_id: Annotated[StrictStr, Field(description="Round ID")], - page_id: Annotated[StrictStr, Field(description="Web page ID")], - 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[WebTransactionPageDetailTestResults]: - """Get detailed web transactions test result by agent, round, and page - - Returns a page of web transaction test results for an agent and round. - - :param test_id: Test ID (required) - :type test_id: str - :param agent_id: Agent ID (required) - :type agent_id: str - :param round_id: Round ID (required) - :type round_id: str - :param page_id: Web page ID (required) - :type page_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 - 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_test_result_web_transactions_component_page_detail_serialize( - test_id=test_id, - agent_id=agent_id, - round_id=round_id, - page_id=page_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "WebTransactionPageDetailTestResults", - '400': "ValidationError", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "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.test_results.models, - ) - - - @validate_call - def get_test_result_web_transactions_component_page_detail_without_preload_content( - self, - test_id: Annotated[StrictStr, Field(description="Test ID")], - agent_id: Annotated[StrictStr, Field(description="Agent ID")], - round_id: Annotated[StrictStr, Field(description="Round ID")], - page_id: Annotated[StrictStr, Field(description="Web page ID")], - 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: - """Get detailed web transactions test result by agent, round, and page - - Returns a page of web transaction test results for an agent and round. - - :param test_id: Test ID (required) - :type test_id: str - :param agent_id: Agent ID (required) - :type agent_id: str - :param round_id: Round ID (required) - :type round_id: str - :param page_id: Web page ID (required) - :type page_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 - 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_test_result_web_transactions_component_page_detail_serialize( - test_id=test_id, - agent_id=agent_id, - round_id=round_id, - page_id=page_id, - aid=aid, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "WebTransactionPageDetailTestResults", - '400': "ValidationError", - '401': "UnauthorizedError", - '403': "Error", - '404': "Error", - '429': "Error", - '500': "Error", - '502': "Error", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_test_result_web_transactions_component_page_detail_serialize( - self, - test_id, - agent_id, - round_id, - page_id, - 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 - if test_id is not None: - _path_params['testId'] = test_id - if agent_id is not None: - _path_params['agentId'] = agent_id - if round_id is not None: - _path_params['roundId'] = round_id - if page_id is not None: - _path_params['pageId'] = page_id - # 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/problem+json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v7/test-results/{testId}/web-transactions/agent/{agentId}/round/{roundId}/page/{pageId}', - 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 - ) - - diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/__init__.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/__init__.py index 291b963f..7552f01a 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/__init__.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/__init__.py @@ -6,7 +6,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/agent.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/agent.py index 3bff9a6f..1fb23dce 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/agent.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/agent.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class Agent(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class Agent(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/api_detail_test_result.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/api_detail_test_result.py index 70b5b31e..5c727332 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/api_detail_test_result.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/api_detail_test_result.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -33,18 +33,21 @@ class ApiDetailTestResult(BaseModel): var_date: Optional[datetime] = Field(default=None, description="Data point date UTC (ISO date-time format).", alias="date") round_id: Optional[StrictInt] = Field(default=None, description="Epoch time (seconds) indicating the start time of the round", alias="roundId") links: Optional[TestResultAppLinks] = Field(default=None, alias="_links") + start_time: Optional[StrictInt] = Field(default=None, description="Epoch time (seconds) indicating the start time of the round", alias="startTime") + end_time: Optional[StrictInt] = Field(default=None, description="Epoch time (seconds) indicating the end time of the round", alias="endTime") agent: Optional[Agent] = None api_transaction_time: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Elapsed execution time of the API steps.", alias="apiTransactionTime") completion: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Percentage of steps which completed successfully and passed assertions.") error_type: Optional[StrictStr] = Field(default=None, description="Type of error encountered.", alias="errorType") error_details: Optional[StrictStr] = Field(default=None, description="Error details, if an error were encountered", alias="errorDetails") requests: Optional[List[ApiRequestDetail]] = None - __properties: ClassVar[List[str]] = ["date", "roundId", "_links", "agent", "apiTransactionTime", "completion", "errorType", "errorDetails", "requests"] + __properties: ClassVar[List[str]] = ["date", "roundId", "_links", "startTime", "endTime", "agent", "apiTransactionTime", "completion", "errorType", "errorDetails", "requests"] model_config = ConfigDict( populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -55,7 +58,7 @@ class ApiDetailTestResult(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -77,10 +80,14 @@ class ApiDetailTestResult(BaseModel): * 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([ "var_date", "round_id", + "start_time", + "end_time", "api_transaction_time", "completion", "error_type", @@ -120,6 +127,8 @@ class ApiDetailTestResult(BaseModel): "date": obj.get("date"), "roundId": obj.get("roundId"), "_links": TestResultAppLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "startTime": obj.get("startTime"), + "endTime": obj.get("endTime"), "agent": Agent.from_dict(obj["agent"]) if obj.get("agent") is not None else None, "apiTransactionTime": obj.get("apiTransactionTime"), "completion": obj.get("completion"), diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/api_detail_test_results.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/api_detail_test_results.py index 2fddc7c0..849b7383 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/api_detail_test_results.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/api_detail_test_results.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -38,6 +38,7 @@ class ApiDetailTestResults(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -48,7 +49,7 @@ class ApiDetailTestResults(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/api_request_detail.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/api_request_detail.py index d8a97dae..6dc7932b 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/api_request_detail.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/api_request_detail.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -49,6 +49,7 @@ class ApiRequestDetail(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -59,7 +60,7 @@ class ApiRequestDetail(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/api_request_detail_assertion.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/api_request_detail_assertion.py index 08d09393..e9369838 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/api_request_detail_assertion.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/api_request_detail_assertion.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class ApiRequestDetailAssertion(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class ApiRequestDetailAssertion(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/api_test_result.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/api_test_result.py index ea453c22..73d5c2b8 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/api_test_result.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/api_test_result.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -32,17 +32,20 @@ class ApiTestResult(BaseModel): var_date: Optional[datetime] = Field(default=None, description="Data point date UTC (ISO date-time format).", alias="date") round_id: Optional[StrictInt] = Field(default=None, description="Epoch time (seconds) indicating the start time of the round", alias="roundId") links: Optional[TestResultAppLinks] = Field(default=None, alias="_links") + start_time: Optional[StrictInt] = Field(default=None, description="Epoch time (seconds) indicating the start time of the round", alias="startTime") + end_time: Optional[StrictInt] = Field(default=None, description="Epoch time (seconds) indicating the end time of the round", alias="endTime") agent: Optional[Agent] = None api_transaction_time: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Elapsed execution time of the API steps.", alias="apiTransactionTime") completion: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Percentage of steps which completed successfully and passed assertions.") error_type: Optional[StrictStr] = Field(default=None, description="Type of error encountered.", alias="errorType") error_details: Optional[StrictStr] = Field(default=None, description="Error details, if an error were encountered", alias="errorDetails") - __properties: ClassVar[List[str]] = ["date", "roundId", "_links", "agent", "apiTransactionTime", "completion", "errorType", "errorDetails"] + __properties: ClassVar[List[str]] = ["date", "roundId", "_links", "startTime", "endTime", "agent", "apiTransactionTime", "completion", "errorType", "errorDetails"] model_config = ConfigDict( populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -53,7 +56,7 @@ class ApiTestResult(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -75,10 +78,14 @@ class ApiTestResult(BaseModel): * 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([ "var_date", "round_id", + "start_time", + "end_time", "api_transaction_time", "completion", "error_type", @@ -111,6 +118,8 @@ class ApiTestResult(BaseModel): "date": obj.get("date"), "roundId": obj.get("roundId"), "_links": TestResultAppLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None, + "startTime": obj.get("startTime"), + "endTime": obj.get("endTime"), "agent": Agent.from_dict(obj["agent"]) if obj.get("agent") is not None else None, "apiTransactionTime": obj.get("apiTransactionTime"), "completion": obj.get("completion"), diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/api_test_results.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/api_test_results.py index 0d6b03c9..cea2a436 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/api_test_results.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/api_test_results.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -41,6 +41,7 @@ class ApiTestResults(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -51,7 +52,7 @@ class ApiTestResults(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/app_links.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/app_links.py index 4e60cdc6..b319a432 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/app_links.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/app_links.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class AppLinks(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class AppLinks(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/bgp_basic_test_result.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/bgp_basic_test_result.py index 3cb15fae..8d943721 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/bgp_basic_test_result.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/bgp_basic_test_result.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -41,6 +41,7 @@ class BgpBasicTestResult(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -51,7 +52,7 @@ class BgpBasicTestResult(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/bgp_hop.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/bgp_hop.py index ddd6dc5f..921ae8e3 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/bgp_hop.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/bgp_hop.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,8 +17,8 @@ import pprint import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union +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 BgpHop(BaseModel): """ BgpHop """ # noqa: E501 - asn: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="ASN of transit autonomous system") + asn: Optional[StrictInt] = Field(default=None, description="ASN of transit autonomous system") as_name: Optional[StrictStr] = Field(default=None, description="Name of autonomous system.", alias="asName") __properties: ClassVar[List[str]] = ["asn", "asName"] @@ -34,6 +34,7 @@ class BgpHop(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class BgpHop(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/bgp_test_result.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/bgp_test_result.py index 920db445..c7ff67f0 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/bgp_test_result.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/bgp_test_result.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -46,6 +46,7 @@ class BgpTestResult(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -56,7 +57,7 @@ class BgpTestResult(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/bgp_test_results.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/bgp_test_results.py index 7f14720b..861e8751 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/bgp_test_results.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/bgp_test_results.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -41,6 +41,7 @@ class BgpTestResults(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -51,7 +52,7 @@ class BgpTestResults(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/bgp_test_route_information_result.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/bgp_test_route_information_result.py index b54fd591..e8256a5f 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/bgp_test_route_information_result.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/bgp_test_route_information_result.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -44,6 +44,7 @@ class BgpTestRouteInformationResult(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -54,7 +55,7 @@ class BgpTestRouteInformationResult(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/bgp_test_route_information_results.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/bgp_test_route_information_results.py index a621d032..ecd48096 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/bgp_test_route_information_results.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/bgp_test_route_information_results.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -38,6 +38,7 @@ class BgpTestRouteInformationResults(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -48,7 +49,7 @@ class BgpTestRouteInformationResults(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/dns_server_test_result.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/dns_server_test_result.py index 6df91402..36a5f135 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/dns_server_test_result.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/dns_server_test_result.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -46,6 +46,7 @@ class DnsServerTestResult(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -56,7 +57,7 @@ class DnsServerTestResult(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/dns_server_test_results.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/dns_server_test_results.py index ff517014..49419a09 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/dns_server_test_results.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/dns_server_test_results.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -41,6 +41,7 @@ class DnsServerTestResults(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -51,7 +52,7 @@ class DnsServerTestResults(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/dns_trace_test_result.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/dns_trace_test_result.py index f014fb1a..a50f85df 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/dns_trace_test_result.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/dns_trace_test_result.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -48,6 +48,7 @@ class DnsTraceTestResult(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -58,7 +59,7 @@ class DnsTraceTestResult(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/dns_trace_test_results.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/dns_trace_test_results.py index 1d7e7a9a..99c7b7af 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/dns_trace_test_results.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/dns_trace_test_results.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -41,6 +41,7 @@ class DnsTraceTestResults(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -51,7 +52,7 @@ class DnsTraceTestResults(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/dnssec_test_result.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/dnssec_test_result.py index cfe4f77d..9cff3764 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/dnssec_test_result.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/dnssec_test_result.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -43,6 +43,7 @@ class DnssecTestResult(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -53,7 +54,7 @@ class DnssecTestResult(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/dnssec_test_results.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/dnssec_test_results.py index 760b1b1b..f0a09e7a 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/dnssec_test_results.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/dnssec_test_results.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -41,6 +41,7 @@ class DnssecTestResults(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -51,7 +52,7 @@ class DnssecTestResults(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/epoch_time_window.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/epoch_time_window.py index 1feb6759..b7ca0f19 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/epoch_time_window.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/epoch_time_window.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class EpochTimeWindow(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class EpochTimeWindow(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/error.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/error.py index 0eeede5b..7da75e30 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/error.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/error.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -37,6 +37,7 @@ class Error(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -47,7 +48,7 @@ class Error(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/expand.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/expand.py index 0ab72b25..11731880 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/expand.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/expand.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/ftp_server_test_result.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/ftp_server_test_result.py index eeda6ae9..e3512533 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/ftp_server_test_result.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/ftp_server_test_result.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -43,17 +43,18 @@ class FtpServerTestResult(BaseModel): wait_time: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Time elapsed between completion of request and first byte of response in milliseconds", alias="waitTime") response_time: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Sum of DNS, connect, negotiation and wait times in milliseconds", alias="responseTime") transfer_time: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Elapsed time between first and last byte of the transfer in milliseconds", alias="transferTime") - wire_size: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Size of content in bytes", alias="wireSize") + wire_size: Optional[StrictInt] = Field(default=None, description="Size of content in bytes", alias="wireSize") total_time: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Sum of response + transfer time in milliseconds", alias="totalTime") error_type: Optional[StrictStr] = Field(default=None, description="Type of error encountered; corresponds to phase of connection", alias="errorType") error_details: Optional[StrictStr] = Field(default=None, description="Error details, if an error were encountered", alias="errorDetails") - throughput: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="WireSize divided by receiveTime in byter per second") + throughput: Optional[StrictInt] = Field(default=None, description="WireSize divided by receiveTime in byter per second") __properties: ClassVar[List[str]] = ["date", "roundId", "_links", "startTime", "endTime", "agent", "serverIp", "responseCode", "dnsTime", "connectTime", "negotiationTime", "waitTime", "responseTime", "transferTime", "wireSize", "totalTime", "errorType", "errorDetails", "throughput"] model_config = ConfigDict( populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -64,7 +65,7 @@ class FtpServerTestResult(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/ftp_server_test_results.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/ftp_server_test_results.py index 463bac05..13f5b7c9 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/ftp_server_test_results.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/ftp_server_test_results.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -41,6 +41,7 @@ class FtpServerTestResults(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -51,7 +52,7 @@ class FtpServerTestResults(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/http_test_result.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/http_test_result.py index 296e35df..81478113 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/http_test_result.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/http_test_result.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -62,6 +62,7 @@ class HttpTestResult(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -72,7 +73,7 @@ class HttpTestResult(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/http_test_result_headers.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/http_test_result_headers.py index cda98ee1..7c31aabe 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/http_test_result_headers.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/http_test_result_headers.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class HttpTestResultHeaders(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class HttpTestResultHeaders(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/http_test_results.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/http_test_results.py index 046e7d71..f7c4c7ab 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/http_test_results.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/http_test_results.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -41,6 +41,7 @@ class HttpTestResults(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -51,7 +52,7 @@ class HttpTestResults(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/link.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/link.py index aa665bbd..57274906 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/link.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/link.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -40,6 +40,7 @@ class Link(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -50,7 +51,7 @@ class Link(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/marker.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/marker.py index c41561e9..ecf38466 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/marker.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/marker.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class Marker(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class Marker(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/monitor.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/monitor.py index 866f2c6f..c8bbd8af 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/monitor.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/monitor.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class Monitor(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class Monitor(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/network_test_result.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/network_test_result.py index 13f9d7ad..b833c878 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/network_test_result.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/network_test_result.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -54,6 +54,7 @@ class NetworkTestResult(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -64,7 +65,7 @@ class NetworkTestResult(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/network_test_results.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/network_test_results.py index de52a1ab..86576845 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/network_test_results.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/network_test_results.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -41,6 +41,7 @@ class NetworkTestResults(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -51,7 +52,7 @@ class NetworkTestResults(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/page.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/page.py index 257d68d7..bb568e5d 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/page.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/page.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -37,6 +37,7 @@ class Page(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -47,7 +48,7 @@ class Page(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/page_load_detail_test_result.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/page_load_detail_test_result.py index efe211aa..b3a89660 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/page_load_detail_test_result.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/page_load_detail_test_result.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -48,6 +48,7 @@ class PageLoadDetailTestResult(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -58,7 +59,7 @@ class PageLoadDetailTestResult(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/page_load_detail_test_results.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/page_load_detail_test_results.py index 41a33138..42d6a9b4 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/page_load_detail_test_results.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/page_load_detail_test_results.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -38,6 +38,7 @@ class PageLoadDetailTestResults(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -48,7 +49,7 @@ class PageLoadDetailTestResults(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/page_load_test_result.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/page_load_test_result.py index 640b95d6..20f6103a 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/page_load_test_result.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/page_load_test_result.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -47,6 +47,7 @@ class PageLoadTestResult(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -57,7 +58,7 @@ class PageLoadTestResult(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/page_load_test_results.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/page_load_test_results.py index 9476bf7a..1fb95507 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/page_load_test_results.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/page_load_test_results.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -41,6 +41,7 @@ class PageLoadTestResults(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -51,7 +52,7 @@ class PageLoadTestResults(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/pagination_links.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/pagination_links.py index 4d325212..53713eb3 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/pagination_links.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/pagination_links.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class PaginationLinks(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class PaginationLinks(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/path_vis_base_test_result.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/path_vis_base_test_result.py index 9a7ea3fe..9ef9c9f6 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/path_vis_base_test_result.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/path_vis_base_test_result.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -48,6 +48,7 @@ class PathVisBaseTestResult(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -58,7 +59,7 @@ class PathVisBaseTestResult(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/path_vis_detail_test_result.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/path_vis_detail_test_result.py index ed1d4206..f00ed557 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/path_vis_detail_test_result.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/path_vis_detail_test_result.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -50,6 +50,7 @@ class PathVisDetailTestResult(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -60,7 +61,7 @@ class PathVisDetailTestResult(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/path_vis_detail_test_results.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/path_vis_detail_test_results.py index 5ea87ca8..7cf29b6c 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/path_vis_detail_test_results.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/path_vis_detail_test_results.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -38,6 +38,7 @@ class PathVisDetailTestResults(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -48,7 +49,7 @@ class PathVisDetailTestResults(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/path_vis_direction.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/path_vis_direction.py index e63f64fc..7738c7c2 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/path_vis_direction.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/path_vis_direction.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/path_vis_endpoint.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/path_vis_endpoint.py index eb1ed3be..840336fa 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/path_vis_endpoint.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/path_vis_endpoint.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -38,6 +38,7 @@ class PathVisEndpoint(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -48,7 +49,7 @@ class PathVisEndpoint(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/path_vis_hop.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/path_vis_hop.py index d4120f76..12decdbb 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/path_vis_hop.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/path_vis_hop.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -40,6 +40,7 @@ class PathVisHop(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -50,7 +51,7 @@ class PathVisHop(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/path_vis_route.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/path_vis_route.py index a90a9f8e..867180e6 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/path_vis_route.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/path_vis_route.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class PathVisRoute(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class PathVisRoute(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/path_vis_test_result.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/path_vis_test_result.py index 204f7765..a8c94e47 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/path_vis_test_result.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/path_vis_test_result.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -50,6 +50,7 @@ class PathVisTestResult(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -60,7 +61,7 @@ class PathVisTestResult(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/path_vis_test_results.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/path_vis_test_results.py index 4e0855d0..3ec024e0 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/path_vis_test_results.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/path_vis_test_results.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -41,6 +41,7 @@ class PathVisTestResults(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -51,7 +52,7 @@ class PathVisTestResults(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/rtp_stream_test_result.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/rtp_stream_test_result.py index 179ca18d..5f14581c 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/rtp_stream_test_result.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/rtp_stream_test_result.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -52,6 +52,7 @@ class RtpStreamTestResult(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -62,7 +63,7 @@ class RtpStreamTestResult(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/rtp_stream_test_results.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/rtp_stream_test_results.py index 16693429..91a84436 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/rtp_stream_test_results.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/rtp_stream_test_results.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -41,6 +41,7 @@ class RtpStreamTestResults(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -51,7 +52,7 @@ class RtpStreamTestResults(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/self_links.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/self_links.py index f32d0ca7..0bd2e159 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/self_links.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/self_links.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class SelfLinks(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class SelfLinks(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/simple_test.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/simple_test.py index ada677f4..774a4040 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/simple_test.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/simple_test.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -51,6 +51,7 @@ class SimpleTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -61,7 +62,7 @@ class SimpleTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/sip_server_error_type.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/sip_server_error_type.py index 5e70c8a3..620877ab 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/sip_server_error_type.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/sip_server_error_type.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/sip_server_test_result.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/sip_server_test_result.py index c2be7a2e..4320ee33 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/sip_server_test_result.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/sip_server_test_result.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -58,6 +58,7 @@ class SipServerTestResult(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -68,7 +69,7 @@ class SipServerTestResult(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/sip_server_test_results.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/sip_server_test_results.py index 161c4961..f78c6807 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/sip_server_test_results.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/sip_server_test_results.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -41,6 +41,7 @@ class SipServerTestResults(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -51,7 +52,7 @@ class SipServerTestResults(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/ssl_cert.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/ssl_cert.py index 56faa331..7550c852 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/ssl_cert.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/ssl_cert.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -41,6 +41,7 @@ class SslCert(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -51,7 +52,7 @@ class SslCert(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/test_direction.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/test_direction.py index 1c249853..9453f5f0 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/test_direction.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/test_direction.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/test_interval.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/test_interval.py index 3d6fe61b..28638cae 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/test_interval.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/test_interval.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/test_links.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/test_links.py index a95801f7..7229f154 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/test_links.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/test_links.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class TestLinks(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class TestLinks(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/test_result.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/test_result.py index e45d2ad4..b31953f2 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/test_result.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/test_result.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -37,6 +37,7 @@ class TestResult(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -47,7 +48,7 @@ class TestResult(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/test_result_app_links.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/test_result_app_links.py index 6ee9835b..4ea31cd1 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/test_result_app_links.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/test_result_app_links.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class TestResultAppLinks(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class TestResultAppLinks(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/test_self_link.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/test_self_link.py index adf7b421..df8f9c8f 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/test_self_link.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/test_self_link.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -40,6 +40,7 @@ class TestSelfLink(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -50,7 +51,7 @@ class TestSelfLink(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/test_type.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/test_type.py index c1415d2e..4c60113f 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/test_type.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/test_type.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -26,6 +26,7 @@ class TestType(str, Enum): """ allowed enum values """ + API = 'api' AGENT_MINUS_TO_MINUS_AGENT = 'agent-to-agent' AGENT_MINUS_TO_MINUS_SERVER = 'agent-to-server' BGP = 'bgp' diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/unauthorized_error.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/unauthorized_error.py index 84565632..a0196dcd 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/unauthorized_error.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/unauthorized_error.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class UnauthorizedError(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class UnauthorizedError(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/validation_error.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/validation_error.py index 3436a27c..874553f4 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/validation_error.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/validation_error.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -39,6 +39,7 @@ class ValidationError(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -49,7 +50,7 @@ class ValidationError(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/validation_error_item.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/validation_error_item.py index dc55d998..49109fc7 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/validation_error_item.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/validation_error_item.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,7 +17,7 @@ import pprint import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +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 @@ -27,7 +27,7 @@ class ValidationErrorItem(BaseModel): ValidationErrorItem """ # noqa: E501 code: Optional[StrictStr] = Field(default=None, description="(Optional) A unique error type/code that can be referenced in the documentation for further details.") - var_field: Optional[StrictInt] = Field(default=None, description="Identifies the field that triggered this particular error.", alias="field") + var_field: Optional[StrictStr] = Field(default=None, description="Identifies the field that triggered this particular error.", alias="field") message: Optional[StrictStr] = Field(default=None, description="A short, human-readable summary of the error.") __properties: ClassVar[List[str]] = ["code", "field", "message"] @@ -35,6 +35,7 @@ class ValidationErrorItem(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class ValidationErrorItem(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/web_transaction_detail_test_result.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/web_transaction_detail_test_result.py index f64b1444..16119fad 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/web_transaction_detail_test_result.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/web_transaction_detail_test_result.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -49,6 +49,7 @@ class WebTransactionDetailTestResult(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -59,7 +60,7 @@ class WebTransactionDetailTestResult(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/web_transaction_detail_test_results.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/web_transaction_detail_test_results.py index 26037271..0a593ae7 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/web_transaction_detail_test_results.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/web_transaction_detail_test_results.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -38,6 +38,7 @@ class WebTransactionDetailTestResults(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -48,7 +49,7 @@ class WebTransactionDetailTestResults(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/web_transaction_page_detail_test_result.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/web_transaction_page_detail_test_result.py index 6e5ff8df..143c5782 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/web_transaction_page_detail_test_result.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/web_transaction_page_detail_test_result.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -50,6 +50,7 @@ class WebTransactionPageDetailTestResult(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -60,7 +61,7 @@ class WebTransactionPageDetailTestResult(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/web_transaction_page_detail_test_results.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/web_transaction_page_detail_test_results.py index 5b7129a8..b2e4251c 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/web_transaction_page_detail_test_results.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/web_transaction_page_detail_test_results.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -38,6 +38,7 @@ class WebTransactionPageDetailTestResults(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -48,7 +49,7 @@ class WebTransactionPageDetailTestResults(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/web_transaction_test_result.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/web_transaction_test_result.py index 75506dd1..a5c725e5 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/web_transaction_test_result.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/web_transaction_test_result.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -45,6 +45,7 @@ class WebTransactionTestResult(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -55,7 +56,7 @@ class WebTransactionTestResult(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/web_transaction_test_results.py b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/web_transaction_test_results.py index 310769a0..ce7ccbf7 100644 --- a/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/web_transaction_test_results.py +++ b/thousandeyes-sdk-test-results/src/thousandeyes_sdk/test_results/models/web_transaction_test_results.py @@ -5,7 +5,7 @@ Get test result metrics for Cloud and Enterprise Agent tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -41,6 +41,7 @@ class WebTransactionTestResults(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -51,7 +52,7 @@ class WebTransactionTestResults(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-test-results/test/test_api_test_metrics_api.py b/thousandeyes-sdk-test-results/test/test_api_test_metrics_api.py new file mode 100644 index 00000000..220a8e88 --- /dev/null +++ b/thousandeyes-sdk-test-results/test/test_api_test_metrics_api.py @@ -0,0 +1,390 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.test_results.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.test_results.api.api_test_metrics_api import APITestMetricsApi + + +class TestAPITestMetricsApi(unittest.TestCase): + """APITestMetricsApi unit test stubs""" + + def setUp(self) -> None: + self.api = APITestMetricsApi() + + def tearDown(self) -> None: + pass + + def test_get_test_api_agent_round_results_models_validation(self) -> None: + """Test case for get_test_api_agent_round_results request and response models""" + + response_body_json = """ + { + "test" : { + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "savedEvent" : true, + "description" : "ThousandEyes Test", + "type" : "agent-to-server", + "enabled" : true, + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test" + }, + "_links" : { + "next" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + }, + "previous" : { + "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" + } + }, + "results" : [ { + "date" : "2022-07-17T22:00:54Z", + "completion" : 100.0, + "agent" : { + "agentId" : "281474976710706", + "agentName" : "thousandeyes-stg-va-254", + "location" : "San Francisco Bay Area", + "countryId" : "US" + }, + "_links" : { + "appLink" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "errorType" : "None", + "apiTransactionTime" : 990.1, + "startTime" : 1384309800, + "endTime" : 1384309800, + "requests" : [ { + "completion" : 100.0, + "responseTime" : 440.8, + "apiCallTime" : 900.9, + "processingTime" : 59.9, + "url" : "https://api.thousandeyes.com/v7/status", + "sendTime" : 8.1, + "receiveTime" : 224.1, + "connectTime" : 12.1, + "dnsTime" : 11.1, + "name" : "First Step to Acquire Token", + "stepNumber" : 1, + "assertions" : [ { + "hasFailed" : false, + "step" : 1 + }, { + "hasFailed" : false, + "step" : 1 + } ], + "assertErrorCount" : 0, + "blockedTime" : 49.9, + "stepTime" : 990.1, + "waitTime" : 18.1 + }, { + "completion" : 100.0, + "responseTime" : 440.8, + "apiCallTime" : 900.9, + "processingTime" : 59.9, + "url" : "https://api.thousandeyes.com/v7/status", + "sendTime" : 8.1, + "receiveTime" : 224.1, + "connectTime" : 12.1, + "dnsTime" : 11.1, + "name" : "First Step to Acquire Token", + "stepNumber" : 1, + "assertions" : [ { + "hasFailed" : false, + "step" : 1 + }, { + "hasFailed" : false, + "step" : 1 + } ], + "assertErrorCount" : 0, + "blockedTime" : 49.9, + "stepTime" : 990.1, + "waitTime" : 18.1 + } ], + "roundId" : 1384309800, + "errorDetails" : "Connection error" + }, { + "date" : "2022-07-17T22:00:54Z", + "completion" : 100.0, + "agent" : { + "agentId" : "281474976710706", + "agentName" : "thousandeyes-stg-va-254", + "location" : "San Francisco Bay Area", + "countryId" : "US" + }, + "_links" : { + "appLink" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "errorType" : "None", + "apiTransactionTime" : 990.1, + "startTime" : 1384309800, + "endTime" : 1384309800, + "requests" : [ { + "completion" : 100.0, + "responseTime" : 440.8, + "apiCallTime" : 900.9, + "processingTime" : 59.9, + "url" : "https://api.thousandeyes.com/v7/status", + "sendTime" : 8.1, + "receiveTime" : 224.1, + "connectTime" : 12.1, + "dnsTime" : 11.1, + "name" : "First Step to Acquire Token", + "stepNumber" : 1, + "assertions" : [ { + "hasFailed" : false, + "step" : 1 + }, { + "hasFailed" : false, + "step" : 1 + } ], + "assertErrorCount" : 0, + "blockedTime" : 49.9, + "stepTime" : 990.1, + "waitTime" : 18.1 + }, { + "completion" : 100.0, + "responseTime" : 440.8, + "apiCallTime" : 900.9, + "processingTime" : 59.9, + "url" : "https://api.thousandeyes.com/v7/status", + "sendTime" : 8.1, + "receiveTime" : 224.1, + "connectTime" : 12.1, + "dnsTime" : 11.1, + "name" : "First Step to Acquire Token", + "stepNumber" : 1, + "assertions" : [ { + "hasFailed" : false, + "step" : 1 + }, { + "hasFailed" : false, + "step" : 1 + } ], + "assertErrorCount" : 0, + "blockedTime" : 49.9, + "stepTime" : 990.1, + "waitTime" : 18.1 + } ], + "roundId" : 1384309800, + "errorDetails" : "Connection error" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.test_results.models.ApiDetailTestResults.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_test_api_results_models_validation(self) -> None: + """Test case for get_test_api_results request and response models""" + + response_body_json = """ + { + "test" : { + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "savedEvent" : true, + "description" : "ThousandEyes Test", + "type" : "agent-to-server", + "enabled" : true, + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test" + }, + "endDate" : "2022-07-18T22:00:54Z", + "_links" : { + "next" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + }, + "previous" : { + "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" + } + }, + "results" : [ { + "date" : "2022-07-17T22:00:54Z", + "completion" : 100.0, + "agent" : { + "agentId" : "281474976710706", + "agentName" : "thousandeyes-stg-va-254", + "location" : "San Francisco Bay Area", + "countryId" : "US" + }, + "_links" : { + "appLink" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "errorType" : "None", + "apiTransactionTime" : 990.1, + "startTime" : 1384309800, + "endTime" : 1384309800, + "roundId" : 1384309800, + "errorDetails" : "Connection error" + }, { + "date" : "2022-07-17T22:00:54Z", + "completion" : 100.0, + "agent" : { + "agentId" : "281474976710706", + "agentName" : "thousandeyes-stg-va-254", + "location" : "San Francisco Bay Area", + "countryId" : "US" + }, + "_links" : { + "appLink" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "errorType" : "None", + "apiTransactionTime" : 990.1, + "startTime" : 1384309800, + "endTime" : 1384309800, + "roundId" : 1384309800, + "errorDetails" : "Connection error" + } ], + "startDate" : "2022-07-17T22:00:54Z" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.test_results.models.ApiTestResults.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-test-results/test/test_dns_server_test_metrics_api.py b/thousandeyes-sdk-test-results/test/test_dns_server_test_metrics_api.py new file mode 100644 index 00000000..a0d9af56 --- /dev/null +++ b/thousandeyes-sdk-test-results/test/test_dns_server_test_metrics_api.py @@ -0,0 +1,302 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.test_results.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.test_results.api.dns_server_test_metrics_api import DNSServerTestMetricsApi + + +class TestDNSServerTestMetricsApi(unittest.TestCase): + """DNSServerTestMetricsApi unit test stubs""" + + def setUp(self) -> None: + self.api = DNSServerTestMetricsApi() + + def tearDown(self) -> None: + pass + + def test_get_test_dns_server_result_models_validation(self) -> None: + """Test case for get_test_dns_server_result request and response models""" + + response_body_json = """ + { + "test" : { + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "savedEvent" : true, + "description" : "ThousandEyes Test", + "type" : "agent-to-server", + "enabled" : true, + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test" + }, + "endDate" : "2022-07-18T22:00:54Z", + "_links" : { + "next" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + }, + "previous" : { + "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" + } + }, + "results" : [ { + "date" : "2022-07-17T22:00:54Z", + "server" : "a1.verisigndns.com.", + "agent" : { + "agentId" : "281474976710706", + "agentName" : "thousandeyes-stg-va-254", + "location" : "San Francisco Bay Area", + "countryId" : "US" + }, + "mappings" : "208.185.7.120", + "_links" : { + "appLink" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "startTime" : 1384309800, + "endTime" : 1384309800, + "resolutionTime" : 3, + "roundId" : 1384309800, + "serverId" : "456", + "errorDetails" : "Connection error" + }, { + "date" : "2022-07-17T22:00:54Z", + "server" : "a1.verisigndns.com.", + "agent" : { + "agentId" : "281474976710706", + "agentName" : "thousandeyes-stg-va-254", + "location" : "San Francisco Bay Area", + "countryId" : "US" + }, + "mappings" : "208.185.7.120", + "_links" : { + "appLink" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "startTime" : 1384309800, + "endTime" : 1384309800, + "resolutionTime" : 3, + "roundId" : 1384309800, + "serverId" : "456", + "errorDetails" : "Connection error" + } ], + "startDate" : "2022-07-17T22:00:54Z" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.test_results.models.DnsServerTestResults.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_test_dns_servers_results_models_validation(self) -> None: + """Test case for get_test_dns_servers_results request and response models""" + + response_body_json = """ + { + "test" : { + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "savedEvent" : true, + "description" : "ThousandEyes Test", + "type" : "agent-to-server", + "enabled" : true, + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test" + }, + "endDate" : "2022-07-18T22:00:54Z", + "_links" : { + "next" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + }, + "previous" : { + "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" + } + }, + "results" : [ { + "date" : "2022-07-17T22:00:54Z", + "server" : "a1.verisigndns.com.", + "agent" : { + "agentId" : "281474976710706", + "agentName" : "thousandeyes-stg-va-254", + "location" : "San Francisco Bay Area", + "countryId" : "US" + }, + "mappings" : "208.185.7.120", + "_links" : { + "appLink" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "startTime" : 1384309800, + "endTime" : 1384309800, + "resolutionTime" : 3, + "roundId" : 1384309800, + "serverId" : "456", + "errorDetails" : "Connection error" + }, { + "date" : "2022-07-17T22:00:54Z", + "server" : "a1.verisigndns.com.", + "agent" : { + "agentId" : "281474976710706", + "agentName" : "thousandeyes-stg-va-254", + "location" : "San Francisco Bay Area", + "countryId" : "US" + }, + "mappings" : "208.185.7.120", + "_links" : { + "appLink" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "startTime" : 1384309800, + "endTime" : 1384309800, + "resolutionTime" : 3, + "roundId" : 1384309800, + "serverId" : "456", + "errorDetails" : "Connection error" + } ], + "startDate" : "2022-07-17T22:00:54Z" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.test_results.models.DnsServerTestResults.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-test-results/test/test_dns_trace_test_metrics_api.py b/thousandeyes-sdk-test-results/test/test_dns_trace_test_metrics_api.py new file mode 100644 index 00000000..068aabc2 --- /dev/null +++ b/thousandeyes-sdk-test-results/test/test_dns_trace_test_metrics_api.py @@ -0,0 +1,172 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.test_results.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.test_results.api.dns_trace_test_metrics_api import DNSTraceTestMetricsApi + + +class TestDNSTraceTestMetricsApi(unittest.TestCase): + """DNSTraceTestMetricsApi unit test stubs""" + + def setUp(self) -> None: + self.api = DNSTraceTestMetricsApi() + + def tearDown(self) -> None: + pass + + def test_get_test_dns_trace_results_models_validation(self) -> None: + """Test case for get_test_dns_trace_results request and response models""" + + response_body_json = """ + { + "test" : { + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "savedEvent" : true, + "description" : "ThousandEyes Test", + "type" : "agent-to-server", + "enabled" : true, + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test" + }, + "endDate" : "2022-07-18T22:00:54Z", + "_links" : { + "next" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + }, + "previous" : { + "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" + } + }, + "results" : [ { + "date" : "2022-07-17T22:00:54Z", + "agent" : { + "agentId" : "281474976710706", + "agentName" : "thousandeyes-stg-va-254", + "location" : "San Francisco Bay Area", + "countryId" : "US" + }, + "_links" : { + "appLink" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "finalServerQueried" : "a1.verisigndns.com.", + "finalQueryTime" : 178, + "queries" : 3, + "failedQueries" : 0, + "output" : "com.\\t172800\\tIN\\tNS\\ta.gtld-servers.net.\\ncom.\\t172800\\tIN\\tNS\\tf.gtld-servers.net.\\ncom.\\t172800\\tIN\\tNS\\tc.gtld-servers.net.\\ncom.\\t172800\\tIN\\tNS\\tb.gtld-servers.net.\\ncom.\\t172800\\tIN\\tNS\\td.gtld-servers.net.\\ncom.\\t172800\\tIN\\tNS\\te.gtld-servers.net.\\ncom.\\t172800\\tIN\\tNS\\tg.gtld-servers.net.\\ncom.\\t172800\\tIN\\tNS\\tm.gtld-servers.net.\\ncom.\\t172800\\tIN\\tNS\\th.gtld-servers.net.\\ncom.\\t172800\\tIN\\tNS\\tj.gtld-servers.net.\\ncom.\\t172800\\tIN\\tNS\\ti.gtld-servers.net.\\ncom.\\t172800\\tIN\\tNS\\tl.gtld-servers.net.\\ncom.\\t172800\\tIN\\tNS\\tk.gtld-servers.net.\\n;; Received 498 bytes from 199.7.91.13(d.root-servers.net.) in 119 ms\\n\\nthousandeyes.com.\\t172800\\tIN\\tNS\\ta1.verisigndns.com.\\nthousandeyes.com.\\t172800\\tIN\\tNS\\ta2.verisigndns.com.\\nthousandeyes.com.\\t172800\\tIN\\tNS\\ta3.verisigndns.com.\\nthousandeyes.com.\\t172800\\tIN\\tNS\\tu1.verisigndns.com.\\n;; Received 266 bytes from 192.5.6.30(a.gtld-servers.net.) in 178 ms\\n\\napp.thousandeyes.com.\\t300\\tIN\\tCNAME\\tweb.thousandeyes.com.\\nweb.thousandeyes.com.\\t300\\tIN\\tCNAME\\tlb-app.thousandeyes.com.\\nlb-app.thousandeyes.com.\\t3600\\tIN\\tA\\t208.185.7.120\\n;; Received 173 bytes from 209.112.113.33(a1.verisigndns.com.) in 178 ms\\n\\n", + "mappings" : "208.185.7.120", + "startTime" : 1384309800, + "endTime" : 1384309800, + "roundId" : 1384309800, + "errorDetails" : "Connection error" + }, { + "date" : "2022-07-17T22:00:54Z", + "agent" : { + "agentId" : "281474976710706", + "agentName" : "thousandeyes-stg-va-254", + "location" : "San Francisco Bay Area", + "countryId" : "US" + }, + "_links" : { + "appLink" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "finalServerQueried" : "a1.verisigndns.com.", + "finalQueryTime" : 178, + "queries" : 3, + "failedQueries" : 0, + "output" : "com.\\t172800\\tIN\\tNS\\ta.gtld-servers.net.\\ncom.\\t172800\\tIN\\tNS\\tf.gtld-servers.net.\\ncom.\\t172800\\tIN\\tNS\\tc.gtld-servers.net.\\ncom.\\t172800\\tIN\\tNS\\tb.gtld-servers.net.\\ncom.\\t172800\\tIN\\tNS\\td.gtld-servers.net.\\ncom.\\t172800\\tIN\\tNS\\te.gtld-servers.net.\\ncom.\\t172800\\tIN\\tNS\\tg.gtld-servers.net.\\ncom.\\t172800\\tIN\\tNS\\tm.gtld-servers.net.\\ncom.\\t172800\\tIN\\tNS\\th.gtld-servers.net.\\ncom.\\t172800\\tIN\\tNS\\tj.gtld-servers.net.\\ncom.\\t172800\\tIN\\tNS\\ti.gtld-servers.net.\\ncom.\\t172800\\tIN\\tNS\\tl.gtld-servers.net.\\ncom.\\t172800\\tIN\\tNS\\tk.gtld-servers.net.\\n;; Received 498 bytes from 199.7.91.13(d.root-servers.net.) in 119 ms\\n\\nthousandeyes.com.\\t172800\\tIN\\tNS\\ta1.verisigndns.com.\\nthousandeyes.com.\\t172800\\tIN\\tNS\\ta2.verisigndns.com.\\nthousandeyes.com.\\t172800\\tIN\\tNS\\ta3.verisigndns.com.\\nthousandeyes.com.\\t172800\\tIN\\tNS\\tu1.verisigndns.com.\\n;; Received 266 bytes from 192.5.6.30(a.gtld-servers.net.) in 178 ms\\n\\napp.thousandeyes.com.\\t300\\tIN\\tCNAME\\tweb.thousandeyes.com.\\nweb.thousandeyes.com.\\t300\\tIN\\tCNAME\\tlb-app.thousandeyes.com.\\nlb-app.thousandeyes.com.\\t3600\\tIN\\tA\\t208.185.7.120\\n;; Received 173 bytes from 209.112.113.33(a1.verisigndns.com.) in 178 ms\\n\\n", + "mappings" : "208.185.7.120", + "startTime" : 1384309800, + "endTime" : 1384309800, + "roundId" : 1384309800, + "errorDetails" : "Connection error" + } ], + "startDate" : "2022-07-17T22:00:54Z" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.test_results.models.DnsTraceTestResults.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-test-results/test/test_dnssec_test_metrics_api.py b/thousandeyes-sdk-test-results/test/test_dnssec_test_metrics_api.py new file mode 100644 index 00000000..52497cdb --- /dev/null +++ b/thousandeyes-sdk-test-results/test/test_dnssec_test_metrics_api.py @@ -0,0 +1,162 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.test_results.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.test_results.api.dnssec_test_metrics_api import DNSSECTestMetricsApi + + +class TestDNSSECTestMetricsApi(unittest.TestCase): + """DNSSECTestMetricsApi unit test stubs""" + + def setUp(self) -> None: + self.api = DNSSECTestMetricsApi() + + def tearDown(self) -> None: + pass + + def test_get_test_dns_sec_results_models_validation(self) -> None: + """Test case for get_test_dns_sec_results request and response models""" + + response_body_json = """ + { + "test" : { + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "savedEvent" : true, + "description" : "ThousandEyes Test", + "type" : "agent-to-server", + "enabled" : true, + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test" + }, + "endDate" : "2022-07-18T22:00:54Z", + "_links" : { + "next" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + }, + "previous" : { + "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" + } + }, + "results" : [ { + "date" : "2022-07-17T22:00:54Z", + "agent" : { + "agentId" : "281474976710706", + "agentName" : "thousandeyes-stg-va-254", + "location" : "San Francisco Bay Area", + "countryId" : "US" + }, + "_links" : { + "appLink" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "isValid" : true, + "startTime" : 1384309800, + "endTime" : 1384309800, + "roundId" : 1384309800, + "errorDetails" : "Connection error" + }, { + "date" : "2022-07-17T22:00:54Z", + "agent" : { + "agentId" : "281474976710706", + "agentName" : "thousandeyes-stg-va-254", + "location" : "San Francisco Bay Area", + "countryId" : "US" + }, + "_links" : { + "appLink" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "isValid" : true, + "startTime" : 1384309800, + "endTime" : 1384309800, + "roundId" : 1384309800, + "errorDetails" : "Connection error" + } ], + "startDate" : "2022-07-17T22:00:54Z" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.test_results.models.DnssecTestResults.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-test-results/test/test_network_bgp_test_metrics_api.py b/thousandeyes-sdk-test-results/test/test_network_bgp_test_metrics_api.py new file mode 100644 index 00000000..cba674d6 --- /dev/null +++ b/thousandeyes-sdk-test-results/test/test_network_bgp_test_metrics_api.py @@ -0,0 +1,282 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.test_results.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.test_results.api.network_bgp_test_metrics_api import NetworkBGPTestMetricsApi + + +class TestNetworkBGPTestMetricsApi(unittest.TestCase): + """NetworkBGPTestMetricsApi unit test stubs""" + + def setUp(self) -> None: + self.api = NetworkBGPTestMetricsApi() + + def tearDown(self) -> None: + pass + + def test_get_test_bgp_results_models_validation(self) -> None: + """Test case for get_test_bgp_results request and response models""" + + response_body_json = """ + { + "test" : { + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "savedEvent" : true, + "description" : "ThousandEyes Test", + "type" : "agent-to-server", + "enabled" : true, + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test" + }, + "endDate" : "2022-07-18T22:00:54Z", + "_links" : { + "next" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + }, + "previous" : { + "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" + } + }, + "results" : [ { + "date" : "2022-07-17T22:00:54Z", + "_links" : { + "appLink" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "prefix" : "99.128.0.0/11", + "monitor" : { + "monitorId" : "281474976710706", + "monitorName" : "Vancouver, Canada - Bell Canada (AS 6539)", + "countryId" : "US" + }, + "startTime" : 1384309800, + "endTime" : 1384309800, + "reachability" : 0.0, + "updates" : 0.0, + "pathChanges" : 0.0, + "roundId" : 1384309800, + "prefixId" : "215" + }, { + "date" : "2022-07-17T22:00:54Z", + "_links" : { + "appLink" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "prefix" : "99.128.0.0/11", + "monitor" : { + "monitorId" : "281474976710706", + "monitorName" : "Vancouver, Canada - Bell Canada (AS 6539)", + "countryId" : "US" + }, + "startTime" : 1384309800, + "endTime" : 1384309800, + "reachability" : 0.0, + "updates" : 0.0, + "pathChanges" : 0.0, + "roundId" : 1384309800, + "prefixId" : "215" + } ], + "startDate" : "2022-07-17T22:00:54Z" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.test_results.models.BgpTestResults.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_test_bgp_routes_prefix_round_results_models_validation(self) -> None: + """Test case for get_test_bgp_routes_prefix_round_results request and response models""" + + response_body_json = """ + { + "test" : { + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "savedEvent" : true, + "description" : "ThousandEyes Test", + "type" : "agent-to-server", + "enabled" : true, + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test" + }, + "_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" + } + }, + "results" : [ { + "date" : "2022-07-17T22:00:54Z", + "_links" : { + "appLink" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "prefix" : "99.128.0.0/11", + "monitor" : { + "monitorId" : "281474976710706", + "monitorName" : "Vancouver, Canada - Bell Canada (AS 6539)", + "countryId" : "US" + }, + "hops" : [ { + "asName" : "Telus Advanced Communications", + "asn" : 852 + }, { + "asName" : "Telus Advanced Communications", + "asn" : 852 + } ], + "isActive" : true, + "roundId" : 1384309800, + "prefixId" : "215" + }, { + "date" : "2022-07-17T22:00:54Z", + "_links" : { + "appLink" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "prefix" : "99.128.0.0/11", + "monitor" : { + "monitorId" : "281474976710706", + "monitorName" : "Vancouver, Canada - Bell Canada (AS 6539)", + "countryId" : "US" + }, + "hops" : [ { + "asName" : "Telus Advanced Communications", + "asn" : 852 + }, { + "asName" : "Telus Advanced Communications", + "asn" : 852 + } ], + "isActive" : true, + "roundId" : 1384309800, + "prefixId" : "215" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.test_results.models.BgpTestRouteInformationResults.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-test-results/test/test_network_test_metrics_api.py b/thousandeyes-sdk-test-results/test/test_network_test_metrics_api.py new file mode 100644 index 00000000..a6579e39 --- /dev/null +++ b/thousandeyes-sdk-test-results/test/test_network_test_metrics_api.py @@ -0,0 +1,548 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.test_results.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.test_results.api.network_test_metrics_api import NetworkTestMetricsApi + + +class TestNetworkTestMetricsApi(unittest.TestCase): + """NetworkTestMetricsApi unit test stubs""" + + def setUp(self) -> None: + self.api = NetworkTestMetricsApi() + + def tearDown(self) -> None: + pass + + def test_get_test_network_results_models_validation(self) -> None: + """Test case for get_test_network_results request and response models""" + + response_body_json = """ + { + "test" : { + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "savedEvent" : true, + "description" : "ThousandEyes Test", + "type" : "agent-to-server", + "enabled" : true, + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test" + }, + "endDate" : "2022-07-18T22:00:54Z", + "_links" : { + "next" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + }, + "previous" : { + "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" + } + }, + "results" : [ { + "date" : "2022-07-17T22:00:54Z", + "server" : "www.thousandeyes.com:80", + "availableBandwidth" : 9.100464, + "agent" : { + "agentId" : "281474976710706", + "agentName" : "thousandeyes-stg-va-254", + "location" : "San Francisco Bay Area", + "countryId" : "US" + }, + "packetsBySecond" : [ [ ], [ 0 ], [ 2 ], [ 2, 1 ], [ 1, 1 ] ], + "avgLatency" : 167.04, + "bandwidth" : 4.3313155, + "minLatency" : 167.0, + "_links" : { + "appLink" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "maxLatency" : 168.0, + "capacity" : 210.10854, + "loss" : 0.0, + "jitter" : 0.076808, + "serverIp" : "50.18.127.223", + "startTime" : 1384309800, + "endTime" : 1384309800, + "roundId" : 1384309800, + "direction" : "to-target" + }, { + "date" : "2022-07-17T22:00:54Z", + "server" : "www.thousandeyes.com:80", + "availableBandwidth" : 9.100464, + "agent" : { + "agentId" : "281474976710706", + "agentName" : "thousandeyes-stg-va-254", + "location" : "San Francisco Bay Area", + "countryId" : "US" + }, + "packetsBySecond" : [ [ ], [ 0 ], [ 2 ], [ 2, 1 ], [ 1, 1 ] ], + "avgLatency" : 167.04, + "bandwidth" : 4.3313155, + "minLatency" : 167.0, + "_links" : { + "appLink" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "maxLatency" : 168.0, + "capacity" : 210.10854, + "loss" : 0.0, + "jitter" : 0.076808, + "serverIp" : "50.18.127.223", + "startTime" : 1384309800, + "endTime" : 1384309800, + "roundId" : 1384309800, + "direction" : "to-target" + } ], + "startDate" : "2022-07-17T22:00:54Z" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.test_results.models.NetworkTestResults.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_test_path_vis_agent_round_results_models_validation(self) -> None: + """Test case for get_test_path_vis_agent_round_results request and response models""" + + response_body_json = """ + { + "test" : { + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "savedEvent" : true, + "description" : "ThousandEyes Test", + "type" : "agent-to-server", + "enabled" : true, + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test" + }, + "_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" + } + }, + "results" : [ { + "date" : "2022-07-17T22:00:54Z", + "server" : "www.google.com:443", + "agent" : { + "agentId" : "281474976710706", + "agentName" : "thousandeyes-stg-va-254", + "location" : "San Francisco Bay Area", + "countryId" : "US" + }, + "_links" : { + "appLink" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "targetIsProxy" : true, + "sourcePrefix" : "196.40.96.0/20", + "sourceIp" : "196.40.106.237", + "pathTraces" : [ { + "hops" : [ { + "rdns" : "core-router1.cpt2.host-h.net", + "prefix" : "196.40.96.0/20", + "responseTime" : 1, + "hop" : 1, + "ipAddress" : "196.40.106.237", + "mpls" : "mpls", + "location" : "Cape Town, South Africa", + "network" : "HETZNER (Pty) Ltd (AS 37153)" + }, { + "rdns" : "core-router1.cpt2.host-h.net", + "prefix" : "196.40.96.0/20", + "responseTime" : 1, + "hop" : 1, + "ipAddress" : "196.40.106.237", + "mpls" : "mpls", + "location" : "Cape Town, South Africa", + "network" : "HETZNER (Pty) Ltd (AS 37153)" + } ], + "pathId" : "4711301366345855606023718047703941305741293841502186803" + }, { + "hops" : [ { + "rdns" : "core-router1.cpt2.host-h.net", + "prefix" : "196.40.96.0/20", + "responseTime" : 1, + "hop" : 1, + "ipAddress" : "196.40.106.237", + "mpls" : "mpls", + "location" : "Cape Town, South Africa", + "network" : "HETZNER (Pty) Ltd (AS 37153)" + }, { + "rdns" : "core-router1.cpt2.host-h.net", + "prefix" : "196.40.96.0/20", + "responseTime" : 1, + "hop" : 1, + "ipAddress" : "196.40.106.237", + "mpls" : "mpls", + "location" : "Cape Town, South Africa", + "network" : "HETZNER (Pty) Ltd (AS 37153)" + } ], + "pathId" : "4711301366345855606023718047703941305741293841502186803" + } ], + "serverIp" : "172.217.170.68", + "startTime" : 1384309800, + "endTime" : 1384309800, + "roundId" : 1384309800, + "direction" : "to-target" + }, { + "date" : "2022-07-17T22:00:54Z", + "server" : "www.google.com:443", + "agent" : { + "agentId" : "281474976710706", + "agentName" : "thousandeyes-stg-va-254", + "location" : "San Francisco Bay Area", + "countryId" : "US" + }, + "_links" : { + "appLink" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "targetIsProxy" : true, + "sourcePrefix" : "196.40.96.0/20", + "sourceIp" : "196.40.106.237", + "pathTraces" : [ { + "hops" : [ { + "rdns" : "core-router1.cpt2.host-h.net", + "prefix" : "196.40.96.0/20", + "responseTime" : 1, + "hop" : 1, + "ipAddress" : "196.40.106.237", + "mpls" : "mpls", + "location" : "Cape Town, South Africa", + "network" : "HETZNER (Pty) Ltd (AS 37153)" + }, { + "rdns" : "core-router1.cpt2.host-h.net", + "prefix" : "196.40.96.0/20", + "responseTime" : 1, + "hop" : 1, + "ipAddress" : "196.40.106.237", + "mpls" : "mpls", + "location" : "Cape Town, South Africa", + "network" : "HETZNER (Pty) Ltd (AS 37153)" + } ], + "pathId" : "4711301366345855606023718047703941305741293841502186803" + }, { + "hops" : [ { + "rdns" : "core-router1.cpt2.host-h.net", + "prefix" : "196.40.96.0/20", + "responseTime" : 1, + "hop" : 1, + "ipAddress" : "196.40.106.237", + "mpls" : "mpls", + "location" : "Cape Town, South Africa", + "network" : "HETZNER (Pty) Ltd (AS 37153)" + }, { + "rdns" : "core-router1.cpt2.host-h.net", + "prefix" : "196.40.96.0/20", + "responseTime" : 1, + "hop" : 1, + "ipAddress" : "196.40.106.237", + "mpls" : "mpls", + "location" : "Cape Town, South Africa", + "network" : "HETZNER (Pty) Ltd (AS 37153)" + } ], + "pathId" : "4711301366345855606023718047703941305741293841502186803" + } ], + "serverIp" : "172.217.170.68", + "startTime" : 1384309800, + "endTime" : 1384309800, + "roundId" : 1384309800, + "direction" : "to-target" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.test_results.models.PathVisDetailTestResults.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_test_path_vis_results_models_validation(self) -> None: + """Test case for get_test_path_vis_results request and response models""" + + response_body_json = """ + { + "test" : { + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "savedEvent" : true, + "description" : "ThousandEyes Test", + "type" : "agent-to-server", + "enabled" : true, + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test" + }, + "endDate" : "2022-07-18T22:00:54Z", + "_links" : { + "next" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + }, + "previous" : { + "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" + } + }, + "results" : [ { + "date" : "2022-07-17T22:00:54Z", + "server" : "www.google.com:443", + "agent" : { + "agentId" : "281474976710706", + "agentName" : "thousandeyes-stg-va-254", + "location" : "San Francisco Bay Area", + "countryId" : "US" + }, + "_links" : { + "appLink" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "targetIsProxy" : true, + "sourcePrefix" : "196.40.96.0/20", + "sourceIp" : "196.40.106.237", + "pathTraces" : [ { + "numberOfHops" : 15, + "responseTime" : 1500, + "ipAddress" : "196.40.106.237", + "pathMtu" : 1500, + "pathId" : "1230899668701775614109128428722974545787322404682781961521", + "mss" : 1460 + }, { + "numberOfHops" : 15, + "responseTime" : 1500, + "ipAddress" : "196.40.106.237", + "pathMtu" : 1500, + "pathId" : "1230899668701775614109128428722974545787322404682781961521", + "mss" : 1460 + } ], + "serverIp" : "172.217.170.68", + "startTime" : 1384309800, + "endTime" : 1384309800, + "roundId" : 1384309800, + "direction" : "to-target" + }, { + "date" : "2022-07-17T22:00:54Z", + "server" : "www.google.com:443", + "agent" : { + "agentId" : "281474976710706", + "agentName" : "thousandeyes-stg-va-254", + "location" : "San Francisco Bay Area", + "countryId" : "US" + }, + "_links" : { + "appLink" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "targetIsProxy" : true, + "sourcePrefix" : "196.40.96.0/20", + "sourceIp" : "196.40.106.237", + "pathTraces" : [ { + "numberOfHops" : 15, + "responseTime" : 1500, + "ipAddress" : "196.40.106.237", + "pathMtu" : 1500, + "pathId" : "1230899668701775614109128428722974545787322404682781961521", + "mss" : 1460 + }, { + "numberOfHops" : 15, + "responseTime" : 1500, + "ipAddress" : "196.40.106.237", + "pathMtu" : 1500, + "pathId" : "1230899668701775614109128428722974545787322404682781961521", + "mss" : 1460 + } ], + "serverIp" : "172.217.170.68", + "startTime" : 1384309800, + "endTime" : 1384309800, + "roundId" : 1384309800, + "direction" : "to-target" + } ], + "startDate" : "2022-07-17T22:00:54Z" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.test_results.models.PathVisTestResults.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-test-results/test/test_utils.py b/thousandeyes-sdk-test-results/test/test_utils.py new file mode 100644 index 00000000..930528d9 --- /dev/null +++ b/thousandeyes-sdk-test-results/test/test_utils.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +import json +import unittest + +from pydantic import BaseModel + + +def assert_constructed_model_matches_example_json(model: BaseModel, loaded_json: dict): + test_case = unittest.TestCase() + test_case.maxDiff = None + test_case.assertIsNotNone(model) + constructed_json = json.loads(model.to_json()) + sorted_loaded_json = json.dumps(loaded_json, sort_keys=True) + sorted_constructed_json = json.dumps(constructed_json, sort_keys=True) + test_case.assertEqual(sorted_loaded_json, sorted_constructed_json) diff --git a/thousandeyes-sdk-test-results/test/test_voice_rtp_server_test_metrics_api.py b/thousandeyes-sdk-test-results/test/test_voice_rtp_server_test_metrics_api.py new file mode 100644 index 00000000..da741c80 --- /dev/null +++ b/thousandeyes-sdk-test-results/test/test_voice_rtp_server_test_metrics_api.py @@ -0,0 +1,180 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.test_results.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.test_results.api.voice_rtp_server_test_metrics_api import VoiceRTPServerTestMetricsApi + + +class TestVoiceRTPServerTestMetricsApi(unittest.TestCase): + """VoiceRTPServerTestMetricsApi unit test stubs""" + + def setUp(self) -> None: + self.api = VoiceRTPServerTestMetricsApi() + + def tearDown(self) -> None: + pass + + def test_get_test_rtp_server_results_models_validation(self) -> None: + """Test case for get_test_rtp_server_results request and response models""" + + response_body_json = """ + { + "test" : { + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "savedEvent" : true, + "description" : "ThousandEyes Test", + "type" : "agent-to-server", + "enabled" : true, + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test" + }, + "endDate" : "2022-07-18T22:00:54Z", + "_links" : { + "next" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + }, + "previous" : { + "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" + } + }, + "results" : [ { + "date" : "2022-07-17T22:00:54Z", + "agent" : { + "agentId" : "281474976710706", + "agentName" : "thousandeyes-stg-va-254", + "location" : "San Francisco Bay Area", + "countryId" : "US" + }, + "pdv" : 1, + "_links" : { + "appLink" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "dscpName" : "EF (DSCP 46)", + "latency" : 103, + "mos" : 4.351024, + "loss" : 0.0, + "dscp" : "46", + "codecMaxMos" : 4.41, + "discards" : 0.0, + "serverIp" : "172.97.102.37", + "errorDetail" : "Connection error", + "startTime" : 1384309800, + "endTime" : 1384309800, + "codecName" : "G.711 @ 64 Kbps", + "roundId" : 1384309800 + }, { + "date" : "2022-07-17T22:00:54Z", + "agent" : { + "agentId" : "281474976710706", + "agentName" : "thousandeyes-stg-va-254", + "location" : "San Francisco Bay Area", + "countryId" : "US" + }, + "pdv" : 1, + "_links" : { + "appLink" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "dscpName" : "EF (DSCP 46)", + "latency" : 103, + "mos" : 4.351024, + "loss" : 0.0, + "dscp" : "46", + "codecMaxMos" : 4.41, + "discards" : 0.0, + "serverIp" : "172.97.102.37", + "errorDetail" : "Connection error", + "startTime" : 1384309800, + "endTime" : 1384309800, + "codecName" : "G.711 @ 64 Kbps", + "roundId" : 1384309800 + } ], + "startDate" : "2022-07-17T22:00:54Z" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.test_results.models.RtpStreamTestResults.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-test-results/test/test_voice_sip_server_test_metrics_api.py b/thousandeyes-sdk-test-results/test/test_voice_sip_server_test_metrics_api.py new file mode 100644 index 00000000..a9df8332 --- /dev/null +++ b/thousandeyes-sdk-test-results/test/test_voice_sip_server_test_metrics_api.py @@ -0,0 +1,190 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.test_results.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.test_results.api.voice_sip_server_test_metrics_api import VoiceSIPServerTestMetricsApi + + +class TestVoiceSIPServerTestMetricsApi(unittest.TestCase): + """VoiceSIPServerTestMetricsApi unit test stubs""" + + def setUp(self) -> None: + self.api = VoiceSIPServerTestMetricsApi() + + def tearDown(self) -> None: + pass + + def test_get_test_sip_server_results_models_validation(self) -> None: + """Test case for get_test_sip_server_results request and response models""" + + response_body_json = """ + { + "test" : { + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "savedEvent" : true, + "description" : "ThousandEyes Test", + "type" : "agent-to-server", + "enabled" : true, + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test" + }, + "endDate" : "2022-07-18T22:00:54Z", + "_links" : { + "next" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + }, + "previous" : { + "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" + } + }, + "results" : [ { + "date" : "2022-07-17T22:00:54Z", + "agent" : { + "agentId" : "281474976710706", + "agentName" : "thousandeyes-stg-va-254", + "location" : "San Francisco Bay Area", + "countryId" : "US" + }, + "_links" : { + "appLink" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "numRedirects" : 0, + "registerTime" : 21, + "optionsTime" : 17, + "optionsRequest" : "OPTIONS sip:6054@voice.sfo2.notarealco.com SIP/2.0\\r\\nVia: SIP/2.0/TCP 38.140.61.68:55431;branch=z9hG4bKRTzPzMoVh0;rport\\r\\nFrom: ;tag=cGaJDNKQFE\\r\\nTo: \\r\\nCall-ID: oO9WaL3av8@38.140.61.68\\r\\nCSeq: 3 OPTIONS\\r\\nContact: \\r\\nUser-Agent: ThousandEyes Test Call\\r\\nAllow: INVITE, ACK, CANCEL, BYE\\r\\nSupported: outbound, path\\r\\nMax-Forwards: 70\\r\\nExpires: 60\\r\\nContent-Length: 0\\r\\n\\r\\n\\nOPTIONS sip:6054@voice.sfo2.notarealco.com SIP/2.0\\r\\nVia: SIP/2.0/TCP 38.140.61.68:55431;branch=z9hG4bKRTzPzMoVh0;rport\\r\\nFrom: ;tag=cGaJDNKQFE\\r\\nTo: \\r\\nCall-ID: oO9WaL3av8@38.140.61.68\\r\\nCSeq: 4 OPTIONS\\r\\nContact: \\r\\nAuthorization: Digest username=\\"al6054\\", realm=\\"asterisk\\", nonce=\\"1598728080/4e3bef2c789bdfa45ce9123221e08c8f\\", uri=\\"sip:6054@voice.sfo2.notarealco.com\\", response=\\"83c538a39ff766cf75ffd1d62317b442\\", algorithm=MD5, cnonce=\\"0a4f113b\\", opaque=\\"748ffa241d840721\\", qop=auth, nc=00000001\\r\\nUser-Agent: ThousandEyes Test Call\\r\\nAllow: INVITE, ACK, CANCEL, BYE\\r\\nSupported: outbound, path\\r\\nMax-Forwards: 70\\r\\nExpires: 60\\r\\nContent-Length: 0\\r\\n\\r\\n", + "responseTime" : 12, + "totalTime" : 40, + "errorType" : "none", + "availability" : 100.0, + "responseCode" : 200, + "optionsResponse" : "SIP/2.0 401 Unauthorized\\r\\nVia: SIP/2.0/TCP 38.140.61.68:55431;rport=55431;received=38.140.61.68;branch=z9hG4bKRTzPzMoVh0\\r\\nCall-ID: oO9WaL3av8@38.140.61.68\\r\\nFrom: ;tag=cGaJDNKQFE\\r\\nTo: ;tag=z9hG4bKRTzPzMoVh0\\r\\nCSeq: 3 OPTIONS\\r\\nWWW-Authenticate: Digest realm=\\"asterisk\\",nonce=\\"1598728080/4e3bef2c789bdfa45ce9123221e08c8f\\",opaque=\\"748ffa241d840721\\",algorithm=md5,qop=\\"auth\\"\\r\\nServer: Asterisk PBX 16.4.0\\r\\nContent-Length: 0\\r\\n\\r\\n\\nSIP/2.0 200 OK\\r\\nVia: SIP/2.0/TCP 38.140.61.68:55431;rport=55431;received=38.140.61.68;branch=z9hG4bKRTzPzMoVh0\\r\\nCall-ID: oO9WaL3av8@38.140.61.68\\r\\nFrom: ;tag=cGaJDNKQFE\\r\\nTo: ;tag=z9hG4bKRTzPzMoVh0\\r\\nCSeq: 4 OPTIONS\\r\\nAccept: application/xpidf+xml, application/cpim-pidf+xml, application/simple-message-summary, application/pidf+xml, application/dialog-info+xml, application/simple-message-summary, application/pidf+xml, application/dialog-info+xml, application/sdp, message/sipfrag;version=2.0\\r\\nAllow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER\\r\\nSupported: 100rel, timer, replaces, norefersub\\r\\nAccept-Encoding: text/plain\\r\\nAccept-Language: en\\r\\nServer: Asterisk PBX 16.4.0\\r\\nContent-Length: 0\\r\\n\\r\\n", + "problemDetail" : "problemDetail", + "connectTime" : 5, + "dnsTime" : 2, + "serverIp" : "193.2.1.88", + "startTime" : 1384309800, + "endTime" : 1384309800, + "roundId" : 1384309800, + "waitTime" : 5, + "inviteTime" : 10 + }, { + "date" : "2022-07-17T22:00:54Z", + "agent" : { + "agentId" : "281474976710706", + "agentName" : "thousandeyes-stg-va-254", + "location" : "San Francisco Bay Area", + "countryId" : "US" + }, + "_links" : { + "appLink" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "numRedirects" : 0, + "registerTime" : 21, + "optionsTime" : 17, + "optionsRequest" : "OPTIONS sip:6054@voice.sfo2.notarealco.com SIP/2.0\\r\\nVia: SIP/2.0/TCP 38.140.61.68:55431;branch=z9hG4bKRTzPzMoVh0;rport\\r\\nFrom: ;tag=cGaJDNKQFE\\r\\nTo: \\r\\nCall-ID: oO9WaL3av8@38.140.61.68\\r\\nCSeq: 3 OPTIONS\\r\\nContact: \\r\\nUser-Agent: ThousandEyes Test Call\\r\\nAllow: INVITE, ACK, CANCEL, BYE\\r\\nSupported: outbound, path\\r\\nMax-Forwards: 70\\r\\nExpires: 60\\r\\nContent-Length: 0\\r\\n\\r\\n\\nOPTIONS sip:6054@voice.sfo2.notarealco.com SIP/2.0\\r\\nVia: SIP/2.0/TCP 38.140.61.68:55431;branch=z9hG4bKRTzPzMoVh0;rport\\r\\nFrom: ;tag=cGaJDNKQFE\\r\\nTo: \\r\\nCall-ID: oO9WaL3av8@38.140.61.68\\r\\nCSeq: 4 OPTIONS\\r\\nContact: \\r\\nAuthorization: Digest username=\\"al6054\\", realm=\\"asterisk\\", nonce=\\"1598728080/4e3bef2c789bdfa45ce9123221e08c8f\\", uri=\\"sip:6054@voice.sfo2.notarealco.com\\", response=\\"83c538a39ff766cf75ffd1d62317b442\\", algorithm=MD5, cnonce=\\"0a4f113b\\", opaque=\\"748ffa241d840721\\", qop=auth, nc=00000001\\r\\nUser-Agent: ThousandEyes Test Call\\r\\nAllow: INVITE, ACK, CANCEL, BYE\\r\\nSupported: outbound, path\\r\\nMax-Forwards: 70\\r\\nExpires: 60\\r\\nContent-Length: 0\\r\\n\\r\\n", + "responseTime" : 12, + "totalTime" : 40, + "errorType" : "none", + "availability" : 100.0, + "responseCode" : 200, + "optionsResponse" : "SIP/2.0 401 Unauthorized\\r\\nVia: SIP/2.0/TCP 38.140.61.68:55431;rport=55431;received=38.140.61.68;branch=z9hG4bKRTzPzMoVh0\\r\\nCall-ID: oO9WaL3av8@38.140.61.68\\r\\nFrom: ;tag=cGaJDNKQFE\\r\\nTo: ;tag=z9hG4bKRTzPzMoVh0\\r\\nCSeq: 3 OPTIONS\\r\\nWWW-Authenticate: Digest realm=\\"asterisk\\",nonce=\\"1598728080/4e3bef2c789bdfa45ce9123221e08c8f\\",opaque=\\"748ffa241d840721\\",algorithm=md5,qop=\\"auth\\"\\r\\nServer: Asterisk PBX 16.4.0\\r\\nContent-Length: 0\\r\\n\\r\\n\\nSIP/2.0 200 OK\\r\\nVia: SIP/2.0/TCP 38.140.61.68:55431;rport=55431;received=38.140.61.68;branch=z9hG4bKRTzPzMoVh0\\r\\nCall-ID: oO9WaL3av8@38.140.61.68\\r\\nFrom: ;tag=cGaJDNKQFE\\r\\nTo: ;tag=z9hG4bKRTzPzMoVh0\\r\\nCSeq: 4 OPTIONS\\r\\nAccept: application/xpidf+xml, application/cpim-pidf+xml, application/simple-message-summary, application/pidf+xml, application/dialog-info+xml, application/simple-message-summary, application/pidf+xml, application/dialog-info+xml, application/sdp, message/sipfrag;version=2.0\\r\\nAllow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER\\r\\nSupported: 100rel, timer, replaces, norefersub\\r\\nAccept-Encoding: text/plain\\r\\nAccept-Language: en\\r\\nServer: Asterisk PBX 16.4.0\\r\\nContent-Length: 0\\r\\n\\r\\n", + "problemDetail" : "problemDetail", + "connectTime" : 5, + "dnsTime" : 2, + "serverIp" : "193.2.1.88", + "startTime" : 1384309800, + "endTime" : 1384309800, + "roundId" : 1384309800, + "waitTime" : 5, + "inviteTime" : 10 + } ], + "startDate" : "2022-07-17T22:00:54Z" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.test_results.models.SipServerTestResults.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-test-results/test/test_web_ftp_server_test_metrics_api.py b/thousandeyes-sdk-test-results/test/test_web_ftp_server_test_metrics_api.py new file mode 100644 index 00000000..767076af --- /dev/null +++ b/thousandeyes-sdk-test-results/test/test_web_ftp_server_test_metrics_api.py @@ -0,0 +1,184 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.test_results.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.test_results.api.web_ftp_server_test_metrics_api import WebFTPServerTestMetricsApi + + +class TestWebFTPServerTestMetricsApi(unittest.TestCase): + """WebFTPServerTestMetricsApi unit test stubs""" + + def setUp(self) -> None: + self.api = WebFTPServerTestMetricsApi() + + def tearDown(self) -> None: + pass + + def test_get_test_ftp_server_results_models_validation(self) -> None: + """Test case for get_test_ftp_server_results request and response models""" + + response_body_json = """ + { + "test" : { + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "savedEvent" : true, + "description" : "ThousandEyes Test", + "type" : "agent-to-server", + "enabled" : true, + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test" + }, + "endDate" : "2022-07-18T22:00:54Z", + "_links" : { + "next" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + }, + "previous" : { + "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" + } + }, + "results" : [ { + "date" : "2022-07-17T22:00:54Z", + "agent" : { + "agentId" : "281474976710706", + "agentName" : "thousandeyes-stg-va-254", + "location" : "San Francisco Bay Area", + "countryId" : "US" + }, + "transferTime" : 99.865, + "_links" : { + "appLink" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "negotiationTime" : 503.413, + "responseTime" : 0.589, + "totalTime" : 705.554, + "errorType" : "None", + "responseCode" : 226, + "dnsTime" : 0.589, + "connectTime" : 50.153, + "serverIp" : "193.2.1.88", + "startTime" : 1384309800, + "endTime" : 1384309800, + "throughput" : 123, + "roundId" : 1384309800, + "waitTime" : 52.1, + "wireSize" : 22172, + "errorDetails" : "Connection error" + }, { + "date" : "2022-07-17T22:00:54Z", + "agent" : { + "agentId" : "281474976710706", + "agentName" : "thousandeyes-stg-va-254", + "location" : "San Francisco Bay Area", + "countryId" : "US" + }, + "transferTime" : 99.865, + "_links" : { + "appLink" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "negotiationTime" : 503.413, + "responseTime" : 0.589, + "totalTime" : 705.554, + "errorType" : "None", + "responseCode" : 226, + "dnsTime" : 0.589, + "connectTime" : 50.153, + "serverIp" : "193.2.1.88", + "startTime" : 1384309800, + "endTime" : 1384309800, + "throughput" : 123, + "roundId" : 1384309800, + "waitTime" : 52.1, + "wireSize" : 22172, + "errorDetails" : "Connection error" + } ], + "startDate" : "2022-07-17T22:00:54Z" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.test_results.models.FtpServerTestResults.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-test-results/test/test_web_http_server_test_metrics_api.py b/thousandeyes-sdk-test-results/test/test_web_http_server_test_metrics_api.py new file mode 100644 index 00000000..8e708266 --- /dev/null +++ b/thousandeyes-sdk-test-results/test/test_web_http_server_test_metrics_api.py @@ -0,0 +1,238 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.test_results.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.test_results.api.web_http_server_test_metrics_api import WebHTTPServerTestMetricsApi + + +class TestWebHTTPServerTestMetricsApi(unittest.TestCase): + """WebHTTPServerTestMetricsApi unit test stubs""" + + def setUp(self) -> None: + self.api = WebHTTPServerTestMetricsApi() + + def tearDown(self) -> None: + pass + + def test_get_test_http_server_results_models_validation(self) -> None: + """Test case for get_test_http_server_results request and response models""" + + response_body_json = """ + { + "test" : { + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "savedEvent" : true, + "description" : "ThousandEyes Test", + "type" : "agent-to-server", + "enabled" : true, + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test" + }, + "endDate" : "2022-07-18T22:00:54Z", + "_links" : { + "next" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + }, + "previous" : { + "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" + } + }, + "results" : [ { + "date" : "2022-07-17T22:00:54Z", + "agent" : { + "agentId" : "281474976710706", + "agentName" : "thousandeyes-stg-va-254", + "location" : "San Francisco Bay Area", + "countryId" : "US" + }, + "sslVersion" : "TLSv1.3", + "_links" : { + "appLink" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "numRedirects" : 0, + "errorType" : "None", + "responseCode" : 200, + "connectTime" : 2, + "startTime" : 1384309800, + "throughput" : 123.0, + "roundId" : 1384309800, + "headers" : { + "requestHeaders" : "GET / HTTP/1.1\\r\\nHost: www.thousandeyes.com\\r\\nUser-Agent: curl/7.58.0-DEV\\r\\nAccept: */*\\r\\nAccept-Encoding: deflate, gzip\\r\\nX-ThousandEyes-Agent: yes\\r\\n", + "responseHeaders" : "HTTP/1.1 200 OK\\r\\nContent-Type: text/html;charset=UTF-8\\r\\nContent-Length: 9993\\r\\nConnection: keep-alive\\r\\nDate: Mon, 04 May 2020 16:13:00 GMT\\r\\nServer: Apache\\r\\nContent-Language: en-US\\r\\nContent-Encoding: gzip\\r\\nX-Frame-Options: sameorigin\\r\\nCache-Control: max-age=600, must-revalidate\\r\\nStrict-Transport-Security: max-age=31536000\\r\\nX-Content-Type-Options: nosniff\\r\\nX-XSS-Protection: 1; mode=block\\r\\nVary: Accept-Encoding\\r\\nX-Cache: Hit from cloudfront\\r\\nVia: 1.1 7ba3caf71ae7a52dd411d1a543e80cd8.cloudfront.net (CloudFront)\\r\\nX-Amz-Cf-Pop: SFO5-C3\\r\\nX-Amz-Cf-Id: w4h42tkoJD-rEpkRDZUvnQBmy26GVGe6pUsuRr1Dphf7oajYbjXaOA==\\r\\nAge: 132\\r\\n" + }, + "sslCipher" : "sslCipher", + "redirectTime" : 10, + "sslCertificates" : [ { + "hasValidSigningCert" : false, + "issuerName" : "DigiCert SHA2 Extended Validation Server CA", + "subjectAlternativeNames" : [ "www.thousandeyes.com", "thousandeyes.com" ], + "isFetchDateInValidCertDateRange" : true, + "validBefore" : "2020-05-12T12:00:00Z", + "daysUntilExpiry" : 0, + "validAfter" : "2018-03-27T00:00:00Z", + "subjectName" : "www.thousandeyes.com" + }, { + "hasValidSigningCert" : false, + "issuerName" : "DigiCert SHA2 Extended Validation Server CA", + "subjectAlternativeNames" : [ "www.thousandeyes.com", "thousandeyes.com" ], + "isFetchDateInValidCertDateRange" : true, + "validBefore" : "2020-05-12T12:00:00Z", + "daysUntilExpiry" : 0, + "validAfter" : "2018-03-27T00:00:00Z", + "subjectName" : "www.thousandeyes.com" + } ], + "responseTime" : 14, + "totalTime" : 15, + "receiveTime" : 1, + "dnsTime" : 0, + "serverIp" : "193.2.1.88", + "sslTime" : 9, + "endTime" : 1384309800, + "waitTime" : 3, + "wireSize" : 9993, + "errorDetails" : "Connection error" + }, { + "date" : "2022-07-17T22:00:54Z", + "agent" : { + "agentId" : "281474976710706", + "agentName" : "thousandeyes-stg-va-254", + "location" : "San Francisco Bay Area", + "countryId" : "US" + }, + "sslVersion" : "TLSv1.3", + "_links" : { + "appLink" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "numRedirects" : 0, + "errorType" : "None", + "responseCode" : 200, + "connectTime" : 2, + "startTime" : 1384309800, + "throughput" : 123.0, + "roundId" : 1384309800, + "headers" : { + "requestHeaders" : "GET / HTTP/1.1\\r\\nHost: www.thousandeyes.com\\r\\nUser-Agent: curl/7.58.0-DEV\\r\\nAccept: */*\\r\\nAccept-Encoding: deflate, gzip\\r\\nX-ThousandEyes-Agent: yes\\r\\n", + "responseHeaders" : "HTTP/1.1 200 OK\\r\\nContent-Type: text/html;charset=UTF-8\\r\\nContent-Length: 9993\\r\\nConnection: keep-alive\\r\\nDate: Mon, 04 May 2020 16:13:00 GMT\\r\\nServer: Apache\\r\\nContent-Language: en-US\\r\\nContent-Encoding: gzip\\r\\nX-Frame-Options: sameorigin\\r\\nCache-Control: max-age=600, must-revalidate\\r\\nStrict-Transport-Security: max-age=31536000\\r\\nX-Content-Type-Options: nosniff\\r\\nX-XSS-Protection: 1; mode=block\\r\\nVary: Accept-Encoding\\r\\nX-Cache: Hit from cloudfront\\r\\nVia: 1.1 7ba3caf71ae7a52dd411d1a543e80cd8.cloudfront.net (CloudFront)\\r\\nX-Amz-Cf-Pop: SFO5-C3\\r\\nX-Amz-Cf-Id: w4h42tkoJD-rEpkRDZUvnQBmy26GVGe6pUsuRr1Dphf7oajYbjXaOA==\\r\\nAge: 132\\r\\n" + }, + "sslCipher" : "sslCipher", + "redirectTime" : 10, + "sslCertificates" : [ { + "hasValidSigningCert" : false, + "issuerName" : "DigiCert SHA2 Extended Validation Server CA", + "subjectAlternativeNames" : [ "www.thousandeyes.com", "thousandeyes.com" ], + "isFetchDateInValidCertDateRange" : true, + "validBefore" : "2020-05-12T12:00:00Z", + "daysUntilExpiry" : 0, + "validAfter" : "2018-03-27T00:00:00Z", + "subjectName" : "www.thousandeyes.com" + }, { + "hasValidSigningCert" : false, + "issuerName" : "DigiCert SHA2 Extended Validation Server CA", + "subjectAlternativeNames" : [ "www.thousandeyes.com", "thousandeyes.com" ], + "isFetchDateInValidCertDateRange" : true, + "validBefore" : "2020-05-12T12:00:00Z", + "daysUntilExpiry" : 0, + "validAfter" : "2018-03-27T00:00:00Z", + "subjectName" : "www.thousandeyes.com" + } ], + "responseTime" : 14, + "totalTime" : 15, + "receiveTime" : 1, + "dnsTime" : 0, + "serverIp" : "193.2.1.88", + "sslTime" : 9, + "endTime" : 1384309800, + "waitTime" : 3, + "wireSize" : 9993, + "errorDetails" : "Connection error" + } ], + "startDate" : "2022-07-17T22:00:54Z" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.test_results.models.HttpTestResults.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-test-results/test/test_web_page_load_test_metrics_api.py b/thousandeyes-sdk-test-results/test/test_web_page_load_test_metrics_api.py new file mode 100644 index 00000000..a102a041 --- /dev/null +++ b/thousandeyes-sdk-test-results/test/test_web_page_load_test_metrics_api.py @@ -0,0 +1,736 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.test_results.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.test_results.api.web_page_load_test_metrics_api import WebPageLoadTestMetricsApi + + +class TestWebPageLoadTestMetricsApi(unittest.TestCase): + """WebPageLoadTestMetricsApi unit test stubs""" + + def setUp(self) -> None: + self.api = WebPageLoadTestMetricsApi() + + def tearDown(self) -> None: + pass + + def test_get_test_page_load_agent_round_results_models_validation(self) -> None: + """Test case for get_test_page_load_agent_round_results request and response models""" + + response_body_json = """ + { + "test" : { + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "savedEvent" : true, + "description" : "ThousandEyes Test", + "type" : "agent-to-server", + "enabled" : true, + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test" + }, + "_links" : { + "next" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + }, + "previous" : { + "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" + } + }, + "results" : [ { + "date" : "2022-07-17T22:00:54Z", + "agent" : { + "agentId" : "281474976710706", + "agentName" : "thousandeyes-stg-va-254", + "location" : "San Francisco Bay Area", + "countryId" : "US" + }, + "numErrors" : 0, + "_links" : { + "appLink" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "responseTime" : 34.35, + "pageLoadTime" : 352, + "numObjects" : 17, + "totalSize" : 403301, + "domLoadTime" : 352, + "har" : { + "log" : { + "creator" : { + "name" : "ThousandEyes DB Exporter" + }, + "entries" : [ { + "pageref" : "page_0", + "request" : { + "headers" : [ { + "name" : ":authority", + "value" : "google.com" + }, { + "name" : ":method", + "value" : "GET" + }, { + "name" : ":path", + "value" : "/" + }, { + "name" : ":scheme", + "value" : "https" + }, { + "name" : "accept", + "value" : "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8" + }, { + "name" : "accept-encoding", + "value" : "gzip, deflate, br" + }, { + "name" : "accept-language", + "value" : "en-US,en;q=0.9" + }, { + "name" : "upgrade-insecure-requests", + "value" : "1" + }, { + "name" : "user-agent", + "value" : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.83 Safari/537.36" + }, { + "name" : "x-thousandeyes-agent", + "value" : "yes" + } ], + "method" : "GET", + "url" : "https://google.com/" + }, + "response" : { + "bodySize" : 220, + "content" : { + "mimeType" : "text/html", + "size" : 220 + }, + "headers" : [ { + "name" : "alt-svc", + "value" : "quic=\\":443\\"; ma=2592000; v=\\"46,43\\",h3-Q050=\\":443\\"; ma=2592000,h3-Q049=\\":443\\"; ma=2592000,h3-Q048=\\":443\\"; ma=2592000,h3-Q046=\\":443\\"; ma=2592000,h3-Q043=\\":443\\"; ma=2592000" + }, { + "name" : "cache-control", + "value" : "public, max-age=2592000" + }, { + "name" : "content-length", + "value" : "220" + }, { + "name" : "content-type", + "value" : "text/html; charset=UTF-8" + }, { + "name" : "date", + "value" : "Fri, 15 Nov 2019 16:41:54 GMT" + }, { + "name" : "expires", + "value" : "Sun, 15 Dec 2019 16:41:54 GMT" + }, { + "name" : "location", + "value" : "https://www.google.com/" + }, { + "name" : "server", + "value" : "gws" + }, { + "name" : "status", + "value" : "301" + }, { + "name" : "x-frame-options", + "value" : "SAMEORIGIN" + }, { + "name" : "x-xss-protection", + "value" : "0" + } ], + "headersSize" : 471, + "redirectURL" : "", + "status" : 301, + "statusText" : "MOVED_PERMANENTLY" + }, + "serverIPAddress" : "172.217.6.110", + "startedDateTime" : "2019-11-15T16:41:54.798Z", + "time" : 71, + "timings" : { + "blocked" : 2, + "connect" : 16, + "dns" : 1, + "receive" : 1, + "send" : 0, + "ssl" : 14, + "wait" : 50 + } + }, { + "pageref" : "page_0", + "request" : { + "headers" : [ { + "name" : ":authority", + "value" : "www.google.com" + }, { + "name" : ":method", + "value" : "GET" + }, { + "name" : ":path", + "value" : "/" + }, { + "name" : ":scheme", + "value" : "https" + }, { + "name" : "accept", + "value" : "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8" + }, { + "name" : "accept-encoding", + "value" : "gzip, deflate, br" + }, { + "name" : "accept-language", + "value" : "en-US,en;q=0.9" + }, { + "name" : "upgrade-insecure-requests", + "value" : "1" + }, { + "name" : "user-agent", + "value" : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.83 Safari/537.36" + }, { + "name" : "x-thousandeyes-agent", + "value" : "yes" + } ], + "method" : "GET", + "url" : "https://www.google.com/" + }, + "response" : { + "bodySize" : 65214, + "content" : { + "mimeType" : "text/html", + "size" : 225039 + }, + "headers" : [ { + "name" : "alt-svc", + "value" : "quic=\\":443\\"; ma=2592000; v=\\"46,43\\",h3-Q050=\\":443\\"; ma=2592000,h3-Q049=\\":443\\"; ma=2592000,h3-Q048=\\":443\\"; ma=2592000,h3-Q046=\\":443\\"; ma=2592000,h3-Q043=\\":443\\"; ma=2592000" + }, { + "name" : "cache-control", + "value" : "private, max-age=0" + }, { + "name" : "content-encoding", + "value" : "br" + }, { + "name" : "content-length", + "value" : "65214" + }, { + "name" : "content-type", + "value" : "text/html; charset=UTF-8" + }, { + "name" : "date", + "value" : "Fri, 15 Nov 2019 16:41:54 GMT" + }, { + "name" : "expires", + "value" : "-1" + }, { + "name" : "p3p", + "value" : "CP=\\"This is not a P3P policy! See g.co/p3phelp for more info.\\"" + }, { + "name" : "server", + "value" : "gws" + }, { + "name" : "set-cookie", + "value" : "(removed)" + }, { + "name" : "status", + "value" : "200" + }, { + "name" : "strict-transport-security", + "value" : "max-age=31536000" + }, { + "name" : "x-frame-options", + "value" : "SAMEORIGIN" + }, { + "name" : "x-xss-protection", + "value" : "0" + } ], + "headersSize" : 915, + "redirectURL" : "", + "status" : 200, + "statusText" : "OK" + }, + "serverIPAddress" : "172.217.4.196", + "startedDateTime" : "2019-11-15T16:41:54.870Z", + "time" : 182, + "timings" : { + "blocked" : 2, + "connect" : 4, + "dns" : 0, + "receive" : 58, + "send" : 0, + "ssl" : 2, + "wait" : 118 + } + } ], + "pages" : [ { + "id" : "page_0", + "pageTimings" : { + "onContentLoad" : 367, + "onLoad" : 737 + }, + "responseCode" : 0, + "startedDateTime" : "2019-11-15T16:41:54.796Z", + "title" : "Google" + } ], + "version" : "1.2" + } + }, + "startTime" : 1384309800, + "endTime" : 1384309800, + "roundId" : 1384309800 + }, { + "date" : "2022-07-17T22:00:54Z", + "agent" : { + "agentId" : "281474976710706", + "agentName" : "thousandeyes-stg-va-254", + "location" : "San Francisco Bay Area", + "countryId" : "US" + }, + "numErrors" : 0, + "_links" : { + "appLink" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "responseTime" : 34.35, + "pageLoadTime" : 352, + "numObjects" : 17, + "totalSize" : 403301, + "domLoadTime" : 352, + "har" : { + "log" : { + "creator" : { + "name" : "ThousandEyes DB Exporter" + }, + "entries" : [ { + "pageref" : "page_0", + "request" : { + "headers" : [ { + "name" : ":authority", + "value" : "google.com" + }, { + "name" : ":method", + "value" : "GET" + }, { + "name" : ":path", + "value" : "/" + }, { + "name" : ":scheme", + "value" : "https" + }, { + "name" : "accept", + "value" : "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8" + }, { + "name" : "accept-encoding", + "value" : "gzip, deflate, br" + }, { + "name" : "accept-language", + "value" : "en-US,en;q=0.9" + }, { + "name" : "upgrade-insecure-requests", + "value" : "1" + }, { + "name" : "user-agent", + "value" : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.83 Safari/537.36" + }, { + "name" : "x-thousandeyes-agent", + "value" : "yes" + } ], + "method" : "GET", + "url" : "https://google.com/" + }, + "response" : { + "bodySize" : 220, + "content" : { + "mimeType" : "text/html", + "size" : 220 + }, + "headers" : [ { + "name" : "alt-svc", + "value" : "quic=\\":443\\"; ma=2592000; v=\\"46,43\\",h3-Q050=\\":443\\"; ma=2592000,h3-Q049=\\":443\\"; ma=2592000,h3-Q048=\\":443\\"; ma=2592000,h3-Q046=\\":443\\"; ma=2592000,h3-Q043=\\":443\\"; ma=2592000" + }, { + "name" : "cache-control", + "value" : "public, max-age=2592000" + }, { + "name" : "content-length", + "value" : "220" + }, { + "name" : "content-type", + "value" : "text/html; charset=UTF-8" + }, { + "name" : "date", + "value" : "Fri, 15 Nov 2019 16:41:54 GMT" + }, { + "name" : "expires", + "value" : "Sun, 15 Dec 2019 16:41:54 GMT" + }, { + "name" : "location", + "value" : "https://www.google.com/" + }, { + "name" : "server", + "value" : "gws" + }, { + "name" : "status", + "value" : "301" + }, { + "name" : "x-frame-options", + "value" : "SAMEORIGIN" + }, { + "name" : "x-xss-protection", + "value" : "0" + } ], + "headersSize" : 471, + "redirectURL" : "", + "status" : 301, + "statusText" : "MOVED_PERMANENTLY" + }, + "serverIPAddress" : "172.217.6.110", + "startedDateTime" : "2019-11-15T16:41:54.798Z", + "time" : 71, + "timings" : { + "blocked" : 2, + "connect" : 16, + "dns" : 1, + "receive" : 1, + "send" : 0, + "ssl" : 14, + "wait" : 50 + } + }, { + "pageref" : "page_0", + "request" : { + "headers" : [ { + "name" : ":authority", + "value" : "www.google.com" + }, { + "name" : ":method", + "value" : "GET" + }, { + "name" : ":path", + "value" : "/" + }, { + "name" : ":scheme", + "value" : "https" + }, { + "name" : "accept", + "value" : "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8" + }, { + "name" : "accept-encoding", + "value" : "gzip, deflate, br" + }, { + "name" : "accept-language", + "value" : "en-US,en;q=0.9" + }, { + "name" : "upgrade-insecure-requests", + "value" : "1" + }, { + "name" : "user-agent", + "value" : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.83 Safari/537.36" + }, { + "name" : "x-thousandeyes-agent", + "value" : "yes" + } ], + "method" : "GET", + "url" : "https://www.google.com/" + }, + "response" : { + "bodySize" : 65214, + "content" : { + "mimeType" : "text/html", + "size" : 225039 + }, + "headers" : [ { + "name" : "alt-svc", + "value" : "quic=\\":443\\"; ma=2592000; v=\\"46,43\\",h3-Q050=\\":443\\"; ma=2592000,h3-Q049=\\":443\\"; ma=2592000,h3-Q048=\\":443\\"; ma=2592000,h3-Q046=\\":443\\"; ma=2592000,h3-Q043=\\":443\\"; ma=2592000" + }, { + "name" : "cache-control", + "value" : "private, max-age=0" + }, { + "name" : "content-encoding", + "value" : "br" + }, { + "name" : "content-length", + "value" : "65214" + }, { + "name" : "content-type", + "value" : "text/html; charset=UTF-8" + }, { + "name" : "date", + "value" : "Fri, 15 Nov 2019 16:41:54 GMT" + }, { + "name" : "expires", + "value" : "-1" + }, { + "name" : "p3p", + "value" : "CP=\\"This is not a P3P policy! See g.co/p3phelp for more info.\\"" + }, { + "name" : "server", + "value" : "gws" + }, { + "name" : "set-cookie", + "value" : "(removed)" + }, { + "name" : "status", + "value" : "200" + }, { + "name" : "strict-transport-security", + "value" : "max-age=31536000" + }, { + "name" : "x-frame-options", + "value" : "SAMEORIGIN" + }, { + "name" : "x-xss-protection", + "value" : "0" + } ], + "headersSize" : 915, + "redirectURL" : "", + "status" : 200, + "statusText" : "OK" + }, + "serverIPAddress" : "172.217.4.196", + "startedDateTime" : "2019-11-15T16:41:54.870Z", + "time" : 182, + "timings" : { + "blocked" : 2, + "connect" : 4, + "dns" : 0, + "receive" : 58, + "send" : 0, + "ssl" : 2, + "wait" : 118 + } + } ], + "pages" : [ { + "id" : "page_0", + "pageTimings" : { + "onContentLoad" : 367, + "onLoad" : 737 + }, + "responseCode" : 0, + "startedDateTime" : "2019-11-15T16:41:54.796Z", + "title" : "Google" + } ], + "version" : "1.2" + } + }, + "startTime" : 1384309800, + "endTime" : 1384309800, + "roundId" : 1384309800 + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.test_results.models.PageLoadDetailTestResults.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_test_page_load_results_models_validation(self) -> None: + """Test case for get_test_page_load_results request and response models""" + + response_body_json = """ + { + "test" : { + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "savedEvent" : true, + "description" : "ThousandEyes Test", + "type" : "agent-to-server", + "enabled" : true, + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test" + }, + "endDate" : "2022-07-18T22:00:54Z", + "_links" : { + "next" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + }, + "previous" : { + "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" + } + }, + "results" : [ { + "date" : "2022-07-17T22:00:54Z", + "agent" : { + "agentId" : "281474976710706", + "agentName" : "thousandeyes-stg-va-254", + "location" : "San Francisco Bay Area", + "countryId" : "US" + }, + "totalSize" : 403301, + "numErrors" : 0, + "_links" : { + "appLink" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "responseTime" : 34.35, + "domLoadTime" : 352, + "startTime" : 1384309800, + "pageLoadTime" : 352, + "endTime" : 1384309800, + "roundId" : 1384309800, + "numObjects" : 17 + }, { + "date" : "2022-07-17T22:00:54Z", + "agent" : { + "agentId" : "281474976710706", + "agentName" : "thousandeyes-stg-va-254", + "location" : "San Francisco Bay Area", + "countryId" : "US" + }, + "totalSize" : 403301, + "numErrors" : 0, + "_links" : { + "appLink" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "responseTime" : 34.35, + "domLoadTime" : 352, + "startTime" : 1384309800, + "pageLoadTime" : 352, + "endTime" : 1384309800, + "roundId" : 1384309800, + "numObjects" : 17 + } ], + "startDate" : "2022-07-17T22:00:54Z" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.test_results.models.PageLoadTestResults.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-test-results/test/test_web_transactions_test_metrics_api.py b/thousandeyes-sdk-test-results/test/test_web_transactions_test_metrics_api.py new file mode 100644 index 00000000..6d3ad68e --- /dev/null +++ b/thousandeyes-sdk-test-results/test/test_web_transactions_test_metrics_api.py @@ -0,0 +1,938 @@ +# coding: utf-8 + +""" + Test Results API + + Get test result metrics for Cloud and Enterprise Agent tests. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.test_results.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.test_results.api.web_transactions_test_metrics_api import WebTransactionsTestMetricsApi + + +class TestWebTransactionsTestMetricsApi(unittest.TestCase): + """WebTransactionsTestMetricsApi unit test stubs""" + + def setUp(self) -> None: + self.api = WebTransactionsTestMetricsApi() + + def tearDown(self) -> None: + pass + + def test_get_test_web_transaction_agent_round_page_results_models_validation(self) -> None: + """Test case for get_test_web_transaction_agent_round_page_results request and response models""" + + response_body_json = """ + { + "test" : { + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "savedEvent" : true, + "description" : "ThousandEyes Test", + "type" : "agent-to-server", + "enabled" : true, + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test" + }, + "_links" : { + "next" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + }, + "previous" : { + "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" + } + }, + "results" : [ { + "date" : "2022-07-17T22:00:54Z", + "agent" : { + "agentId" : "281474976710706", + "agentName" : "thousandeyes-stg-va-254", + "location" : "San Francisco Bay Area", + "countryId" : "US" + }, + "_links" : { + "appLink" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "componentErrors" : 5, + "errorType" : "None", + "transactionTime" : 2379, + "pages" : [ { + "duration" : 1117.5660001039505, + "componentCount" : 136, + "pageNum" : 0, + "pageName" : "Google", + "errorCount" : 0 + }, { + "duration" : 1117.5660001039505, + "componentCount" : 136, + "pageNum" : 0, + "pageName" : "Google", + "errorCount" : 0 + } ], + "har" : { + "log" : { + "creator" : { + "name" : "ThousandEyes DB Exporter" + }, + "entries" : [ { + "pageref" : "page_0", + "request" : { + "headers" : [ { + "name" : ":authority", + "value" : "google.com" + }, { + "name" : ":method", + "value" : "GET" + }, { + "name" : ":path", + "value" : "/" + }, { + "name" : ":scheme", + "value" : "https" + }, { + "name" : "accept", + "value" : "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8" + }, { + "name" : "accept-encoding", + "value" : "gzip, deflate, br" + }, { + "name" : "accept-language", + "value" : "en-US,en;q=0.9" + }, { + "name" : "upgrade-insecure-requests", + "value" : "1" + }, { + "name" : "user-agent", + "value" : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.83 Safari/537.36" + }, { + "name" : "x-thousandeyes-agent", + "value" : "yes" + } ], + "method" : "GET", + "url" : "https://google.com/" + }, + "response" : { + "bodySize" : 220, + "content" : { + "mimeType" : "text/html", + "size" : 220 + }, + "headers" : [ { + "name" : "alt-svc", + "value" : "quic=\\":443\\"; ma=2592000; v=\\"46,43\\",h3-Q050=\\":443\\"; ma=2592000,h3-Q049=\\":443\\"; ma=2592000,h3-Q048=\\":443\\"; ma=2592000,h3-Q046=\\":443\\"; ma=2592000,h3-Q043=\\":443\\"; ma=2592000" + }, { + "name" : "cache-control", + "value" : "public, max-age=2592000" + }, { + "name" : "content-length", + "value" : "220" + }, { + "name" : "content-type", + "value" : "text/html; charset=UTF-8" + }, { + "name" : "date", + "value" : "Fri, 15 Nov 2019 16:41:54 GMT" + }, { + "name" : "expires", + "value" : "Sun, 15 Dec 2019 16:41:54 GMT" + }, { + "name" : "location", + "value" : "https://www.google.com/" + }, { + "name" : "server", + "value" : "gws" + }, { + "name" : "status", + "value" : "301" + }, { + "name" : "x-frame-options", + "value" : "SAMEORIGIN" + }, { + "name" : "x-xss-protection", + "value" : "0" + } ], + "headersSize" : 471, + "redirectURL" : "", + "status" : 301, + "statusText" : "MOVED_PERMANENTLY" + }, + "serverIPAddress" : "172.217.6.110", + "startedDateTime" : "2019-11-15T16:41:54.798Z", + "time" : 71, + "timings" : { + "blocked" : 2, + "connect" : 16, + "dns" : 1, + "receive" : 1, + "send" : 0, + "ssl" : 14, + "wait" : 50 + } + }, { + "pageref" : "page_0", + "request" : { + "headers" : [ { + "name" : ":authority", + "value" : "www.google.com" + }, { + "name" : ":method", + "value" : "GET" + }, { + "name" : ":path", + "value" : "/" + }, { + "name" : ":scheme", + "value" : "https" + }, { + "name" : "accept", + "value" : "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8" + }, { + "name" : "accept-encoding", + "value" : "gzip, deflate, br" + }, { + "name" : "accept-language", + "value" : "en-US,en;q=0.9" + }, { + "name" : "upgrade-insecure-requests", + "value" : "1" + }, { + "name" : "user-agent", + "value" : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.83 Safari/537.36" + }, { + "name" : "x-thousandeyes-agent", + "value" : "yes" + } ], + "method" : "GET", + "url" : "https://www.google.com/" + }, + "response" : { + "bodySize" : 65214, + "content" : { + "mimeType" : "text/html", + "size" : 225039 + }, + "headers" : [ { + "name" : "alt-svc", + "value" : "quic=\\":443\\"; ma=2592000; v=\\"46,43\\",h3-Q050=\\":443\\"; ma=2592000,h3-Q049=\\":443\\"; ma=2592000,h3-Q048=\\":443\\"; ma=2592000,h3-Q046=\\":443\\"; ma=2592000,h3-Q043=\\":443\\"; ma=2592000" + }, { + "name" : "cache-control", + "value" : "private, max-age=0" + }, { + "name" : "content-encoding", + "value" : "br" + }, { + "name" : "content-length", + "value" : "65214" + }, { + "name" : "content-type", + "value" : "text/html; charset=UTF-8" + }, { + "name" : "date", + "value" : "Fri, 15 Nov 2019 16:41:54 GMT" + }, { + "name" : "expires", + "value" : "-1" + }, { + "name" : "p3p", + "value" : "CP=\\"This is not a P3P policy! See g.co/p3phelp for more info.\\"" + }, { + "name" : "server", + "value" : "gws" + }, { + "name" : "set-cookie", + "value" : "(removed)" + }, { + "name" : "status", + "value" : "200" + }, { + "name" : "strict-transport-security", + "value" : "max-age=31536000" + }, { + "name" : "x-frame-options", + "value" : "SAMEORIGIN" + }, { + "name" : "x-xss-protection", + "value" : "0" + } ], + "headersSize" : 915, + "redirectURL" : "", + "status" : 200, + "statusText" : "OK" + }, + "serverIPAddress" : "172.217.4.196", + "startedDateTime" : "2019-11-15T16:41:54.870Z", + "time" : 182, + "timings" : { + "blocked" : 2, + "connect" : 4, + "dns" : 0, + "receive" : 58, + "send" : 0, + "ssl" : 2, + "wait" : 118 + } + } ], + "pages" : [ { + "id" : "page_0", + "pageTimings" : { + "onContentLoad" : 367, + "onLoad" : 737 + }, + "responseCode" : 0, + "startedDateTime" : "2019-11-15T16:41:54.796Z", + "title" : "Google" + } ], + "version" : "1.2" + } + }, + "startTime" : 1384309800, + "endTime" : 1384309800, + "markers" : [ { + "duration" : 0, + "name" : "SearchForWebdriver" + }, { + "duration" : 0, + "name" : "SearchForWebdriver" + } ], + "roundId" : 1384309800, + "errorDetails" : "Connection error" + }, { + "date" : "2022-07-17T22:00:54Z", + "agent" : { + "agentId" : "281474976710706", + "agentName" : "thousandeyes-stg-va-254", + "location" : "San Francisco Bay Area", + "countryId" : "US" + }, + "_links" : { + "appLink" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "componentErrors" : 5, + "errorType" : "None", + "transactionTime" : 2379, + "pages" : [ { + "duration" : 1117.5660001039505, + "componentCount" : 136, + "pageNum" : 0, + "pageName" : "Google", + "errorCount" : 0 + }, { + "duration" : 1117.5660001039505, + "componentCount" : 136, + "pageNum" : 0, + "pageName" : "Google", + "errorCount" : 0 + } ], + "har" : { + "log" : { + "creator" : { + "name" : "ThousandEyes DB Exporter" + }, + "entries" : [ { + "pageref" : "page_0", + "request" : { + "headers" : [ { + "name" : ":authority", + "value" : "google.com" + }, { + "name" : ":method", + "value" : "GET" + }, { + "name" : ":path", + "value" : "/" + }, { + "name" : ":scheme", + "value" : "https" + }, { + "name" : "accept", + "value" : "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8" + }, { + "name" : "accept-encoding", + "value" : "gzip, deflate, br" + }, { + "name" : "accept-language", + "value" : "en-US,en;q=0.9" + }, { + "name" : "upgrade-insecure-requests", + "value" : "1" + }, { + "name" : "user-agent", + "value" : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.83 Safari/537.36" + }, { + "name" : "x-thousandeyes-agent", + "value" : "yes" + } ], + "method" : "GET", + "url" : "https://google.com/" + }, + "response" : { + "bodySize" : 220, + "content" : { + "mimeType" : "text/html", + "size" : 220 + }, + "headers" : [ { + "name" : "alt-svc", + "value" : "quic=\\":443\\"; ma=2592000; v=\\"46,43\\",h3-Q050=\\":443\\"; ma=2592000,h3-Q049=\\":443\\"; ma=2592000,h3-Q048=\\":443\\"; ma=2592000,h3-Q046=\\":443\\"; ma=2592000,h3-Q043=\\":443\\"; ma=2592000" + }, { + "name" : "cache-control", + "value" : "public, max-age=2592000" + }, { + "name" : "content-length", + "value" : "220" + }, { + "name" : "content-type", + "value" : "text/html; charset=UTF-8" + }, { + "name" : "date", + "value" : "Fri, 15 Nov 2019 16:41:54 GMT" + }, { + "name" : "expires", + "value" : "Sun, 15 Dec 2019 16:41:54 GMT" + }, { + "name" : "location", + "value" : "https://www.google.com/" + }, { + "name" : "server", + "value" : "gws" + }, { + "name" : "status", + "value" : "301" + }, { + "name" : "x-frame-options", + "value" : "SAMEORIGIN" + }, { + "name" : "x-xss-protection", + "value" : "0" + } ], + "headersSize" : 471, + "redirectURL" : "", + "status" : 301, + "statusText" : "MOVED_PERMANENTLY" + }, + "serverIPAddress" : "172.217.6.110", + "startedDateTime" : "2019-11-15T16:41:54.798Z", + "time" : 71, + "timings" : { + "blocked" : 2, + "connect" : 16, + "dns" : 1, + "receive" : 1, + "send" : 0, + "ssl" : 14, + "wait" : 50 + } + }, { + "pageref" : "page_0", + "request" : { + "headers" : [ { + "name" : ":authority", + "value" : "www.google.com" + }, { + "name" : ":method", + "value" : "GET" + }, { + "name" : ":path", + "value" : "/" + }, { + "name" : ":scheme", + "value" : "https" + }, { + "name" : "accept", + "value" : "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8" + }, { + "name" : "accept-encoding", + "value" : "gzip, deflate, br" + }, { + "name" : "accept-language", + "value" : "en-US,en;q=0.9" + }, { + "name" : "upgrade-insecure-requests", + "value" : "1" + }, { + "name" : "user-agent", + "value" : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.83 Safari/537.36" + }, { + "name" : "x-thousandeyes-agent", + "value" : "yes" + } ], + "method" : "GET", + "url" : "https://www.google.com/" + }, + "response" : { + "bodySize" : 65214, + "content" : { + "mimeType" : "text/html", + "size" : 225039 + }, + "headers" : [ { + "name" : "alt-svc", + "value" : "quic=\\":443\\"; ma=2592000; v=\\"46,43\\",h3-Q050=\\":443\\"; ma=2592000,h3-Q049=\\":443\\"; ma=2592000,h3-Q048=\\":443\\"; ma=2592000,h3-Q046=\\":443\\"; ma=2592000,h3-Q043=\\":443\\"; ma=2592000" + }, { + "name" : "cache-control", + "value" : "private, max-age=0" + }, { + "name" : "content-encoding", + "value" : "br" + }, { + "name" : "content-length", + "value" : "65214" + }, { + "name" : "content-type", + "value" : "text/html; charset=UTF-8" + }, { + "name" : "date", + "value" : "Fri, 15 Nov 2019 16:41:54 GMT" + }, { + "name" : "expires", + "value" : "-1" + }, { + "name" : "p3p", + "value" : "CP=\\"This is not a P3P policy! See g.co/p3phelp for more info.\\"" + }, { + "name" : "server", + "value" : "gws" + }, { + "name" : "set-cookie", + "value" : "(removed)" + }, { + "name" : "status", + "value" : "200" + }, { + "name" : "strict-transport-security", + "value" : "max-age=31536000" + }, { + "name" : "x-frame-options", + "value" : "SAMEORIGIN" + }, { + "name" : "x-xss-protection", + "value" : "0" + } ], + "headersSize" : 915, + "redirectURL" : "", + "status" : 200, + "statusText" : "OK" + }, + "serverIPAddress" : "172.217.4.196", + "startedDateTime" : "2019-11-15T16:41:54.870Z", + "time" : 182, + "timings" : { + "blocked" : 2, + "connect" : 4, + "dns" : 0, + "receive" : 58, + "send" : 0, + "ssl" : 2, + "wait" : 118 + } + } ], + "pages" : [ { + "id" : "page_0", + "pageTimings" : { + "onContentLoad" : 367, + "onLoad" : 737 + }, + "responseCode" : 0, + "startedDateTime" : "2019-11-15T16:41:54.796Z", + "title" : "Google" + } ], + "version" : "1.2" + } + }, + "startTime" : 1384309800, + "endTime" : 1384309800, + "markers" : [ { + "duration" : 0, + "name" : "SearchForWebdriver" + }, { + "duration" : 0, + "name" : "SearchForWebdriver" + } ], + "roundId" : 1384309800, + "errorDetails" : "Connection error" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.test_results.models.WebTransactionPageDetailTestResults.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_test_web_transaction_agent_round_results_models_validation(self) -> None: + """Test case for get_test_web_transaction_agent_round_results request and response models""" + + response_body_json = """ + { + "test" : { + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "savedEvent" : true, + "description" : "ThousandEyes Test", + "type" : "agent-to-server", + "enabled" : true, + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test" + }, + "_links" : { + "next" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + }, + "previous" : { + "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" + } + }, + "results" : [ { + "date" : "2022-07-17T22:00:54Z", + "agent" : { + "agentId" : "281474976710706", + "agentName" : "thousandeyes-stg-va-254", + "location" : "San Francisco Bay Area", + "countryId" : "US" + }, + "pages" : [ { + "duration" : 1117.5660001039505, + "componentCount" : 136, + "pageNum" : 0, + "pageName" : "Google", + "errorCount" : 0 + }, { + "duration" : 1117.5660001039505, + "componentCount" : 136, + "pageNum" : 0, + "pageName" : "Google", + "errorCount" : 0 + } ], + "_links" : { + "appLink" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "componentErrors" : 5, + "errorType" : "None", + "startTime" : 1384309800, + "endTime" : 1384309800, + "transactionTime" : 2379, + "markers" : [ { + "duration" : 0, + "name" : "SearchForWebdriver" + }, { + "duration" : 0, + "name" : "SearchForWebdriver" + } ], + "roundId" : 1384309800, + "errorDetails" : "Connection error" + }, { + "date" : "2022-07-17T22:00:54Z", + "agent" : { + "agentId" : "281474976710706", + "agentName" : "thousandeyes-stg-va-254", + "location" : "San Francisco Bay Area", + "countryId" : "US" + }, + "pages" : [ { + "duration" : 1117.5660001039505, + "componentCount" : 136, + "pageNum" : 0, + "pageName" : "Google", + "errorCount" : 0 + }, { + "duration" : 1117.5660001039505, + "componentCount" : 136, + "pageNum" : 0, + "pageName" : "Google", + "errorCount" : 0 + } ], + "_links" : { + "appLink" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "componentErrors" : 5, + "errorType" : "None", + "startTime" : 1384309800, + "endTime" : 1384309800, + "transactionTime" : 2379, + "markers" : [ { + "duration" : 0, + "name" : "SearchForWebdriver" + }, { + "duration" : 0, + "name" : "SearchForWebdriver" + } ], + "roundId" : 1384309800, + "errorDetails" : "Connection error" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.test_results.models.WebTransactionDetailTestResults.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_test_web_transaction_results_models_validation(self) -> None: + """Test case for get_test_web_transaction_results request and response models""" + + response_body_json = """ + { + "test" : { + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "savedEvent" : true, + "description" : "ThousandEyes Test", + "type" : "agent-to-server", + "enabled" : true, + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test" + }, + "endDate" : "2022-07-18T22:00:54Z", + "_links" : { + "next" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + }, + "previous" : { + "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" + } + }, + "results" : [ { + "date" : "2022-07-17T22:00:54Z", + "agent" : { + "agentId" : "281474976710706", + "agentName" : "thousandeyes-stg-va-254", + "location" : "San Francisco Bay Area", + "countryId" : "US" + }, + "_links" : { + "appLink" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "componentErrors" : 5, + "errorType" : "None", + "startTime" : 1384309800, + "endTime" : 1384309800, + "transactionTime" : 2379, + "roundId" : 1384309800, + "errorDetails" : "Connection error" + }, { + "date" : "2022-07-17T22:00:54Z", + "agent" : { + "agentId" : "281474976710706", + "agentName" : "thousandeyes-stg-va-254", + "location" : "San Francisco Bay Area", + "countryId" : "US" + }, + "_links" : { + "appLink" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "componentErrors" : 5, + "errorType" : "None", + "startTime" : 1384309800, + "endTime" : 1384309800, + "transactionTime" : 2379, + "roundId" : 1384309800, + "errorDetails" : "Connection error" + } ], + "startDate" : "2022-07-17T22:00:54Z" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.test_results.models.WebTransactionTestResults.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-tests/.openapi-generator/FILES b/thousandeyes-sdk-tests/.openapi-generator/FILES index 2b7dcf8c..ec53a6d7 100644 --- a/thousandeyes-sdk-tests/.openapi-generator/FILES +++ b/thousandeyes-sdk-tests/.openapi-generator/FILES @@ -331,150 +331,19 @@ src/thousandeyes_sdk/tests/models/web_transaction_test.py src/thousandeyes_sdk/tests/models/web_transaction_tests.py src/thousandeyes_sdk/tests/py.typed test/__init__.py -test/test_agent.py -test/test_agent_base.py -test/test_agent_request.py -test/test_agent_to_agent_instant_test.py -test/test_agent_to_agent_properties.py -test/test_agent_to_agent_test.py -test/test_agent_to_agent_test_protocol.py -test/test_agent_to_agent_tests.py -test/test_agent_to_server_instant_test.py -test/test_agent_to_server_properties.py -test/test_agent_to_server_test.py -test/test_agent_to_server_tests.py -test/test_alert_direction.py -test/test_alert_rounds_violation_mode.py -test/test_alert_rule.py -test/test_alert_type.py -test/test_api_instant_test.py -test/test_api_predefined_variable.py -test/test_api_properties.py -test/test_api_request.py -test/test_api_request_assertion.py -test/test_api_request_assertion_name.py -test/test_api_request_assertion_operator.py -test/test_api_request_auth_type.py -test/test_api_request_header.py -test/test_api_request_method.py -test/test_api_request_variable.py -test/test_api_test.py -test/test_api_tests.py -test/test_base_bgp_test.py -test/test_base_request.py -test/test_base_test.py -test/test_bgp_test.py -test/test_bgp_tests.py -test/test_cloud_enterprise_agent_type.py -test/test_dns_query_class.py -test/test_dns_sec_instant_test.py -test/test_dns_sec_properties.py -test/test_dns_sec_test.py -test/test_dns_sec_tests.py -test/test_dns_server_instant_test.py -test/test_dns_server_properties.py -test/test_dns_server_test.py -test/test_dns_server_tests.py -test/test_dns_servers_request.py -test/test_dns_trace_instant_test.py -test/test_dns_trace_properties.py -test/test_dns_trace_test.py -test/test_dns_trace_tests.py -test/test_error.py -test/test_expand.py -test/test_ftp_server_instant_test.py -test/test_ftp_server_properties.py -test/test_ftp_server_request_type.py -test/test_ftp_server_test.py -test/test_ftp_server_tests.py -test/test_http_server_instant_test.py -test/test_http_server_properties.py -test/test_http_server_test.py -test/test_http_server_tests.py -test/test_instant_test.py -test/test_interface_group.py -test/test_interface_groups.py -test/test_link.py -test/test_monitor.py -test/test_monitor_type.py -test/test_monitors_request.py -test/test_page_load_instant_test.py -test/test_page_load_properties.py -test/test_page_load_test.py -test/test_page_load_tests.py -test/test_self_links.py -test/test_severity.py -test/test_shared_with_account.py -test/test_simple_agent.py -test/test_simple_test.py -test/test_sip_server_instant_test.py -test/test_sip_server_instant_test_request.py -test/test_sip_server_instant_test_response.py -test/test_sip_server_properties.py -test/test_sip_server_test.py -test/test_sip_server_tests.py -test/test_sip_test_protocol.py -test/test_test_auth_type.py -test/test_test_custom_headers.py -test/test_test_direction.py -test/test_test_dns_server.py -test/test_test_dns_transport_protocol.py -test/test_test_dscp_id.py -test/test_test_http_interval.py -test/test_test_interval.py -test/test_test_ipv6_policy.py -test/test_test_label.py -test/test_test_links.py -test/test_test_monitors_properties.py -test/test_test_page_loading_strategy.py -test/test_test_path_trace_mode.py -test/test_test_probe_mode.py -test/test_test_protocol.py -test/test_test_request.py -test/test_test_self_link.py -test/test_test_sip_credentials.py -test/test_test_ssl_version_id.py -test/test_test_sub_interval.py -test/test_test_type.py -test/test_tests.py -test/test_unauthorized_error.py -test/test_unexpanded_agent_to_agent_test.py -test/test_unexpanded_agent_to_server_test.py -test/test_unexpanded_api_test.py -test/test_unexpanded_bgp_test.py -test/test_unexpanded_dns_sec_test.py -test/test_unexpanded_dns_server_test.py -test/test_unexpanded_dns_trace_test.py -test/test_unexpanded_ftp_server_test.py -test/test_unexpanded_http_server_test.py -test/test_unexpanded_instant_test.py -test/test_unexpanded_page_load_test.py -test/test_unexpanded_sip_server_test.py -test/test_unexpanded_test.py -test/test_unexpanded_voice_test.py -test/test_unexpanded_web_transaction_test.py -test/test_update_agent_to_agent_test.py -test/test_update_agent_to_server_test.py -test/test_update_api_test.py -test/test_update_bgp_test.py -test/test_update_bgp_test_request.py -test/test_update_dns_sec_test.py -test/test_update_dns_server_test.py -test/test_update_dns_trace_test.py -test/test_update_ftp_server_test.py -test/test_update_http_server_test.py -test/test_update_page_load_test.py -test/test_update_sip_server_test.py -test/test_update_sip_server_test1.py -test/test_update_voice_test.py -test/test_update_web_transaction_test.py -test/test_validation_error.py -test/test_validation_error_item.py -test/test_voice_instant_test.py -test/test_voice_properties.py -test/test_voice_test.py -test/test_voice_tests.py -test/test_web_transaction_instant_test.py -test/test_web_transaction_properties.py -test/test_web_transaction_test.py -test/test_web_transaction_tests.py +test/test_agent_to_agent_api.py +test/test_agent_to_server_api.py +test/test_all_test_types_api.py +test/test_api_api.py +test/test_bgp_api.py +test/test_dns_server_api.py +test/test_dns_trace_api.py +test/test_dnssec_api.py +test/test_ftp_server_api.py +test/test_http_server_api.py +test/test_page_load_api.py +test/test_path_visualization_interface_groups_api.py +test/test_sip_server_api.py +test/test_utils.py +test/test_voice_api.py +test/test_web_transaction_api.py diff --git a/thousandeyes-sdk-tests/README.md b/thousandeyes-sdk-tests/README.md index a93899af..826fa01a 100644 --- a/thousandeyes-sdk-tests/README.md +++ b/thousandeyes-sdk-tests/README.md @@ -4,8 +4,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.4 -- Package version: 1.0.0 +- API version: 7.0.6 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator @@ -19,9 +18,9 @@ Python 3.7+ If the python package is hosted on a repository, you can install directly using: ```sh -pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +pip install -e git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git#egg=thousandeyes-sdk-tests\&subdirectory=thousandeyes-sdk-tests ``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) +(you may need to run `pip` with root permission: `sudo pip install -e git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git#egg=thousandeyes-sdk-tests\&subdirectory=thousandeyes-sdk-tests`) Then import the package: ```python diff --git a/thousandeyes-sdk-tests/docs/APIApi.md b/thousandeyes-sdk-tests/docs/APIApi.md index 155eb9c4..164597a1 100644 --- a/thousandeyes-sdk-tests/docs/APIApi.md +++ b/thousandeyes-sdk-tests/docs/APIApi.md @@ -85,7 +85,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -170,7 +170,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/problem+json + - **Accept**: application/json, application/problem+json ### HTTP response details @@ -260,7 +260,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -345,7 +345,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -438,7 +438,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-tests/docs/AgentToAgentApi.md b/thousandeyes-sdk-tests/docs/AgentToAgentApi.md index d735372f..2fb73816 100644 --- a/thousandeyes-sdk-tests/docs/AgentToAgentApi.md +++ b/thousandeyes-sdk-tests/docs/AgentToAgentApi.md @@ -85,7 +85,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -170,7 +170,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/problem+json + - **Accept**: application/json, application/problem+json ### HTTP response details @@ -260,7 +260,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -345,7 +345,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -438,7 +438,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-tests/docs/AgentToServerApi.md b/thousandeyes-sdk-tests/docs/AgentToServerApi.md index b2cb870c..350dfb82 100644 --- a/thousandeyes-sdk-tests/docs/AgentToServerApi.md +++ b/thousandeyes-sdk-tests/docs/AgentToServerApi.md @@ -85,7 +85,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -170,7 +170,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/problem+json + - **Accept**: application/json, application/problem+json ### HTTP response details @@ -260,7 +260,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -345,7 +345,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -438,7 +438,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-tests/docs/AllTestTypesApi.md b/thousandeyes-sdk-tests/docs/AllTestTypesApi.md index 44c241e3..353fc5f8 100644 --- a/thousandeyes-sdk-tests/docs/AllTestTypesApi.md +++ b/thousandeyes-sdk-tests/docs/AllTestTypesApi.md @@ -75,7 +75,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-tests/docs/ApiInstantTest.md b/thousandeyes-sdk-tests/docs/ApiInstantTest.md index e6f82240..7dc2bf67 100644 --- a/thousandeyes-sdk-tests/docs/ApiInstantTest.md +++ b/thousandeyes-sdk-tests/docs/ApiInstantTest.md @@ -18,7 +18,7 @@ Name | Type | Description | Notes **links** | [**TestLinks**](TestLinks.md) | | [optional] **labels** | [**List[TestLabel]**](TestLabel.md) | | [optional] [readonly] **shared_with_accounts** | [**List[SharedWithAccount]**](SharedWithAccount.md) | | [optional] [readonly] -**follow_redirects** | **bool** | Indicates if HTTP/301 or HTTP/302 redirect directives should be followed. To disable following redirects, set this parameter to false. | [optional] [default to True] +**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`. | [optional] [default to True] **mtu_measurements** | **bool** | Set `true` to measure MTU sizes on network from agents to the target. | [optional] **network_measurements** | **bool** | Enable or disable network measurements. Set to true to enable or false to disable network measurements. | [optional] [default to True] **num_path_traces** | **int** | Number of path traces executed by the agent. | [optional] [default to 3] diff --git a/thousandeyes-sdk-tests/docs/ApiProperties.md b/thousandeyes-sdk-tests/docs/ApiProperties.md index 0b24c592..7b65e32a 100644 --- a/thousandeyes-sdk-tests/docs/ApiProperties.md +++ b/thousandeyes-sdk-tests/docs/ApiProperties.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**follow_redirects** | **bool** | Indicates if HTTP/301 or HTTP/302 redirect directives should be followed. To disable following redirects, set this parameter to false. | [optional] [default to True] +**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`. | [optional] [default to True] **mtu_measurements** | **bool** | Set `true` to measure MTU sizes on network from agents to the target. | [optional] **network_measurements** | **bool** | Enable or disable network measurements. Set to true to enable or false to disable network measurements. | [optional] [default to True] **num_path_traces** | **int** | Number of path traces executed by the agent. | [optional] [default to 3] diff --git a/thousandeyes-sdk-tests/docs/ApiRequest.md b/thousandeyes-sdk-tests/docs/ApiRequest.md index bbcc946c..b0e67b1c 100644 --- a/thousandeyes-sdk-tests/docs/ApiRequest.md +++ b/thousandeyes-sdk-tests/docs/ApiRequest.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **auth_type** | [**ApiRequestAuthType**](ApiRequestAuthType.md) | | [optional] **bearer_token** | **str** | The bearer token if `authType = bearer-token`. | [optional] **body** | **str** | POST/PUT request body. Must be in JSON format. | [optional] -**collect_api_response** | **str** | Set to `true` if API response body should be collected and saved. Set to `false` if API response body should not be saved. | [optional] [default to 'true'] +**collect_api_response** | **bool** | Set to `true` if API response body should be collected and saved. Set to `false` if API response body should not be saved. | [optional] [default to True] **headers** | [**List[ApiRequestHeader]**](ApiRequestHeader.md) | Array of API Request Header objects. | [optional] **method** | [**ApiRequestMethod**](ApiRequestMethod.md) | | [optional] **name** | **str** | API step name, must be unique. | @@ -17,7 +17,7 @@ Name | Type | Description | Notes **url** | **str** | Request url. Supports variables in the format `{{variableName}}`. | **username** | **str** | The username if `authType = basic`. | [optional] **variables** | [**List[ApiRequestVariable]**](ApiRequestVariable.md) | Array of API post request variable objects. | [optional] -**wait_time_ms** | **float** | Post request delay before executing the next API requests, in milliseconds. | [optional] +**wait_time_ms** | **int** | Post request delay before executing the next API requests, in milliseconds. | [optional] ## Example diff --git a/thousandeyes-sdk-tests/docs/ApiTest.md b/thousandeyes-sdk-tests/docs/ApiTest.md index c44028df..0e4e6984 100644 --- a/thousandeyes-sdk-tests/docs/ApiTest.md +++ b/thousandeyes-sdk-tests/docs/ApiTest.md @@ -22,7 +22,7 @@ Name | Type | Description | Notes **links** | [**TestLinks**](TestLinks.md) | | [optional] **labels** | [**List[TestLabel]**](TestLabel.md) | | [optional] [readonly] **shared_with_accounts** | [**List[SharedWithAccount]**](SharedWithAccount.md) | | [optional] [readonly] -**follow_redirects** | **bool** | Indicates if HTTP/301 or HTTP/302 redirect directives should be followed. To disable following redirects, set this parameter to false. | [optional] [default to True] +**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`. | [optional] [default to True] **mtu_measurements** | **bool** | Set `true` to measure MTU sizes on network from agents to the target. | [optional] **network_measurements** | **bool** | Enable or disable network measurements. Set to true to enable or false to disable network measurements. | [optional] [default to True] **num_path_traces** | **int** | Number of path traces executed by the agent. | [optional] [default to 3] diff --git a/thousandeyes-sdk-tests/docs/BGPApi.md b/thousandeyes-sdk-tests/docs/BGPApi.md index 37898889..9927bd9a 100644 --- a/thousandeyes-sdk-tests/docs/BGPApi.md +++ b/thousandeyes-sdk-tests/docs/BGPApi.md @@ -85,7 +85,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -170,7 +170,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/problem+json + - **Accept**: application/json, application/problem+json ### HTTP response details @@ -260,7 +260,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -345,7 +345,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -438,7 +438,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-tests/docs/DNSSECApi.md b/thousandeyes-sdk-tests/docs/DNSSECApi.md index ba38039d..1dff2e20 100644 --- a/thousandeyes-sdk-tests/docs/DNSSECApi.md +++ b/thousandeyes-sdk-tests/docs/DNSSECApi.md @@ -85,7 +85,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -170,7 +170,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/problem+json + - **Accept**: application/json, application/problem+json ### HTTP response details @@ -260,7 +260,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -345,7 +345,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -438,7 +438,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-tests/docs/DNSServerApi.md b/thousandeyes-sdk-tests/docs/DNSServerApi.md index 15833019..3d5559ac 100644 --- a/thousandeyes-sdk-tests/docs/DNSServerApi.md +++ b/thousandeyes-sdk-tests/docs/DNSServerApi.md @@ -85,7 +85,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -170,7 +170,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/problem+json + - **Accept**: application/json, application/problem+json ### HTTP response details @@ -260,7 +260,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -345,7 +345,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -438,7 +438,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-tests/docs/DNSTraceApi.md b/thousandeyes-sdk-tests/docs/DNSTraceApi.md index bb41f5e8..ad2d8533 100644 --- a/thousandeyes-sdk-tests/docs/DNSTraceApi.md +++ b/thousandeyes-sdk-tests/docs/DNSTraceApi.md @@ -85,7 +85,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -170,7 +170,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/problem+json + - **Accept**: application/json, application/problem+json ### HTTP response details @@ -260,7 +260,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -345,7 +345,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -438,7 +438,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-tests/docs/FTPServerApi.md b/thousandeyes-sdk-tests/docs/FTPServerApi.md index 14942cbe..0077c348 100644 --- a/thousandeyes-sdk-tests/docs/FTPServerApi.md +++ b/thousandeyes-sdk-tests/docs/FTPServerApi.md @@ -85,7 +85,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -170,7 +170,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/problem+json + - **Accept**: application/json, application/problem+json ### HTTP response details @@ -258,7 +258,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -343,7 +343,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -436,7 +436,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-tests/docs/HTTPServerApi.md b/thousandeyes-sdk-tests/docs/HTTPServerApi.md index cd2a7c97..a0157af6 100644 --- a/thousandeyes-sdk-tests/docs/HTTPServerApi.md +++ b/thousandeyes-sdk-tests/docs/HTTPServerApi.md @@ -85,7 +85,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -170,7 +170,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/problem+json + - **Accept**: application/json, application/problem+json ### HTTP response details @@ -260,7 +260,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -345,7 +345,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -438,7 +438,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-tests/docs/PageLoadApi.md b/thousandeyes-sdk-tests/docs/PageLoadApi.md index affccb6a..227e4e5a 100644 --- a/thousandeyes-sdk-tests/docs/PageLoadApi.md +++ b/thousandeyes-sdk-tests/docs/PageLoadApi.md @@ -85,7 +85,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -170,7 +170,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/problem+json + - **Accept**: application/json, application/problem+json ### HTTP response details @@ -260,7 +260,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -345,7 +345,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -438,7 +438,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-tests/docs/PageLoadInstantTest.md b/thousandeyes-sdk-tests/docs/PageLoadInstantTest.md index 9911c043..3b5bcac9 100644 --- a/thousandeyes-sdk-tests/docs/PageLoadInstantTest.md +++ b/thousandeyes-sdk-tests/docs/PageLoadInstantTest.md @@ -25,7 +25,7 @@ Name | Type | Description | Notes **custom_headers** | [**TestCustomHeaders**](TestCustomHeaders.md) | | [optional] **desired_status_code** | **str** | Specify the HTTP status code value that indicates a successful response. | [optional] [default to '200'] **emulated_device_id** | **str** | id of the emulated device, if one was given when the test was created | [optional] -**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to false. | [optional] [default to True] +**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`. | [optional] [default to True] **http_target_time** | **int** | Target time for HTTP server completion, specified in milliseconds. | [optional] **http_time_limit** | **int** | HTTP time limit in seconds. | [optional] [default to 5] **http_version** | **int** | HTTP protocol version. Set to '2' to prefer HTTP/2, or '1' to use only HTTP/1.1. | [optional] [default to 2] diff --git a/thousandeyes-sdk-tests/docs/PageLoadProperties.md b/thousandeyes-sdk-tests/docs/PageLoadProperties.md index 715ce9f5..8e929ce6 100644 --- a/thousandeyes-sdk-tests/docs/PageLoadProperties.md +++ b/thousandeyes-sdk-tests/docs/PageLoadProperties.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes **custom_headers** | [**TestCustomHeaders**](TestCustomHeaders.md) | | [optional] **desired_status_code** | **str** | Specify the HTTP status code value that indicates a successful response. | [optional] [default to '200'] **emulated_device_id** | **str** | id of the emulated device, if one was given when the test was created | [optional] -**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to false. | [optional] [default to True] +**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`. | [optional] [default to True] **http_target_time** | **int** | Target time for HTTP server completion, specified in milliseconds. | [optional] **http_time_limit** | **int** | HTTP time limit in seconds. | [optional] [default to 5] **http_version** | **int** | HTTP protocol version. Set to '2' to prefer HTTP/2, or '1' to use only HTTP/1.1. | [optional] [default to 2] diff --git a/thousandeyes-sdk-tests/docs/PageLoadTest.md b/thousandeyes-sdk-tests/docs/PageLoadTest.md index c13e9cb2..7a19750d 100644 --- a/thousandeyes-sdk-tests/docs/PageLoadTest.md +++ b/thousandeyes-sdk-tests/docs/PageLoadTest.md @@ -29,7 +29,7 @@ Name | Type | Description | Notes **custom_headers** | [**TestCustomHeaders**](TestCustomHeaders.md) | | [optional] **desired_status_code** | **str** | Specify the HTTP status code value that indicates a successful response. | [optional] [default to '200'] **emulated_device_id** | **str** | id of the emulated device, if one was given when the test was created | [optional] -**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to false. | [optional] [default to True] +**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`. | [optional] [default to True] **http_target_time** | **int** | Target time for HTTP server completion, specified in milliseconds. | [optional] **http_time_limit** | **int** | HTTP time limit in seconds. | [optional] [default to 5] **http_version** | **int** | HTTP protocol version. Set to '2' to prefer HTTP/2, or '1' to use only HTTP/1.1. | [optional] [default to 2] diff --git a/thousandeyes-sdk-tests/docs/PathVisualizationInterfaceGroupsApi.md b/thousandeyes-sdk-tests/docs/PathVisualizationInterfaceGroupsApi.md index 75165938..2bc34e84 100644 --- a/thousandeyes-sdk-tests/docs/PathVisualizationInterfaceGroupsApi.md +++ b/thousandeyes-sdk-tests/docs/PathVisualizationInterfaceGroupsApi.md @@ -80,7 +80,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -165,7 +165,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/problem+json + - **Accept**: application/json, application/problem+json ### HTTP response details @@ -250,7 +250,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -339,7 +339,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-tests/docs/SIPServerApi.md b/thousandeyes-sdk-tests/docs/SIPServerApi.md index 7dab4e0d..b8148e61 100644 --- a/thousandeyes-sdk-tests/docs/SIPServerApi.md +++ b/thousandeyes-sdk-tests/docs/SIPServerApi.md @@ -85,7 +85,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -170,7 +170,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/problem+json + - **Accept**: application/json, application/problem+json ### HTTP response details @@ -258,7 +258,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -343,7 +343,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -436,7 +436,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-tests/docs/UnexpandedApiTest.md b/thousandeyes-sdk-tests/docs/UnexpandedApiTest.md index 90fec6c1..fffffba9 100644 --- a/thousandeyes-sdk-tests/docs/UnexpandedApiTest.md +++ b/thousandeyes-sdk-tests/docs/UnexpandedApiTest.md @@ -19,7 +19,7 @@ Name | Type | Description | Notes **test_name** | **str** | The name of the test. Test name must be unique. | [optional] **type** | **str** | | [optional] [readonly] **links** | [**TestLinks**](TestLinks.md) | | [optional] -**follow_redirects** | **bool** | Indicates if HTTP/301 or HTTP/302 redirect directives should be followed. To disable following redirects, set this parameter to false. | [optional] [default to True] +**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`. | [optional] [default to True] **mtu_measurements** | **bool** | Set `true` to measure MTU sizes on network from agents to the target. | [optional] **network_measurements** | **bool** | Enable or disable network measurements. Set to true to enable or false to disable network measurements. | [optional] [default to True] **num_path_traces** | **int** | Number of path traces executed by the agent. | [optional] [default to 3] diff --git a/thousandeyes-sdk-tests/docs/UnexpandedPageLoadTest.md b/thousandeyes-sdk-tests/docs/UnexpandedPageLoadTest.md index 790801a3..833e090d 100644 --- a/thousandeyes-sdk-tests/docs/UnexpandedPageLoadTest.md +++ b/thousandeyes-sdk-tests/docs/UnexpandedPageLoadTest.md @@ -26,7 +26,7 @@ Name | Type | Description | Notes **custom_headers** | [**TestCustomHeaders**](TestCustomHeaders.md) | | [optional] **desired_status_code** | **str** | Specify the HTTP status code value that indicates a successful response. | [optional] [default to '200'] **emulated_device_id** | **str** | id of the emulated device, if one was given when the test was created | [optional] -**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to false. | [optional] [default to True] +**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`. | [optional] [default to True] **http_target_time** | **int** | Target time for HTTP server completion, specified in milliseconds. | [optional] **http_time_limit** | **int** | HTTP time limit in seconds. | [optional] [default to 5] **http_version** | **int** | HTTP protocol version. Set to '2' to prefer HTTP/2, or '1' to use only HTTP/1.1. | [optional] [default to 2] diff --git a/thousandeyes-sdk-tests/docs/UnexpandedWebTransactionTest.md b/thousandeyes-sdk-tests/docs/UnexpandedWebTransactionTest.md index 7f6ed1e5..500704d4 100644 --- a/thousandeyes-sdk-tests/docs/UnexpandedWebTransactionTest.md +++ b/thousandeyes-sdk-tests/docs/UnexpandedWebTransactionTest.md @@ -26,7 +26,7 @@ Name | Type | Description | Notes **custom_headers** | [**TestCustomHeaders**](TestCustomHeaders.md) | | [optional] **desired_status_code** | **str** | Specify the HTTP status code value that indicates a successful response. | [optional] [default to '200'] **emulated_device_id** | **str** | id of the emulated device, if one was given when the test was created | [optional] -**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to false. | [optional] [default to True] +**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`. | [optional] [default to True] **http_target_time** | **int** | Target time for HTTP server completion, specified in milliseconds. | [optional] **http_time_limit** | **int** | HTTP time limit in seconds. | [optional] [default to 5] **http_version** | **int** | HTTP protocol version. Set to '2' to prefer HTTP/2, or '1' to use only HTTP/1.1. | [optional] [default to 2] diff --git a/thousandeyes-sdk-tests/docs/UpdateApiTest.md b/thousandeyes-sdk-tests/docs/UpdateApiTest.md index 9766284c..67a149c7 100644 --- a/thousandeyes-sdk-tests/docs/UpdateApiTest.md +++ b/thousandeyes-sdk-tests/docs/UpdateApiTest.md @@ -22,7 +22,7 @@ Name | Type | Description | Notes **links** | [**TestLinks**](TestLinks.md) | | [optional] **labels** | **List[str]** | Contains list of test label IDs (get `labelId` from `/labels` endpoint) | [optional] **shared_with_accounts** | **List[str]** | Contains list of account group IDs. Test is shared with the listed account groups (get `aid` from `/account-groups` endpoint) | [optional] -**follow_redirects** | **bool** | Indicates if HTTP/301 or HTTP/302 redirect directives should be followed. To disable following redirects, set this parameter to false. | [optional] [default to True] +**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`. | [optional] [default to True] **mtu_measurements** | **bool** | Set `true` to measure MTU sizes on network from agents to the target. | [optional] **network_measurements** | **bool** | Enable or disable network measurements. Set to true to enable or false to disable network measurements. | [optional] [default to True] **num_path_traces** | **int** | Number of path traces executed by the agent. | [optional] [default to 3] diff --git a/thousandeyes-sdk-tests/docs/UpdatePageLoadTest.md b/thousandeyes-sdk-tests/docs/UpdatePageLoadTest.md index 3870fb35..fa91e37a 100644 --- a/thousandeyes-sdk-tests/docs/UpdatePageLoadTest.md +++ b/thousandeyes-sdk-tests/docs/UpdatePageLoadTest.md @@ -29,7 +29,7 @@ Name | Type | Description | Notes **custom_headers** | [**TestCustomHeaders**](TestCustomHeaders.md) | | [optional] **desired_status_code** | **str** | Specify the HTTP status code value that indicates a successful response. | [optional] [default to '200'] **emulated_device_id** | **str** | id of the emulated device, if one was given when the test was created | [optional] -**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to false. | [optional] [default to True] +**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`. | [optional] [default to True] **http_target_time** | **int** | Target time for HTTP server completion, specified in milliseconds. | [optional] **http_time_limit** | **int** | HTTP time limit in seconds. | [optional] [default to 5] **http_version** | **int** | HTTP protocol version. Set to '2' to prefer HTTP/2, or '1' to use only HTTP/1.1. | [optional] [default to 2] diff --git a/thousandeyes-sdk-tests/docs/UpdateWebTransactionTest.md b/thousandeyes-sdk-tests/docs/UpdateWebTransactionTest.md index ac9e5d70..250a8331 100644 --- a/thousandeyes-sdk-tests/docs/UpdateWebTransactionTest.md +++ b/thousandeyes-sdk-tests/docs/UpdateWebTransactionTest.md @@ -29,7 +29,7 @@ Name | Type | Description | Notes **custom_headers** | [**TestCustomHeaders**](TestCustomHeaders.md) | | [optional] **desired_status_code** | **str** | Specify the HTTP status code value that indicates a successful response. | [optional] [default to '200'] **emulated_device_id** | **str** | id of the emulated device, if one was given when the test was created | [optional] -**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to false. | [optional] [default to True] +**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`. | [optional] [default to True] **http_target_time** | **int** | Target time for HTTP server completion, specified in milliseconds. | [optional] **http_time_limit** | **int** | HTTP time limit in seconds. | [optional] [default to 5] **http_version** | **int** | HTTP protocol version. Set to '2' to prefer HTTP/2, or '1' to use only HTTP/1.1. | [optional] [default to 2] diff --git a/thousandeyes-sdk-tests/docs/ValidationErrorItem.md b/thousandeyes-sdk-tests/docs/ValidationErrorItem.md index 6068a482..3b844aa2 100644 --- a/thousandeyes-sdk-tests/docs/ValidationErrorItem.md +++ b/thousandeyes-sdk-tests/docs/ValidationErrorItem.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **code** | **str** | (Optional) A unique error type/code that can be referenced in the documentation for further details. | [optional] -**var_field** | **int** | Identifies the field that triggered this particular error. | [optional] +**var_field** | **str** | Identifies the field that triggered this particular error. | [optional] **message** | **str** | A short, human-readable summary of the error. | [optional] ## Example diff --git a/thousandeyes-sdk-tests/docs/VoiceApi.md b/thousandeyes-sdk-tests/docs/VoiceApi.md index 811e22ed..0a4bdc3f 100644 --- a/thousandeyes-sdk-tests/docs/VoiceApi.md +++ b/thousandeyes-sdk-tests/docs/VoiceApi.md @@ -85,7 +85,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -170,7 +170,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/problem+json + - **Accept**: application/json, application/problem+json ### HTTP response details @@ -260,7 +260,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -345,7 +345,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -438,7 +438,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-tests/docs/WebTransactionApi.md b/thousandeyes-sdk-tests/docs/WebTransactionApi.md index 40e6a07c..975f7111 100644 --- a/thousandeyes-sdk-tests/docs/WebTransactionApi.md +++ b/thousandeyes-sdk-tests/docs/WebTransactionApi.md @@ -85,7 +85,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -170,7 +170,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/problem+json + - **Accept**: application/json, application/problem+json ### HTTP response details @@ -260,7 +260,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -345,7 +345,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -438,7 +438,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-tests/docs/WebTransactionInstantTest.md b/thousandeyes-sdk-tests/docs/WebTransactionInstantTest.md index 6c43139d..4f643918 100644 --- a/thousandeyes-sdk-tests/docs/WebTransactionInstantTest.md +++ b/thousandeyes-sdk-tests/docs/WebTransactionInstantTest.md @@ -25,7 +25,7 @@ Name | Type | Description | Notes **custom_headers** | [**TestCustomHeaders**](TestCustomHeaders.md) | | [optional] **desired_status_code** | **str** | Specify the HTTP status code value that indicates a successful response. | [optional] [default to '200'] **emulated_device_id** | **str** | id of the emulated device, if one was given when the test was created | [optional] -**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to false. | [optional] [default to True] +**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`. | [optional] [default to True] **http_target_time** | **int** | Target time for HTTP server completion, specified in milliseconds. | [optional] **http_time_limit** | **int** | HTTP time limit in seconds. | [optional] [default to 5] **http_version** | **int** | HTTP protocol version. Set to '2' to prefer HTTP/2, or '1' to use only HTTP/1.1. | [optional] [default to 2] diff --git a/thousandeyes-sdk-tests/docs/WebTransactionProperties.md b/thousandeyes-sdk-tests/docs/WebTransactionProperties.md index 4984ee58..0cfb7f42 100644 --- a/thousandeyes-sdk-tests/docs/WebTransactionProperties.md +++ b/thousandeyes-sdk-tests/docs/WebTransactionProperties.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes **custom_headers** | [**TestCustomHeaders**](TestCustomHeaders.md) | | [optional] **desired_status_code** | **str** | Specify the HTTP status code value that indicates a successful response. | [optional] [default to '200'] **emulated_device_id** | **str** | id of the emulated device, if one was given when the test was created | [optional] -**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to false. | [optional] [default to True] +**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`. | [optional] [default to True] **http_target_time** | **int** | Target time for HTTP server completion, specified in milliseconds. | [optional] **http_time_limit** | **int** | HTTP time limit in seconds. | [optional] [default to 5] **http_version** | **int** | HTTP protocol version. Set to '2' to prefer HTTP/2, or '1' to use only HTTP/1.1. | [optional] [default to 2] diff --git a/thousandeyes-sdk-tests/docs/WebTransactionTest.md b/thousandeyes-sdk-tests/docs/WebTransactionTest.md index 5db39d68..375818f5 100644 --- a/thousandeyes-sdk-tests/docs/WebTransactionTest.md +++ b/thousandeyes-sdk-tests/docs/WebTransactionTest.md @@ -29,7 +29,7 @@ Name | Type | Description | Notes **custom_headers** | [**TestCustomHeaders**](TestCustomHeaders.md) | | [optional] **desired_status_code** | **str** | Specify the HTTP status code value that indicates a successful response. | [optional] [default to '200'] **emulated_device_id** | **str** | id of the emulated device, if one was given when the test was created | [optional] -**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to false. | [optional] [default to True] +**follow_redirects** | **bool** | To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`. | [optional] [default to True] **http_target_time** | **int** | Target time for HTTP server completion, specified in milliseconds. | [optional] **http_time_limit** | **int** | HTTP time limit in seconds. | [optional] [default to 5] **http_version** | **int** | HTTP protocol version. Set to '2' to prefer HTTP/2, or '1' to use only HTTP/1.1. | [optional] [default to 2] diff --git a/thousandeyes-sdk-tests/pyproject.toml b/thousandeyes-sdk-tests/pyproject.toml index 135e4974..7315fa64 100644 --- a/thousandeyes-sdk-tests/pyproject.toml +++ b/thousandeyes-sdk-tests/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "thousandeyes-sdk-tests" -version = "1.0.0" +dynamic = ["version"] authors = [ { name = "ThousandEyes API Team", email = "api-team@thousandeyes.com" } ] @@ -11,9 +11,12 @@ dependencies = [ "python-dateutil >=2.8.2", "pydantic >=2", "typing-extensions >=4.7.1", - "thousandeyes-sdk-client==1.0.0", + "thousandeyes-sdk-core", ] +[tool.setuptools.dynamic] +version = {attr = "thousandeyes_sdk.client.__version__"} + [project.optional-dependencies] test = [ "pytest~=7.1.3", diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/__init__.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/__init__.py index 98d57f0a..63ac83a4 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/__init__.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/__init__.py @@ -7,15 +7,13 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 -__version__ = "1.0.0" - # import apis into sdk package from thousandeyes_sdk.tests.api.api_api import APIApi from thousandeyes_sdk.tests.api.agent_to_agent_api import AgentToAgentApi diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/agent_to_agent_api.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/agent_to_agent_api.py index f6d5787f..68dbd20d 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/agent_to_agent_api.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/agent_to_agent_api.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -29,6 +29,7 @@ from thousandeyes_sdk.tests.models.update_agent_to_agent_test import UpdateAgent from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class AgentToAgentApi: @@ -41,6 +42,7 @@ class AgentToAgentApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @@ -333,6 +335,7 @@ class AgentToAgentApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -641,6 +644,7 @@ class AgentToAgentApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ + 'application/json', 'application/problem+json' ] ) @@ -955,6 +959,7 @@ class AgentToAgentApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1236,6 +1241,7 @@ class AgentToAgentApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1568,6 +1574,7 @@ class AgentToAgentApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/agent_to_server_api.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/agent_to_server_api.py index 77bb462c..ae871bfc 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/agent_to_server_api.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/agent_to_server_api.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -29,6 +29,7 @@ from thousandeyes_sdk.tests.models.update_agent_to_server_test import UpdateAgen from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class AgentToServerApi: @@ -41,6 +42,7 @@ class AgentToServerApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @@ -333,6 +335,7 @@ class AgentToServerApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -641,6 +644,7 @@ class AgentToServerApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ + 'application/json', 'application/problem+json' ] ) @@ -955,6 +959,7 @@ class AgentToServerApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1236,6 +1241,7 @@ class AgentToServerApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1568,6 +1574,7 @@ class AgentToServerApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/all_test_types_api.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/all_test_types_api.py index dfd7b497..f8f467df 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/all_test_types_api.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/all_test_types_api.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -26,6 +26,7 @@ from thousandeyes_sdk.tests.models.tests import Tests from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class AllTestTypesApi: @@ -38,6 +39,7 @@ class AllTestTypesApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @@ -294,6 +296,7 @@ class AllTestTypesApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/api_api.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/api_api.py index e321309a..d1fa8dc4 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/api_api.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/api_api.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -29,6 +29,7 @@ from thousandeyes_sdk.tests.models.update_api_test import UpdateApiTest from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class APIApi: @@ -41,6 +42,7 @@ class APIApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @@ -333,6 +335,7 @@ class APIApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -641,6 +644,7 @@ class APIApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ + 'application/json', 'application/problem+json' ] ) @@ -955,6 +959,7 @@ class APIApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1236,6 +1241,7 @@ class APIApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1568,6 +1574,7 @@ class APIApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/bgp_api.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/bgp_api.py index a6225909..ee5c2b97 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/bgp_api.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/bgp_api.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -30,6 +30,7 @@ from thousandeyes_sdk.tests.models.update_bgp_test_request import UpdateBgpTestR from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class BGPApi: @@ -42,6 +43,7 @@ class BGPApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @@ -334,6 +336,7 @@ class BGPApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -642,6 +645,7 @@ class BGPApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ + 'application/json', 'application/problem+json' ] ) @@ -956,6 +960,7 @@ class BGPApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1237,6 +1242,7 @@ class BGPApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1569,6 +1575,7 @@ class BGPApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/dns_server_api.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/dns_server_api.py index 6f21db16..4764c957 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/dns_server_api.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/dns_server_api.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -29,6 +29,7 @@ from thousandeyes_sdk.tests.models.update_dns_server_test import UpdateDnsServer from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class DNSServerApi: @@ -41,6 +42,7 @@ class DNSServerApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @@ -333,6 +335,7 @@ class DNSServerApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -641,6 +644,7 @@ class DNSServerApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ + 'application/json', 'application/problem+json' ] ) @@ -955,6 +959,7 @@ class DNSServerApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1236,6 +1241,7 @@ class DNSServerApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1568,6 +1574,7 @@ class DNSServerApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/dns_trace_api.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/dns_trace_api.py index 12e97da4..9161c759 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/dns_trace_api.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/dns_trace_api.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -29,6 +29,7 @@ from thousandeyes_sdk.tests.models.update_dns_trace_test import UpdateDnsTraceTe from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class DNSTraceApi: @@ -41,6 +42,7 @@ class DNSTraceApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @@ -333,6 +335,7 @@ class DNSTraceApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -641,6 +644,7 @@ class DNSTraceApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ + 'application/json', 'application/problem+json' ] ) @@ -955,6 +959,7 @@ class DNSTraceApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1236,6 +1241,7 @@ class DNSTraceApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1568,6 +1574,7 @@ class DNSTraceApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/dnssec_api.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/dnssec_api.py index e3d04b14..248c280d 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/dnssec_api.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/dnssec_api.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -29,6 +29,7 @@ from thousandeyes_sdk.tests.models.update_dns_sec_test import UpdateDnsSecTest from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class DNSSECApi: @@ -41,6 +42,7 @@ class DNSSECApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @@ -333,6 +335,7 @@ class DNSSECApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -641,6 +644,7 @@ class DNSSECApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ + 'application/json', 'application/problem+json' ] ) @@ -955,6 +959,7 @@ class DNSSECApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1236,6 +1241,7 @@ class DNSSECApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1568,6 +1574,7 @@ class DNSSECApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/ftp_server_api.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/ftp_server_api.py index f394da19..e2bbbed2 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/ftp_server_api.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/ftp_server_api.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -29,6 +29,7 @@ from thousandeyes_sdk.tests.models.update_ftp_server_test import UpdateFtpServer from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class FTPServerApi: @@ -41,6 +42,7 @@ class FTPServerApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @@ -333,6 +335,7 @@ class FTPServerApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -638,6 +641,7 @@ class FTPServerApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ + 'application/json', 'application/problem+json' ] ) @@ -952,6 +956,7 @@ class FTPServerApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1233,6 +1238,7 @@ class FTPServerApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1565,6 +1571,7 @@ class FTPServerApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/http_server_api.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/http_server_api.py index 4e8f8a29..6f2ad19a 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/http_server_api.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/http_server_api.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -29,6 +29,7 @@ from thousandeyes_sdk.tests.models.update_http_server_test import UpdateHttpServ from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class HTTPServerApi: @@ -41,6 +42,7 @@ class HTTPServerApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @@ -333,6 +335,7 @@ class HTTPServerApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -641,6 +644,7 @@ class HTTPServerApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ + 'application/json', 'application/problem+json' ] ) @@ -955,6 +959,7 @@ class HTTPServerApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1236,6 +1241,7 @@ class HTTPServerApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1568,6 +1574,7 @@ class HTTPServerApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/page_load_api.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/page_load_api.py index fb5be7b3..fe8e222a 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/page_load_api.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/page_load_api.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -29,6 +29,7 @@ from thousandeyes_sdk.tests.models.update_page_load_test import UpdatePageLoadTe from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class PageLoadApi: @@ -41,6 +42,7 @@ class PageLoadApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @@ -333,6 +335,7 @@ class PageLoadApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -641,6 +644,7 @@ class PageLoadApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ + 'application/json', 'application/problem+json' ] ) @@ -955,6 +959,7 @@ class PageLoadApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1236,6 +1241,7 @@ class PageLoadApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1568,6 +1574,7 @@ class PageLoadApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/path_visualization_interface_groups_api.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/path_visualization_interface_groups_api.py index 7bac3697..59705afe 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/path_visualization_interface_groups_api.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/path_visualization_interface_groups_api.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -27,6 +27,7 @@ from thousandeyes_sdk.tests.models.interface_groups import InterfaceGroups from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class PathVisualizationInterfaceGroupsApi: @@ -39,6 +40,7 @@ class PathVisualizationInterfaceGroupsApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @@ -313,6 +315,7 @@ class PathVisualizationInterfaceGroupsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -621,6 +624,7 @@ class PathVisualizationInterfaceGroupsApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ + 'application/json', 'application/problem+json' ] ) @@ -902,6 +906,7 @@ class PathVisualizationInterfaceGroupsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1216,6 +1221,7 @@ class PathVisualizationInterfaceGroupsApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/sip_server_api.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/sip_server_api.py index ca30ed30..4cdb291f 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/sip_server_api.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/sip_server_api.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -29,6 +29,7 @@ from thousandeyes_sdk.tests.models.update_sip_server_test import UpdateSipServer from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class SIPServerApi: @@ -41,6 +42,7 @@ class SIPServerApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @@ -333,6 +335,7 @@ class SIPServerApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -638,6 +641,7 @@ class SIPServerApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ + 'application/json', 'application/problem+json' ] ) @@ -952,6 +956,7 @@ class SIPServerApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1233,6 +1238,7 @@ class SIPServerApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1565,6 +1571,7 @@ class SIPServerApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/voice_api.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/voice_api.py index 56b0f54b..6a6cbc90 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/voice_api.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/voice_api.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -29,6 +29,7 @@ from thousandeyes_sdk.tests.models.voice_tests import VoiceTests from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class VoiceApi: @@ -41,6 +42,7 @@ class VoiceApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @@ -333,6 +335,7 @@ class VoiceApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -641,6 +644,7 @@ class VoiceApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ + 'application/json', 'application/problem+json' ] ) @@ -955,6 +959,7 @@ class VoiceApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1236,6 +1241,7 @@ class VoiceApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1568,6 +1574,7 @@ class VoiceApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/web_transaction_api.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/web_transaction_api.py index b9c66ab2..0e011b4b 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/web_transaction_api.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/api/web_transaction_api.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -29,6 +29,7 @@ from thousandeyes_sdk.tests.models.web_transaction_tests import WebTransactionTe from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class WebTransactionApi: @@ -41,6 +42,7 @@ class WebTransactionApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @@ -333,6 +335,7 @@ class WebTransactionApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -641,6 +644,7 @@ class WebTransactionApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ + 'application/json', 'application/problem+json' ] ) @@ -955,6 +959,7 @@ class WebTransactionApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1236,6 +1241,7 @@ class WebTransactionApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1568,6 +1574,7 @@ class WebTransactionApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) 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 3c105d54..6b5d48ce 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/__init__.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/__init__.py @@ -6,7 +6,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent.py index 358afa89..fa888451 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -44,6 +44,7 @@ class Agent(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -54,7 +55,7 @@ class Agent(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_base.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_base.py index 0903fe5c..30f07bf7 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_base.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_base.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class AgentBase(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class AgentBase(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_request.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_request.py index b19e8296..add4ed21 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_request.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_request.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class AgentRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class AgentRequest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_to_agent_instant_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_to_agent_instant_test.py index f64b3ab4..fa9b19f3 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_to_agent_instant_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_to_agent_instant_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -69,6 +69,7 @@ class AgentToAgentInstantTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -79,7 +80,7 @@ class AgentToAgentInstantTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_to_agent_properties.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_to_agent_properties.py index 5c75545b..548cff7f 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_to_agent_properties.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_to_agent_properties.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -51,6 +51,7 @@ class AgentToAgentProperties(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -61,7 +62,7 @@ class AgentToAgentProperties(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_to_agent_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_to_agent_test.py index 24e29b09..ec78ac37 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_to_agent_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_to_agent_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -79,6 +79,7 @@ class AgentToAgentTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -89,7 +90,7 @@ class AgentToAgentTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_to_agent_test_protocol.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_to_agent_test_protocol.py index b01c0b44..c2ae4d5a 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_to_agent_test_protocol.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_to_agent_test_protocol.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_to_agent_tests.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_to_agent_tests.py index 6c2882af..c751fcf0 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_to_agent_tests.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_to_agent_tests.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class AgentToAgentTests(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class AgentToAgentTests(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_to_server_instant_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_to_server_instant_test.py index 510a1b3c..6d23dcf3 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_to_server_instant_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_to_server_instant_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -72,6 +72,7 @@ class AgentToServerInstantTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -82,7 +83,7 @@ class AgentToServerInstantTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_to_server_properties.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_to_server_properties.py index cf4f7fa7..65662ebd 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_to_server_properties.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_to_server_properties.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -54,6 +54,7 @@ class AgentToServerProperties(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -64,7 +65,7 @@ class AgentToServerProperties(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_to_server_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_to_server_test.py index 9968c1a6..cccb6e0a 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_to_server_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_to_server_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -82,6 +82,7 @@ class AgentToServerTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -92,7 +93,7 @@ class AgentToServerTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_to_server_tests.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_to_server_tests.py index 7fd01f25..6e23ef46 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_to_server_tests.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/agent_to_server_tests.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class AgentToServerTests(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class AgentToServerTests(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/alert_direction.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/alert_direction.py index 872add97..098b9538 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/alert_direction.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/alert_direction.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/alert_rounds_violation_mode.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/alert_rounds_violation_mode.py index ae711818..76317c89 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/alert_rounds_violation_mode.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/alert_rounds_violation_mode.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/alert_rule.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/alert_rule.py index dc888857..3813609d 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/alert_rule.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/alert_rule.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -48,6 +48,7 @@ class AlertRule(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -58,7 +59,7 @@ class AlertRule(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/alert_type.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/alert_type.py index 029c9bd1..86bd2252 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/alert_type.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/alert_type.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_instant_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_instant_test.py index 5afd518e..c94a3b59 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_instant_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_instant_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -51,7 +51,7 @@ class ApiInstantTest(BaseModel): links: Optional[TestLinks] = Field(default=None, alias="_links") labels: Optional[List[TestLabel]] = None shared_with_accounts: Optional[List[SharedWithAccount]] = Field(default=None, alias="sharedWithAccounts") - follow_redirects: Optional[StrictBool] = Field(default=True, description="Indicates if HTTP/301 or HTTP/302 redirect directives should be followed. To disable following redirects, set this parameter to false.", alias="followRedirects") + follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`.", alias="followRedirects") mtu_measurements: Optional[StrictBool] = Field(default=None, description="Set `true` to measure MTU sizes on network from agents to the target.", alias="mtuMeasurements") network_measurements: Optional[StrictBool] = Field(default=True, description="Enable or disable network measurements. Set to true to enable or false to disable network measurements.", alias="networkMeasurements") num_path_traces: Optional[Annotated[int, Field(le=10, strict=True, ge=1)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") @@ -72,6 +72,7 @@ class ApiInstantTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -82,7 +83,7 @@ class ApiInstantTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_predefined_variable.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_predefined_variable.py index b6f9ccc6..e9ff9c63 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_predefined_variable.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_predefined_variable.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class ApiPredefinedVariable(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class ApiPredefinedVariable(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_properties.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_properties.py index af735020..f4e77b9f 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_properties.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_properties.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -33,7 +33,7 @@ class ApiProperties(BaseModel): """ ApiProperties """ # noqa: E501 - follow_redirects: Optional[StrictBool] = Field(default=True, description="Indicates if HTTP/301 or HTTP/302 redirect directives should be followed. To disable following redirects, set this parameter to false.", alias="followRedirects") + follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`.", alias="followRedirects") mtu_measurements: Optional[StrictBool] = Field(default=None, description="Set `true` to measure MTU sizes on network from agents to the target.", alias="mtuMeasurements") network_measurements: Optional[StrictBool] = Field(default=True, description="Enable or disable network measurements. Set to true to enable or false to disable network measurements.", alias="networkMeasurements") num_path_traces: Optional[Annotated[int, Field(le=10, strict=True, ge=1)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") @@ -53,6 +53,7 @@ class ApiProperties(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -63,7 +64,7 @@ class ApiProperties(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_request.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_request.py index 466b7fe8..47f165fb 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_request.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_request.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,8 +17,8 @@ import pprint import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional from thousandeyes_sdk.tests.models.api_request_assertion import ApiRequestAssertion from thousandeyes_sdk.tests.models.api_request_auth_type import ApiRequestAuthType from thousandeyes_sdk.tests.models.api_request_header import ApiRequestHeader @@ -35,7 +35,7 @@ class ApiRequest(BaseModel): auth_type: Optional[ApiRequestAuthType] = Field(default=None, alias="authType") bearer_token: Optional[StrictStr] = Field(default=None, description="The bearer token if `authType = bearer-token`.", alias="bearerToken") body: Optional[StrictStr] = Field(default=None, description="POST/PUT request body. Must be in JSON format.") - collect_api_response: Optional[StrictStr] = Field(default='true', description="Set to `true` if API response body should be collected and saved. Set to `false` if API response body should not be saved.", alias="collectApiResponse") + collect_api_response: Optional[StrictBool] = Field(default=True, description="Set to `true` if API response body should be collected and saved. Set to `false` if API response body should not be saved.", alias="collectApiResponse") headers: Optional[List[ApiRequestHeader]] = Field(default=None, description="Array of API Request Header objects.") method: Optional[ApiRequestMethod] = None name: StrictStr = Field(description="API step name, must be unique.") @@ -43,13 +43,14 @@ class ApiRequest(BaseModel): url: StrictStr = Field(description="Request url. Supports variables in the format `{{variableName}}`.") username: Optional[StrictStr] = Field(default=None, description="The username if `authType = basic`.") variables: Optional[List[ApiRequestVariable]] = Field(default=None, description="Array of API post request variable objects.") - wait_time_ms: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Post request delay before executing the next API requests, in milliseconds.", alias="waitTimeMs") + wait_time_ms: Optional[StrictInt] = Field(default=None, description="Post request delay before executing the next API requests, in milliseconds.", alias="waitTimeMs") __properties: ClassVar[List[str]] = ["assertions", "authType", "bearerToken", "body", "collectApiResponse", "headers", "method", "name", "password", "url", "username", "variables", "waitTimeMs"] model_config = ConfigDict( populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -60,7 +61,7 @@ class ApiRequest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: @@ -122,7 +123,7 @@ class ApiRequest(BaseModel): "authType": obj.get("authType"), "bearerToken": obj.get("bearerToken"), "body": obj.get("body"), - "collectApiResponse": obj.get("collectApiResponse") if obj.get("collectApiResponse") is not None else 'true', + "collectApiResponse": obj.get("collectApiResponse") if obj.get("collectApiResponse") is not None else True, "headers": [ApiRequestHeader.from_dict(_item) for _item in obj["headers"]] if obj.get("headers") is not None else None, "method": obj.get("method"), "name": obj.get("name"), diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_request_assertion.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_request_assertion.py index 2d99a96a..9a80d588 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_request_assertion.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_request_assertion.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -37,6 +37,7 @@ class ApiRequestAssertion(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -47,7 +48,7 @@ class ApiRequestAssertion(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_request_assertion_name.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_request_assertion_name.py index 9bf63faa..64ca5ec4 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_request_assertion_name.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_request_assertion_name.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_request_assertion_operator.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_request_assertion_operator.py index 0a16f944..9fbca0d4 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_request_assertion_operator.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_request_assertion_operator.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_request_auth_type.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_request_auth_type.py index 39b10f15..db6c6f3a 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_request_auth_type.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_request_auth_type.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_request_header.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_request_header.py index 86986542..37d0b15b 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_request_header.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_request_header.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class ApiRequestHeader(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class ApiRequestHeader(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_request_method.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_request_method.py index 587388d5..c35e2d64 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_request_method.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_request_method.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_request_variable.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_request_variable.py index f13df498..2f391f27 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_request_variable.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_request_variable.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class ApiRequestVariable(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class ApiRequestVariable(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_test.py index cb9b7cc3..96417897 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -58,7 +58,7 @@ class ApiTest(BaseModel): links: Optional[TestLinks] = Field(default=None, alias="_links") labels: Optional[List[TestLabel]] = None shared_with_accounts: Optional[List[SharedWithAccount]] = Field(default=None, alias="sharedWithAccounts") - follow_redirects: Optional[StrictBool] = Field(default=True, description="Indicates if HTTP/301 or HTTP/302 redirect directives should be followed. To disable following redirects, set this parameter to false.", alias="followRedirects") + follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`.", alias="followRedirects") mtu_measurements: Optional[StrictBool] = Field(default=None, description="Set `true` to measure MTU sizes on network from agents to the target.", alias="mtuMeasurements") network_measurements: Optional[StrictBool] = Field(default=True, description="Enable or disable network measurements. Set to true to enable or false to disable network measurements.", alias="networkMeasurements") num_path_traces: Optional[Annotated[int, Field(le=10, strict=True, ge=1)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") @@ -82,6 +82,7 @@ class ApiTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -92,7 +93,7 @@ class ApiTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_tests.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_tests.py index d0ff11de..39e6bb25 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_tests.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/api_tests.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class ApiTests(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class ApiTests(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/base_bgp_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/base_bgp_test.py index f5f1b18e..9a5320fb 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/base_bgp_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/base_bgp_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -57,6 +57,7 @@ class BaseBgpTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -67,7 +68,7 @@ class BaseBgpTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/base_request.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/base_request.py index 574606f7..fd081602 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/base_request.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/base_request.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class BaseRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class BaseRequest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/base_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/base_test.py index f1aa4628..a13287f8 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/base_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/base_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -38,6 +38,7 @@ class BaseTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -48,7 +49,7 @@ class BaseTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/bgp_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/bgp_test.py index d37fecf3..adfe3f32 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/bgp_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/bgp_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -58,6 +58,7 @@ class BgpTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -68,7 +69,7 @@ class BgpTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/bgp_tests.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/bgp_tests.py index 4eb164bb..1f1aba6a 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/bgp_tests.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/bgp_tests.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class BgpTests(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class BgpTests(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/cloud_enterprise_agent_type.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/cloud_enterprise_agent_type.py index 5d602c83..62e07c60 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/cloud_enterprise_agent_type.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/cloud_enterprise_agent_type.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_query_class.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_query_class.py index 713bdb48..87771d1f 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_query_class.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_query_class.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_sec_instant_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_sec_instant_test.py index 2b4d42c6..2c41fd6b 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_sec_instant_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_sec_instant_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -54,6 +54,7 @@ class DnsSecInstantTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -64,7 +65,7 @@ class DnsSecInstantTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_sec_properties.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_sec_properties.py index 76906a3c..3ca36440 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_sec_properties.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_sec_properties.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class DnsSecProperties(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class DnsSecProperties(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_sec_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_sec_test.py index 902b0db1..cbb4e581 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_sec_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_sec_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -60,6 +60,7 @@ class DnsSecTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -70,7 +71,7 @@ class DnsSecTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_sec_tests.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_sec_tests.py index 751e77e7..bc8509ae 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_sec_tests.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_sec_tests.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class DnsSecTests(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class DnsSecTests(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_server_instant_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_server_instant_test.py index 924bfc69..391f1bcd 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_server_instant_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_server_instant_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -73,6 +73,7 @@ class DnsServerInstantTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -83,7 +84,7 @@ class DnsServerInstantTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_server_properties.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_server_properties.py index 0cecb723..71905c1b 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_server_properties.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_server_properties.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -55,6 +55,7 @@ class DnsServerProperties(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -65,7 +66,7 @@ class DnsServerProperties(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_server_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_server_test.py index b9480d6d..d6c77e4a 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_server_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_server_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -83,6 +83,7 @@ class DnsServerTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -93,7 +94,7 @@ class DnsServerTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_server_tests.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_server_tests.py index 713130e4..df87d28f 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_server_tests.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_server_tests.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class DnsServerTests(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class DnsServerTests(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_servers_request.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_servers_request.py index e7b83df6..c916dd91 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_servers_request.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_servers_request.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -33,6 +33,7 @@ class DnsServersRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -43,7 +44,7 @@ class DnsServersRequest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_trace_instant_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_trace_instant_test.py index 11761ce6..bf2ac33f 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_trace_instant_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_trace_instant_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -56,6 +56,7 @@ class DnsTraceInstantTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -66,7 +67,7 @@ class DnsTraceInstantTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_trace_properties.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_trace_properties.py index 2beb9b59..98f0addb 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_trace_properties.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_trace_properties.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -38,6 +38,7 @@ class DnsTraceProperties(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -48,7 +49,7 @@ class DnsTraceProperties(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_trace_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_trace_test.py index 94d0a6ec..0a24df38 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_trace_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_trace_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -62,6 +62,7 @@ class DnsTraceTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -72,7 +73,7 @@ class DnsTraceTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_trace_tests.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_trace_tests.py index bcd3844c..f7b24d7a 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_trace_tests.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/dns_trace_tests.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class DnsTraceTests(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class DnsTraceTests(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/error.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/error.py index f1d9b911..00f01cfa 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/error.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/error.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -37,6 +37,7 @@ class Error(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -47,7 +48,7 @@ class Error(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/expand.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/expand.py index d262141c..782289ef 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/expand.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/expand.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/ftp_server_instant_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/ftp_server_instant_test.py index 64da0f15..5605f3ab 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/ftp_server_instant_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/ftp_server_instant_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -75,6 +75,7 @@ class FtpServerInstantTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -85,7 +86,7 @@ class FtpServerInstantTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/ftp_server_properties.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/ftp_server_properties.py index 6d33327b..1f8d5ffb 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/ftp_server_properties.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/ftp_server_properties.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -57,6 +57,7 @@ class FtpServerProperties(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -67,7 +68,7 @@ class FtpServerProperties(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/ftp_server_request_type.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/ftp_server_request_type.py index eb0b393c..6ba689ee 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/ftp_server_request_type.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/ftp_server_request_type.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/ftp_server_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/ftp_server_test.py index 3fa4ab65..75db968d 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/ftp_server_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/ftp_server_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -85,6 +85,7 @@ class FtpServerTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -95,7 +96,7 @@ class FtpServerTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/ftp_server_tests.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/ftp_server_tests.py index 13e9270c..28203752 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/ftp_server_tests.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/ftp_server_tests.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class FtpServerTests(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class FtpServerTests(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/http_server_instant_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/http_server_instant_test.py index 5b99c2f5..b3a3c8db 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/http_server_instant_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/http_server_instant_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -91,6 +91,7 @@ class HttpServerInstantTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -101,7 +102,7 @@ class HttpServerInstantTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/http_server_properties.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/http_server_properties.py index a4e7ecb4..400c28e7 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/http_server_properties.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/http_server_properties.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -73,6 +73,7 @@ class HttpServerProperties(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -83,7 +84,7 @@ class HttpServerProperties(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/http_server_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/http_server_test.py index 2fb77de6..e804868d 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/http_server_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/http_server_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -101,6 +101,7 @@ class HttpServerTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -111,7 +112,7 @@ class HttpServerTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/http_server_tests.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/http_server_tests.py index cf3e83a0..871b54bc 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/http_server_tests.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/http_server_tests.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class HttpServerTests(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class HttpServerTests(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/instant_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/instant_test.py index 9a170cd6..59d0570c 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/instant_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/instant_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -50,6 +50,7 @@ class InstantTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -60,7 +61,7 @@ class InstantTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/interface_group.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/interface_group.py index 4ef8a2d2..29631649 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/interface_group.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/interface_group.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -37,6 +37,7 @@ class InterfaceGroup(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -47,7 +48,7 @@ class InterfaceGroup(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/interface_groups.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/interface_groups.py index 51d6a1fe..d1e2183f 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/interface_groups.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/interface_groups.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class InterfaceGroups(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class InterfaceGroups(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/link.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/link.py index 2de0621d..fd0d91a4 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/link.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/link.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -40,6 +40,7 @@ class Link(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -50,7 +51,7 @@ class Link(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/monitor.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/monitor.py index c2be1ba9..a4ee81a5 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/monitor.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/monitor.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -39,6 +39,7 @@ class Monitor(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -49,7 +50,7 @@ class Monitor(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/monitor_type.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/monitor_type.py index f44b365e..65d23ab2 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/monitor_type.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/monitor_type.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/monitors_request.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/monitors_request.py index 2ecd9bb8..24853b89 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/monitors_request.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/monitors_request.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -33,6 +33,7 @@ class MonitorsRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -43,7 +44,7 @@ class MonitorsRequest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/page_load_instant_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/page_load_instant_test.py index f11a725d..92417655 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/page_load_instant_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/page_load_instant_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -59,7 +59,7 @@ class PageLoadInstantTest(BaseModel): custom_headers: Optional[TestCustomHeaders] = Field(default=None, alias="customHeaders") desired_status_code: Optional[StrictStr] = Field(default='200', description="Specify the HTTP status code value that indicates a successful response.", alias="desiredStatusCode") emulated_device_id: Optional[StrictStr] = Field(default=None, description="id of the emulated device, if one was given when the test was created", alias="emulatedDeviceId") - follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to false.", alias="followRedirects") + follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`.", alias="followRedirects") http_target_time: Optional[Annotated[int, Field(le=5000, strict=True, ge=100)]] = Field(default=None, description="Target time for HTTP server completion, specified in milliseconds.", alias="httpTargetTime") http_time_limit: Optional[Annotated[int, Field(le=60, strict=True, ge=5)]] = Field(default=5, description="HTTP time limit in seconds.", alias="httpTimeLimit") http_version: Optional[Annotated[int, Field(le=2, strict=True, ge=1)]] = Field(default=2, description="HTTP protocol version. Set to '2' to prefer HTTP/2, or '1' to use only HTTP/1.1.", alias="httpVersion") @@ -95,6 +95,7 @@ class PageLoadInstantTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -105,7 +106,7 @@ class PageLoadInstantTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/page_load_properties.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/page_load_properties.py index 909eb322..14387ff6 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/page_load_properties.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/page_load_properties.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -41,7 +41,7 @@ class PageLoadProperties(BaseModel): custom_headers: Optional[TestCustomHeaders] = Field(default=None, alias="customHeaders") desired_status_code: Optional[StrictStr] = Field(default='200', description="Specify the HTTP status code value that indicates a successful response.", alias="desiredStatusCode") emulated_device_id: Optional[StrictStr] = Field(default=None, description="id of the emulated device, if one was given when the test was created", alias="emulatedDeviceId") - follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to false.", alias="followRedirects") + follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`.", alias="followRedirects") http_target_time: Optional[Annotated[int, Field(le=5000, strict=True, ge=100)]] = Field(default=None, description="Target time for HTTP server completion, specified in milliseconds.", alias="httpTargetTime") http_time_limit: Optional[Annotated[int, Field(le=60, strict=True, ge=5)]] = Field(default=5, description="HTTP time limit in seconds.", alias="httpTimeLimit") http_version: Optional[Annotated[int, Field(le=2, strict=True, ge=1)]] = Field(default=2, description="HTTP protocol version. Set to '2' to prefer HTTP/2, or '1' to use only HTTP/1.1.", alias="httpVersion") @@ -77,6 +77,7 @@ class PageLoadProperties(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -87,7 +88,7 @@ class PageLoadProperties(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/page_load_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/page_load_test.py index 217c705d..ab7e3f1a 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/page_load_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/page_load_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -68,7 +68,7 @@ class PageLoadTest(BaseModel): custom_headers: Optional[TestCustomHeaders] = Field(default=None, alias="customHeaders") desired_status_code: Optional[StrictStr] = Field(default='200', description="Specify the HTTP status code value that indicates a successful response.", alias="desiredStatusCode") emulated_device_id: Optional[StrictStr] = Field(default=None, description="id of the emulated device, if one was given when the test was created", alias="emulatedDeviceId") - follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to false.", alias="followRedirects") + follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`.", alias="followRedirects") http_target_time: Optional[Annotated[int, Field(le=5000, strict=True, ge=100)]] = Field(default=None, description="Target time for HTTP server completion, specified in milliseconds.", alias="httpTargetTime") http_time_limit: Optional[Annotated[int, Field(le=60, strict=True, ge=5)]] = Field(default=5, description="HTTP time limit in seconds.", alias="httpTimeLimit") http_version: Optional[Annotated[int, Field(le=2, strict=True, ge=1)]] = Field(default=2, description="HTTP protocol version. Set to '2' to prefer HTTP/2, or '1' to use only HTTP/1.1.", alias="httpVersion") @@ -109,6 +109,7 @@ class PageLoadTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -119,7 +120,7 @@ class PageLoadTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/page_load_tests.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/page_load_tests.py index 145beb8c..fe5d79ed 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/page_load_tests.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/page_load_tests.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class PageLoadTests(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class PageLoadTests(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/self_links.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/self_links.py index 4aecbf15..3fde1e1f 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/self_links.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/self_links.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class SelfLinks(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class SelfLinks(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/severity.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/severity.py index 78a81d8b..8c36b726 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/severity.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/severity.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/shared_with_account.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/shared_with_account.py index 7f04a282..f120c3c6 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/shared_with_account.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/shared_with_account.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class SharedWithAccount(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class SharedWithAccount(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/simple_agent.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/simple_agent.py index 663ac338..f2a5af7c 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/simple_agent.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/simple_agent.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -42,6 +42,7 @@ class SimpleAgent(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -52,7 +53,7 @@ class SimpleAgent(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/simple_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/simple_test.py index d1c40619..8d992b7f 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/simple_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/simple_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -51,6 +51,7 @@ class SimpleTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -61,7 +62,7 @@ class SimpleTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/sip_server_instant_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/sip_server_instant_test.py index 36b0599a..1a613ddc 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/sip_server_instant_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/sip_server_instant_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -66,6 +66,7 @@ class SipServerInstantTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -76,7 +77,7 @@ class SipServerInstantTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/sip_server_instant_test_request.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/sip_server_instant_test_request.py index 85549feb..8cb28ca1 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/sip_server_instant_test_request.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/sip_server_instant_test_request.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -68,6 +68,7 @@ class SipServerInstantTestRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -78,7 +79,7 @@ class SipServerInstantTestRequest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/sip_server_instant_test_response.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/sip_server_instant_test_response.py index 8a61862d..8a53010d 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/sip_server_instant_test_response.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/sip_server_instant_test_response.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -73,6 +73,7 @@ class SipServerInstantTestResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -83,7 +84,7 @@ class SipServerInstantTestResponse(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/sip_server_properties.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/sip_server_properties.py index d0004fa8..bc0714d6 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/sip_server_properties.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/sip_server_properties.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -48,6 +48,7 @@ class SipServerProperties(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -58,7 +59,7 @@ class SipServerProperties(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/sip_server_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/sip_server_test.py index 70c0dac7..04fbfbcb 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/sip_server_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/sip_server_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -83,6 +83,7 @@ class SipServerTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -93,7 +94,7 @@ class SipServerTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/sip_server_tests.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/sip_server_tests.py index 02f8d839..547ce82d 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/sip_server_tests.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/sip_server_tests.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class SipServerTests(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class SipServerTests(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/sip_test_protocol.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/sip_test_protocol.py index 989304f7..bafb4c59 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/sip_test_protocol.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/sip_test_protocol.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_auth_type.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_auth_type.py index 0b64d17d..1f64c0c3 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_auth_type.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_auth_type.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_custom_headers.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_custom_headers.py index cfab1aa8..493160c1 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_custom_headers.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_custom_headers.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class TestCustomHeaders(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class TestCustomHeaders(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_direction.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_direction.py index f249446e..1bae86e5 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_direction.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_direction.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_dns_server.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_dns_server.py index 41b5c178..daa51c71 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_dns_server.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_dns_server.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class TestDnsServer(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class TestDnsServer(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_dns_transport_protocol.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_dns_transport_protocol.py index c9cb9282..8ec9ee98 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_dns_transport_protocol.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_dns_transport_protocol.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_dscp_id.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_dscp_id.py index 137613fe..ae76d2b5 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_dscp_id.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_dscp_id.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_http_interval.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_http_interval.py index b521713c..7a949c39 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_http_interval.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_http_interval.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_interval.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_interval.py index 2a6f7478..50eb749d 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_interval.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_interval.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_ipv6_policy.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_ipv6_policy.py index dca61dad..6379a74f 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_ipv6_policy.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_ipv6_policy.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_label.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_label.py index e046b425..a0b2fdec 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_label.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_label.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class TestLabel(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class TestLabel(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_links.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_links.py index 1a9e3395..5bb8e85c 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_links.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_links.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class TestLinks(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class TestLinks(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_monitors_properties.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_monitors_properties.py index 0f1fd31a..84414731 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_monitors_properties.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_monitors_properties.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class TestMonitorsProperties(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class TestMonitorsProperties(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_page_loading_strategy.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_page_loading_strategy.py index 1a20f0e8..3afa21b5 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_page_loading_strategy.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_page_loading_strategy.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_path_trace_mode.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_path_trace_mode.py index 6d19f763..bb64dc69 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_path_trace_mode.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_path_trace_mode.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_probe_mode.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_probe_mode.py index 1f8d2c88..fc6e6e34 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_probe_mode.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_probe_mode.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_protocol.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_protocol.py index c3ded62d..d4f38f41 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_protocol.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_protocol.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_request.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_request.py index 0fee0567..38d562b1 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_request.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_request.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -37,6 +37,7 @@ class TestRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -47,7 +48,7 @@ class TestRequest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_self_link.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_self_link.py index 831fae8d..d5dd749d 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_self_link.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_self_link.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -40,6 +40,7 @@ class TestSelfLink(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -50,7 +51,7 @@ class TestSelfLink(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_sip_credentials.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_sip_credentials.py index a2e23d40..93e9e2eb 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_sip_credentials.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_sip_credentials.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -40,6 +40,7 @@ class TestSipCredentials(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -50,7 +51,7 @@ class TestSipCredentials(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_ssl_version_id.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_ssl_version_id.py index bc22f72c..60d9ab68 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_ssl_version_id.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_ssl_version_id.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_sub_interval.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_sub_interval.py index 1f1b356d..98062856 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_sub_interval.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_sub_interval.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_type.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_type.py index 06ebf03e..ffaf30af 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_type.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/test_type.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -26,6 +26,7 @@ class TestType(str, Enum): """ allowed enum values """ + API = 'api' AGENT_MINUS_TO_MINUS_AGENT = 'agent-to-agent' AGENT_MINUS_TO_MINUS_SERVER = 'agent-to-server' BGP = 'bgp' diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/tests.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/tests.py index e9008193..e01e9aca 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/tests.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/tests.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class Tests(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class Tests(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unauthorized_error.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unauthorized_error.py index a850f676..c65803b0 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unauthorized_error.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unauthorized_error.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class UnauthorizedError(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class UnauthorizedError(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_agent_to_agent_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_agent_to_agent_test.py index 5efb1294..25440bef 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_agent_to_agent_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_agent_to_agent_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -69,6 +69,7 @@ class UnexpandedAgentToAgentTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -79,7 +80,7 @@ class UnexpandedAgentToAgentTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_agent_to_server_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_agent_to_server_test.py index 87b44a0c..bb8c176b 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_agent_to_server_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_agent_to_server_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -72,6 +72,7 @@ class UnexpandedAgentToServerTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -82,7 +83,7 @@ class UnexpandedAgentToServerTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_api_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_api_test.py index 2159d936..0e087b76 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_api_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_api_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -50,7 +50,7 @@ class UnexpandedApiTest(BaseModel): test_name: Optional[StrictStr] = Field(default=None, description="The name of the test. Test name must be unique.", alias="testName") type: Optional[StrictStr] = None links: Optional[TestLinks] = Field(default=None, alias="_links") - follow_redirects: Optional[StrictBool] = Field(default=True, description="Indicates if HTTP/301 or HTTP/302 redirect directives should be followed. To disable following redirects, set this parameter to false.", alias="followRedirects") + follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`.", alias="followRedirects") mtu_measurements: Optional[StrictBool] = Field(default=None, description="Set `true` to measure MTU sizes on network from agents to the target.", alias="mtuMeasurements") network_measurements: Optional[StrictBool] = Field(default=True, description="Enable or disable network measurements. Set to true to enable or false to disable network measurements.", alias="networkMeasurements") num_path_traces: Optional[Annotated[int, Field(le=10, strict=True, ge=1)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") @@ -71,6 +71,7 @@ class UnexpandedApiTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -81,7 +82,7 @@ class UnexpandedApiTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_bgp_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_bgp_test.py index 2f513869..fe757c46 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_bgp_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_bgp_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -50,6 +50,7 @@ class UnexpandedBgpTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -60,7 +61,7 @@ class UnexpandedBgpTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_dns_sec_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_dns_sec_test.py index f0627805..195e40dd 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_dns_sec_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_dns_sec_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -52,6 +52,7 @@ class UnexpandedDnsSecTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -62,7 +63,7 @@ class UnexpandedDnsSecTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_dns_server_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_dns_server_test.py index b8339f8a..b18da679 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_dns_server_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_dns_server_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -73,6 +73,7 @@ class UnexpandedDnsServerTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -83,7 +84,7 @@ class UnexpandedDnsServerTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_dns_trace_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_dns_trace_test.py index 335eb635..3a2bb277 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_dns_trace_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_dns_trace_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -54,6 +54,7 @@ class UnexpandedDnsTraceTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -64,7 +65,7 @@ class UnexpandedDnsTraceTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_ftp_server_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_ftp_server_test.py index 154e1d78..8c444148 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_ftp_server_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_ftp_server_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -75,6 +75,7 @@ class UnexpandedFtpServerTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -85,7 +86,7 @@ class UnexpandedFtpServerTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_http_server_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_http_server_test.py index 13e8de47..f2ffa530 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_http_server_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_http_server_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -91,6 +91,7 @@ class UnexpandedHttpServerTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -101,7 +102,7 @@ class UnexpandedHttpServerTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_instant_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_instant_test.py index 469d82fd..ab63004c 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_instant_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_instant_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -46,6 +46,7 @@ class UnexpandedInstantTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -56,7 +57,7 @@ class UnexpandedInstantTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_page_load_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_page_load_test.py index e519399c..33bec28a 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_page_load_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_page_load_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -60,7 +60,7 @@ class UnexpandedPageLoadTest(BaseModel): custom_headers: Optional[TestCustomHeaders] = Field(default=None, alias="customHeaders") desired_status_code: Optional[StrictStr] = Field(default='200', description="Specify the HTTP status code value that indicates a successful response.", alias="desiredStatusCode") emulated_device_id: Optional[StrictStr] = Field(default=None, description="id of the emulated device, if one was given when the test was created", alias="emulatedDeviceId") - follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to false.", alias="followRedirects") + follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`.", alias="followRedirects") http_target_time: Optional[Annotated[int, Field(le=5000, strict=True, ge=100)]] = Field(default=None, description="Target time for HTTP server completion, specified in milliseconds.", alias="httpTargetTime") http_time_limit: Optional[Annotated[int, Field(le=60, strict=True, ge=5)]] = Field(default=5, description="HTTP time limit in seconds.", alias="httpTimeLimit") http_version: Optional[Annotated[int, Field(le=2, strict=True, ge=1)]] = Field(default=2, description="HTTP protocol version. Set to '2' to prefer HTTP/2, or '1' to use only HTTP/1.1.", alias="httpVersion") @@ -99,6 +99,7 @@ class UnexpandedPageLoadTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -109,7 +110,7 @@ class UnexpandedPageLoadTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_sip_server_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_sip_server_test.py index a2d5980c..33b56233 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_sip_server_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_sip_server_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -73,6 +73,7 @@ class UnexpandedSipServerTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -83,7 +84,7 @@ class UnexpandedSipServerTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_test.py index 687a58fb..b9467347 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class UnexpandedTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class UnexpandedTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_voice_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_voice_test.py index 8042757d..d77dd07a 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_voice_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_voice_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -62,6 +62,7 @@ class UnexpandedVoiceTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -72,7 +73,7 @@ class UnexpandedVoiceTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_web_transaction_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_web_transaction_test.py index 31331fe7..42cdf753 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_web_transaction_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/unexpanded_web_transaction_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -59,7 +59,7 @@ class UnexpandedWebTransactionTest(BaseModel): custom_headers: Optional[TestCustomHeaders] = Field(default=None, alias="customHeaders") desired_status_code: Optional[StrictStr] = Field(default='200', description="Specify the HTTP status code value that indicates a successful response.", alias="desiredStatusCode") emulated_device_id: Optional[StrictStr] = Field(default=None, description="id of the emulated device, if one was given when the test was created", alias="emulatedDeviceId") - follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to false.", alias="followRedirects") + follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`.", alias="followRedirects") http_target_time: Optional[Annotated[int, Field(le=5000, strict=True, ge=100)]] = Field(default=None, description="Target time for HTTP server completion, specified in milliseconds.", alias="httpTargetTime") http_time_limit: Optional[Annotated[int, Field(le=60, strict=True, ge=5)]] = Field(default=5, description="HTTP time limit in seconds.", alias="httpTimeLimit") http_version: Optional[Annotated[int, Field(le=2, strict=True, ge=1)]] = Field(default=2, description="HTTP protocol version. Set to '2' to prefer HTTP/2, or '1' to use only HTTP/1.1.", alias="httpVersion") @@ -98,6 +98,7 @@ class UnexpandedWebTransactionTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -108,7 +109,7 @@ class UnexpandedWebTransactionTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_agent_to_agent_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_agent_to_agent_test.py index 3d36fa4f..5113e0cb 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_agent_to_agent_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_agent_to_agent_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -75,6 +75,7 @@ class UpdateAgentToAgentTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -85,7 +86,7 @@ class UpdateAgentToAgentTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_agent_to_server_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_agent_to_server_test.py index 96caff33..90643937 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_agent_to_server_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_agent_to_server_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -78,6 +78,7 @@ class UpdateAgentToServerTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -88,7 +89,7 @@ class UpdateAgentToServerTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_api_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_api_test.py index 8c603f01..653d4c84 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_api_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_api_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -55,7 +55,7 @@ class UpdateApiTest(BaseModel): links: Optional[TestLinks] = Field(default=None, alias="_links") labels: Optional[List[StrictStr]] = Field(default=None, description="Contains list of test label IDs (get `labelId` from `/labels` endpoint)") shared_with_accounts: Optional[List[StrictStr]] = Field(default=None, description="Contains list of account group IDs. Test is shared with the listed account groups (get `aid` from `/account-groups` endpoint)", alias="sharedWithAccounts") - follow_redirects: Optional[StrictBool] = Field(default=True, description="Indicates if HTTP/301 or HTTP/302 redirect directives should be followed. To disable following redirects, set this parameter to false.", alias="followRedirects") + follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`.", alias="followRedirects") mtu_measurements: Optional[StrictBool] = Field(default=None, description="Set `true` to measure MTU sizes on network from agents to the target.", alias="mtuMeasurements") network_measurements: Optional[StrictBool] = Field(default=True, description="Enable or disable network measurements. Set to true to enable or false to disable network measurements.", alias="networkMeasurements") num_path_traces: Optional[Annotated[int, Field(le=10, strict=True, ge=1)]] = Field(default=3, description="Number of path traces executed by the agent.", alias="numPathTraces") @@ -79,6 +79,7 @@ class UpdateApiTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -89,7 +90,7 @@ class UpdateApiTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_bgp_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_bgp_test.py index b80659cb..80db9aa3 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_bgp_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_bgp_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -54,6 +54,7 @@ class UpdateBgpTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -64,7 +65,7 @@ class UpdateBgpTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_bgp_test_request.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_bgp_test_request.py index 1af83fe1..692e7e65 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_bgp_test_request.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_bgp_test_request.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -53,6 +53,7 @@ class UpdateBgpTestRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -63,7 +64,7 @@ class UpdateBgpTestRequest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_dns_sec_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_dns_sec_test.py index 0eb662f2..bb54923e 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_dns_sec_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_dns_sec_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -57,6 +57,7 @@ class UpdateDnsSecTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -67,7 +68,7 @@ class UpdateDnsSecTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_dns_server_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_dns_server_test.py index 4124bd4d..f264b655 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_dns_server_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_dns_server_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -78,6 +78,7 @@ class UpdateDnsServerTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -88,7 +89,7 @@ class UpdateDnsServerTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_dns_trace_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_dns_trace_test.py index 326804aa..2fa31d07 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_dns_trace_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_dns_trace_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -59,6 +59,7 @@ class UpdateDnsTraceTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -69,7 +70,7 @@ class UpdateDnsTraceTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_ftp_server_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_ftp_server_test.py index 364bd0a2..d87cc0a3 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_ftp_server_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_ftp_server_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -81,6 +81,7 @@ class UpdateFtpServerTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -91,7 +92,7 @@ class UpdateFtpServerTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_http_server_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_http_server_test.py index bb296ff4..c9987a75 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_http_server_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_http_server_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -97,6 +97,7 @@ class UpdateHttpServerTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -107,7 +108,7 @@ class UpdateHttpServerTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_page_load_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_page_load_test.py index eb316e51..8ceccb04 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_page_load_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_page_load_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -64,7 +64,7 @@ class UpdatePageLoadTest(BaseModel): custom_headers: Optional[TestCustomHeaders] = Field(default=None, alias="customHeaders") desired_status_code: Optional[StrictStr] = Field(default='200', description="Specify the HTTP status code value that indicates a successful response.", alias="desiredStatusCode") emulated_device_id: Optional[StrictStr] = Field(default=None, description="id of the emulated device, if one was given when the test was created", alias="emulatedDeviceId") - follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to false.", alias="followRedirects") + follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`.", alias="followRedirects") http_target_time: Optional[Annotated[int, Field(le=5000, strict=True, ge=100)]] = Field(default=None, description="Target time for HTTP server completion, specified in milliseconds.", alias="httpTargetTime") http_time_limit: Optional[Annotated[int, Field(le=60, strict=True, ge=5)]] = Field(default=5, description="HTTP time limit in seconds.", alias="httpTimeLimit") http_version: Optional[Annotated[int, Field(le=2, strict=True, ge=1)]] = Field(default=2, description="HTTP protocol version. Set to '2' to prefer HTTP/2, or '1' to use only HTTP/1.1.", alias="httpVersion") @@ -105,6 +105,7 @@ class UpdatePageLoadTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -115,7 +116,7 @@ class UpdatePageLoadTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_sip_server_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_sip_server_test.py index a5cc026b..e9ad1f9c 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_sip_server_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_sip_server_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -75,6 +75,7 @@ class UpdateSipServerTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -85,7 +86,7 @@ class UpdateSipServerTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_sip_server_test1.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_sip_server_test1.py index e57d7a09..3cc4a6c8 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_sip_server_test1.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_sip_server_test1.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -78,6 +78,7 @@ class UpdateSipServerTest1(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -88,7 +89,7 @@ class UpdateSipServerTest1(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_voice_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_voice_test.py index 00b758a1..a61e907e 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_voice_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_voice_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -69,6 +69,7 @@ class UpdateVoiceTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -79,7 +80,7 @@ class UpdateVoiceTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_web_transaction_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_web_transaction_test.py index 6e6cab59..de1c022d 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_web_transaction_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/update_web_transaction_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -63,7 +63,7 @@ class UpdateWebTransactionTest(BaseModel): custom_headers: Optional[TestCustomHeaders] = Field(default=None, alias="customHeaders") desired_status_code: Optional[StrictStr] = Field(default='200', description="Specify the HTTP status code value that indicates a successful response.", alias="desiredStatusCode") emulated_device_id: Optional[StrictStr] = Field(default=None, description="id of the emulated device, if one was given when the test was created", alias="emulatedDeviceId") - follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to false.", alias="followRedirects") + follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`.", alias="followRedirects") http_target_time: Optional[Annotated[int, Field(le=5000, strict=True, ge=100)]] = Field(default=None, description="Target time for HTTP server completion, specified in milliseconds.", alias="httpTargetTime") http_time_limit: Optional[Annotated[int, Field(le=60, strict=True, ge=5)]] = Field(default=5, description="HTTP time limit in seconds.", alias="httpTimeLimit") http_version: Optional[Annotated[int, Field(le=2, strict=True, ge=1)]] = Field(default=2, description="HTTP protocol version. Set to '2' to prefer HTTP/2, or '1' to use only HTTP/1.1.", alias="httpVersion") @@ -105,6 +105,7 @@ class UpdateWebTransactionTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -115,7 +116,7 @@ class UpdateWebTransactionTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/validation_error.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/validation_error.py index b8fe7cee..1437cd12 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/validation_error.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/validation_error.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -39,6 +39,7 @@ class ValidationError(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -49,7 +50,7 @@ class ValidationError(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/validation_error_item.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/validation_error_item.py index b364bb7c..ccaca7ab 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/validation_error_item.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/validation_error_item.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,7 +17,7 @@ import pprint import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +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 @@ -27,7 +27,7 @@ class ValidationErrorItem(BaseModel): ValidationErrorItem """ # noqa: E501 code: Optional[StrictStr] = Field(default=None, description="(Optional) A unique error type/code that can be referenced in the documentation for further details.") - var_field: Optional[StrictInt] = Field(default=None, description="Identifies the field that triggered this particular error.", alias="field") + var_field: Optional[StrictStr] = Field(default=None, description="Identifies the field that triggered this particular error.", alias="field") message: Optional[StrictStr] = Field(default=None, description="A short, human-readable summary of the error.") __properties: ClassVar[List[str]] = ["code", "field", "message"] @@ -35,6 +35,7 @@ class ValidationErrorItem(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class ValidationErrorItem(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/voice_instant_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/voice_instant_test.py index 9fce994c..902e85b5 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/voice_instant_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/voice_instant_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -62,6 +62,7 @@ class VoiceInstantTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -72,7 +73,7 @@ class VoiceInstantTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/voice_properties.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/voice_properties.py index 5477b7a6..ce95b712 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/voice_properties.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/voice_properties.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -44,6 +44,7 @@ class VoiceProperties(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -54,7 +55,7 @@ class VoiceProperties(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/voice_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/voice_test.py index 3148d97c..83a2ecdc 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/voice_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/voice_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -72,6 +72,7 @@ class VoiceTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -82,7 +83,7 @@ class VoiceTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/voice_tests.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/voice_tests.py index a519d282..dc9c2804 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/voice_tests.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/voice_tests.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class VoiceTests(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class VoiceTests(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/web_transaction_instant_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/web_transaction_instant_test.py index d3ebae13..2976acb1 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/web_transaction_instant_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/web_transaction_instant_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -59,7 +59,7 @@ class WebTransactionInstantTest(BaseModel): custom_headers: Optional[TestCustomHeaders] = Field(default=None, alias="customHeaders") desired_status_code: Optional[StrictStr] = Field(default='200', description="Specify the HTTP status code value that indicates a successful response.", alias="desiredStatusCode") emulated_device_id: Optional[StrictStr] = Field(default=None, description="id of the emulated device, if one was given when the test was created", alias="emulatedDeviceId") - follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to false.", alias="followRedirects") + follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`.", alias="followRedirects") http_target_time: Optional[Annotated[int, Field(le=5000, strict=True, ge=100)]] = Field(default=None, description="Target time for HTTP server completion, specified in milliseconds.", alias="httpTargetTime") http_time_limit: Optional[Annotated[int, Field(le=60, strict=True, ge=5)]] = Field(default=5, description="HTTP time limit in seconds.", alias="httpTimeLimit") http_version: Optional[Annotated[int, Field(le=2, strict=True, ge=1)]] = Field(default=2, description="HTTP protocol version. Set to '2' to prefer HTTP/2, or '1' to use only HTTP/1.1.", alias="httpVersion") @@ -97,6 +97,7 @@ class WebTransactionInstantTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -107,7 +108,7 @@ class WebTransactionInstantTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/web_transaction_properties.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/web_transaction_properties.py index 5b31e5d2..40da1ec1 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/web_transaction_properties.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/web_transaction_properties.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -41,7 +41,7 @@ class WebTransactionProperties(BaseModel): custom_headers: Optional[TestCustomHeaders] = Field(default=None, alias="customHeaders") desired_status_code: Optional[StrictStr] = Field(default='200', description="Specify the HTTP status code value that indicates a successful response.", alias="desiredStatusCode") emulated_device_id: Optional[StrictStr] = Field(default=None, description="id of the emulated device, if one was given when the test was created", alias="emulatedDeviceId") - follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to false.", alias="followRedirects") + follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`.", alias="followRedirects") http_target_time: Optional[Annotated[int, Field(le=5000, strict=True, ge=100)]] = Field(default=None, description="Target time for HTTP server completion, specified in milliseconds.", alias="httpTargetTime") http_time_limit: Optional[Annotated[int, Field(le=60, strict=True, ge=5)]] = Field(default=5, description="HTTP time limit in seconds.", alias="httpTimeLimit") http_version: Optional[Annotated[int, Field(le=2, strict=True, ge=1)]] = Field(default=2, description="HTTP protocol version. Set to '2' to prefer HTTP/2, or '1' to use only HTTP/1.1.", alias="httpVersion") @@ -78,6 +78,7 @@ class WebTransactionProperties(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -88,7 +89,7 @@ class WebTransactionProperties(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/web_transaction_test.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/web_transaction_test.py index 056a450f..c55dd52c 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/web_transaction_test.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/web_transaction_test.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -67,7 +67,7 @@ class WebTransactionTest(BaseModel): custom_headers: Optional[TestCustomHeaders] = Field(default=None, alias="customHeaders") desired_status_code: Optional[StrictStr] = Field(default='200', description="Specify the HTTP status code value that indicates a successful response.", alias="desiredStatusCode") emulated_device_id: Optional[StrictStr] = Field(default=None, description="id of the emulated device, if one was given when the test was created", alias="emulatedDeviceId") - follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to false.", alias="followRedirects") + follow_redirects: Optional[StrictBool] = Field(default=True, description="To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`.", alias="followRedirects") http_target_time: Optional[Annotated[int, Field(le=5000, strict=True, ge=100)]] = Field(default=None, description="Target time for HTTP server completion, specified in milliseconds.", alias="httpTargetTime") http_time_limit: Optional[Annotated[int, Field(le=60, strict=True, ge=5)]] = Field(default=5, description="HTTP time limit in seconds.", alias="httpTimeLimit") http_version: Optional[Annotated[int, Field(le=2, strict=True, ge=1)]] = Field(default=2, description="HTTP protocol version. Set to '2' to prefer HTTP/2, or '1' to use only HTTP/1.1.", alias="httpVersion") @@ -109,6 +109,7 @@ class WebTransactionTest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -119,7 +120,7 @@ class WebTransactionTest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/web_transaction_tests.py b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/web_transaction_tests.py index bfaa0170..f6cfedc2 100644 --- a/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/web_transaction_tests.py +++ b/thousandeyes-sdk-tests/src/thousandeyes_sdk/tests/models/web_transaction_tests.py @@ -5,7 +5,7 @@ This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class WebTransactionTests(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class WebTransactionTests(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-tests/test/test_agent_to_agent_api.py b/thousandeyes-sdk-tests/test/test_agent_to_agent_api.py new file mode 100644 index 00000000..b21f0ed0 --- /dev/null +++ b/thousandeyes-sdk-tests/test/test_agent_to_agent_api.py @@ -0,0 +1,697 @@ +# coding: utf-8 + +""" + Tests API + + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.tests.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.tests.api.agent_to_agent_api import AgentToAgentApi + + +class TestAgentToAgentApi(unittest.TestCase): + """AgentToAgentApi unit test stubs""" + + def setUp(self) -> None: + self.api = AgentToAgentApi() + + def tearDown(self) -> None: + pass + + def test_create_agent_to_agent_test_models_validation(self) -> None: + """Test case for create_agent_to_agent_test request and response models""" + request_body_json = """ + { + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "alertRules" : [ "344753", "212697" ], + "description" : "ThousandEyes Test", + "type" : "agent-to-agent", + "mss" : 100, + "usePublicBgp" : true, + "enabled" : true, + "dscpId" : "0", + "protocol" : "tcp", + "fixedPacketRate" : 50, + "dscp" : "Best Effort (DSCP 0)", + "pathTraceMode" : "classic", + "throughputRate" : 10, + "modifiedBy" : "user@user.com", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test", + "direction" : "to-target", + "throughputMeasurements" : false, + "numPathTraces" : 3, + "bgpMeasurements" : true, + "liveShare" : false, + "savedEvent" : true, + "throughputDuration" : 10000, + "labels" : [ "9842", "1283" ], + "agents" : [ { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + }, { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "port" : 49153, + "modifiedDate" : "2022-07-17T22:00:54Z", + "targetAgentId" : "2954", + "interval" : 120, + "testId" : "281474976710706", + "sharedWithAccounts" : [ "1234", "12345" ], + "monitors" : [ "17410", "5" ] + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.tests.models.UpdateAgentToAgentTest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "description" : "ThousandEyes Test", + "type" : "agent-to-agent", + "mss" : 100, + "usePublicBgp" : true, + "enabled" : true, + "dscpId" : "0", + "protocol" : "tcp", + "fixedPacketRate" : 50, + "dscp" : "Best Effort (DSCP 0)", + "pathTraceMode" : "classic", + "throughputRate" : 10, + "modifiedBy" : "user@user.com", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test", + "direction" : "to-target", + "throughputMeasurements" : false, + "numPathTraces" : 3, + "bgpMeasurements" : true, + "liveShare" : false, + "savedEvent" : true, + "throughputDuration" : 10000, + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "agents" : [ { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + }, { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "port" : 49153, + "modifiedDate" : "2022-07-17T22:00:54Z", + "targetAgentId" : "2954", + "interval" : 120, + "testId" : "281474976710706", + "sharedWithAccounts" : [ { + "name" : "Account name", + "aid" : "1234" + }, { + "name" : "Account name", + "aid" : "1234" + } ], + "monitors" : [ { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + }, { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.AgentToAgentTest.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_delete_agent_to_agent_test_models_validation(self) -> None: + """Test case for delete_agent_to_agent_test request and response models""" + + + def test_get_agent_to_agent_test_models_validation(self) -> None: + """Test case for get_agent_to_agent_test request and response models""" + + response_body_json = """ + { + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "description" : "ThousandEyes Test", + "type" : "agent-to-agent", + "mss" : 100, + "usePublicBgp" : true, + "enabled" : true, + "dscpId" : "0", + "protocol" : "tcp", + "fixedPacketRate" : 50, + "dscp" : "Best Effort (DSCP 0)", + "pathTraceMode" : "classic", + "throughputRate" : 10, + "modifiedBy" : "user@user.com", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test", + "direction" : "to-target", + "throughputMeasurements" : false, + "numPathTraces" : 3, + "bgpMeasurements" : true, + "liveShare" : false, + "savedEvent" : true, + "throughputDuration" : 10000, + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "agents" : [ { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + }, { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "port" : 49153, + "modifiedDate" : "2022-07-17T22:00:54Z", + "targetAgentId" : "2954", + "interval" : 120, + "testId" : "281474976710706", + "sharedWithAccounts" : [ { + "name" : "Account name", + "aid" : "1234" + }, { + "name" : "Account name", + "aid" : "1234" + } ], + "monitors" : [ { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + }, { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.AgentToAgentTest.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_agent_to_agent_tests_models_validation(self) -> None: + """Test case for get_agent_to_agent_tests request and response models""" + + response_body_json = """ + { + "tests" : [ { + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "description" : "ThousandEyes Test", + "type" : "agent-to-agent", + "mss" : 100, + "usePublicBgp" : true, + "enabled" : true, + "dscpId" : "0", + "protocol" : "tcp", + "fixedPacketRate" : 50, + "dscp" : "Best Effort (DSCP 0)", + "pathTraceMode" : "classic", + "throughputRate" : 10, + "modifiedBy" : "user@user.com", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test", + "direction" : "to-target", + "throughputMeasurements" : false, + "numPathTraces" : 3, + "bgpMeasurements" : true, + "liveShare" : false, + "savedEvent" : true, + "throughputDuration" : 10000, + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "port" : 49153, + "modifiedDate" : "2022-07-17T22:00:54Z", + "targetAgentId" : "2954", + "interval" : 120, + "testId" : "281474976710706" + }, { + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "description" : "ThousandEyes Test", + "type" : "agent-to-agent", + "mss" : 100, + "usePublicBgp" : true, + "enabled" : true, + "dscpId" : "0", + "protocol" : "tcp", + "fixedPacketRate" : 50, + "dscp" : "Best Effort (DSCP 0)", + "pathTraceMode" : "classic", + "throughputRate" : 10, + "modifiedBy" : "user@user.com", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test", + "direction" : "to-target", + "throughputMeasurements" : false, + "numPathTraces" : 3, + "bgpMeasurements" : true, + "liveShare" : false, + "savedEvent" : true, + "throughputDuration" : 10000, + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "port" : 49153, + "modifiedDate" : "2022-07-17T22:00:54Z", + "targetAgentId" : "2954", + "interval" : 120, + "testId" : "281474976710706" + } ], + "_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" + } + } + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.AgentToAgentTests.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_update_agent_to_agent_test_models_validation(self) -> None: + """Test case for update_agent_to_agent_test request and response models""" + request_body_json = """ + { + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "alertRules" : [ "344753", "212697" ], + "description" : "ThousandEyes Test", + "type" : "agent-to-agent", + "mss" : 100, + "usePublicBgp" : true, + "enabled" : true, + "dscpId" : "0", + "protocol" : "tcp", + "fixedPacketRate" : 50, + "dscp" : "Best Effort (DSCP 0)", + "pathTraceMode" : "classic", + "throughputRate" : 10, + "modifiedBy" : "user@user.com", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test", + "direction" : "to-target", + "throughputMeasurements" : false, + "numPathTraces" : 3, + "bgpMeasurements" : true, + "liveShare" : false, + "savedEvent" : true, + "throughputDuration" : 10000, + "labels" : [ "9842", "1283" ], + "agents" : [ { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + }, { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "port" : 49153, + "modifiedDate" : "2022-07-17T22:00:54Z", + "targetAgentId" : "2954", + "interval" : 120, + "testId" : "281474976710706", + "sharedWithAccounts" : [ "1234", "12345" ], + "monitors" : [ "17410", "5" ] + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.tests.models.UpdateAgentToAgentTest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "description" : "ThousandEyes Test", + "type" : "agent-to-agent", + "mss" : 100, + "usePublicBgp" : true, + "enabled" : true, + "dscpId" : "0", + "protocol" : "tcp", + "fixedPacketRate" : 50, + "dscp" : "Best Effort (DSCP 0)", + "pathTraceMode" : "classic", + "throughputRate" : 10, + "modifiedBy" : "user@user.com", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test", + "direction" : "to-target", + "throughputMeasurements" : false, + "numPathTraces" : 3, + "bgpMeasurements" : true, + "liveShare" : false, + "savedEvent" : true, + "throughputDuration" : 10000, + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "agents" : [ { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + }, { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "port" : 49153, + "modifiedDate" : "2022-07-17T22:00:54Z", + "targetAgentId" : "2954", + "interval" : 120, + "testId" : "281474976710706", + "sharedWithAccounts" : [ { + "name" : "Account name", + "aid" : "1234" + }, { + "name" : "Account name", + "aid" : "1234" + } ], + "monitors" : [ { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + }, { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.AgentToAgentTest.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-tests/test/test_agent_to_server_api.py b/thousandeyes-sdk-tests/test/test_agent_to_server_api.py new file mode 100644 index 00000000..e8a53c82 --- /dev/null +++ b/thousandeyes-sdk-tests/test/test_agent_to_server_api.py @@ -0,0 +1,711 @@ +# coding: utf-8 + +""" + Tests API + + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.tests.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.tests.api.agent_to_server_api import AgentToServerApi + + +class TestAgentToServerApi(unittest.TestCase): + """AgentToServerApi unit test stubs""" + + def setUp(self) -> None: + self.api = AgentToServerApi() + + def tearDown(self) -> None: + pass + + def test_create_agent_to_server_test_models_validation(self) -> None: + """Test case for create_agent_to_server_test request and response models""" + request_body_json = """ + { + "server" : "www.thousandeyes.com", + "mtuMeasurements" : false, + "ipv6Policy" : "use-agent-policy", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "alertRules" : [ "344753", "212697" ], + "bandwidthMeasurements" : true, + "description" : "ThousandEyes Test", + "probeMode" : "auto", + "type" : "agent-to-server", + "usePublicBgp" : true, + "enabled" : true, + "dscpId" : "0", + "fixedPacketRate" : 25, + "protocol" : "tcp", + "dscp" : "Best Effort (DSCP 0)", + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test", + "numPathTraces" : 3, + "bgpMeasurements" : true, + "liveShare" : false, + "savedEvent" : true, + "networkMeasurements" : false, + "labels" : [ "9842", "1283" ], + "agents" : [ { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + }, { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "port" : 49153, + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "sharedWithAccounts" : [ "1234", "12345" ], + "pingPayloadSize" : 112, + "continuousMode" : false, + "monitors" : [ "17410", "5" ] + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.tests.models.UpdateAgentToServerTest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "server" : "www.thousandeyes.com", + "mtuMeasurements" : false, + "ipv6Policy" : "use-agent-policy", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "bandwidthMeasurements" : true, + "description" : "ThousandEyes Test", + "probeMode" : "auto", + "type" : "agent-to-server", + "usePublicBgp" : true, + "enabled" : true, + "dscpId" : "0", + "fixedPacketRate" : 25, + "protocol" : "tcp", + "dscp" : "Best Effort (DSCP 0)", + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test", + "numPathTraces" : 3, + "bgpMeasurements" : true, + "liveShare" : false, + "savedEvent" : true, + "networkMeasurements" : false, + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "agents" : [ { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + }, { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "port" : 49153, + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "sharedWithAccounts" : [ { + "name" : "Account name", + "aid" : "1234" + }, { + "name" : "Account name", + "aid" : "1234" + } ], + "pingPayloadSize" : 112, + "continuousMode" : false, + "monitors" : [ { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + }, { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.AgentToServerTest.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_delete_agent_to_server_test_models_validation(self) -> None: + """Test case for delete_agent_to_server_test request and response models""" + + + def test_get_agent_to_server_test_models_validation(self) -> None: + """Test case for get_agent_to_server_test request and response models""" + + response_body_json = """ + { + "server" : "www.thousandeyes.com", + "mtuMeasurements" : false, + "ipv6Policy" : "use-agent-policy", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "bandwidthMeasurements" : true, + "description" : "ThousandEyes Test", + "probeMode" : "auto", + "type" : "agent-to-server", + "usePublicBgp" : true, + "enabled" : true, + "dscpId" : "0", + "fixedPacketRate" : 25, + "protocol" : "tcp", + "dscp" : "Best Effort (DSCP 0)", + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test", + "numPathTraces" : 3, + "bgpMeasurements" : true, + "liveShare" : false, + "savedEvent" : true, + "networkMeasurements" : false, + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "agents" : [ { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + }, { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "port" : 49153, + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "sharedWithAccounts" : [ { + "name" : "Account name", + "aid" : "1234" + }, { + "name" : "Account name", + "aid" : "1234" + } ], + "pingPayloadSize" : 112, + "continuousMode" : false, + "monitors" : [ { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + }, { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.AgentToServerTest.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_agent_to_server_tests_models_validation(self) -> None: + """Test case for get_agent_to_server_tests request and response models""" + + response_body_json = """ + { + "tests" : [ { + "server" : "www.thousandeyes.com", + "mtuMeasurements" : false, + "ipv6Policy" : "use-agent-policy", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "bandwidthMeasurements" : true, + "description" : "ThousandEyes Test", + "probeMode" : "auto", + "type" : "agent-to-server", + "usePublicBgp" : true, + "enabled" : true, + "dscpId" : "0", + "fixedPacketRate" : 25, + "protocol" : "tcp", + "dscp" : "Best Effort (DSCP 0)", + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test", + "numPathTraces" : 3, + "bgpMeasurements" : true, + "liveShare" : false, + "savedEvent" : true, + "networkMeasurements" : false, + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "port" : 49153, + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "pingPayloadSize" : 112, + "continuousMode" : false + }, { + "server" : "www.thousandeyes.com", + "mtuMeasurements" : false, + "ipv6Policy" : "use-agent-policy", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "bandwidthMeasurements" : true, + "description" : "ThousandEyes Test", + "probeMode" : "auto", + "type" : "agent-to-server", + "usePublicBgp" : true, + "enabled" : true, + "dscpId" : "0", + "fixedPacketRate" : 25, + "protocol" : "tcp", + "dscp" : "Best Effort (DSCP 0)", + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test", + "numPathTraces" : 3, + "bgpMeasurements" : true, + "liveShare" : false, + "savedEvent" : true, + "networkMeasurements" : false, + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "port" : 49153, + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "pingPayloadSize" : 112, + "continuousMode" : false + } ], + "_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" + } + } + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.AgentToServerTests.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_update_agent_to_server_test_models_validation(self) -> None: + """Test case for update_agent_to_server_test request and response models""" + request_body_json = """ + { + "server" : "www.thousandeyes.com", + "mtuMeasurements" : false, + "ipv6Policy" : "use-agent-policy", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "alertRules" : [ "344753", "212697" ], + "bandwidthMeasurements" : true, + "description" : "ThousandEyes Test", + "probeMode" : "auto", + "type" : "agent-to-server", + "usePublicBgp" : true, + "enabled" : true, + "dscpId" : "0", + "fixedPacketRate" : 25, + "protocol" : "tcp", + "dscp" : "Best Effort (DSCP 0)", + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test", + "numPathTraces" : 3, + "bgpMeasurements" : true, + "liveShare" : false, + "savedEvent" : true, + "networkMeasurements" : false, + "labels" : [ "9842", "1283" ], + "agents" : [ { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + }, { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "port" : 49153, + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "sharedWithAccounts" : [ "1234", "12345" ], + "pingPayloadSize" : 112, + "continuousMode" : false, + "monitors" : [ "17410", "5" ] + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.tests.models.UpdateAgentToServerTest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "server" : "www.thousandeyes.com", + "mtuMeasurements" : false, + "ipv6Policy" : "use-agent-policy", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "bandwidthMeasurements" : true, + "description" : "ThousandEyes Test", + "probeMode" : "auto", + "type" : "agent-to-server", + "usePublicBgp" : true, + "enabled" : true, + "dscpId" : "0", + "fixedPacketRate" : 25, + "protocol" : "tcp", + "dscp" : "Best Effort (DSCP 0)", + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test", + "numPathTraces" : 3, + "bgpMeasurements" : true, + "liveShare" : false, + "savedEvent" : true, + "networkMeasurements" : false, + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "agents" : [ { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + }, { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "port" : 49153, + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "sharedWithAccounts" : [ { + "name" : "Account name", + "aid" : "1234" + }, { + "name" : "Account name", + "aid" : "1234" + } ], + "pingPayloadSize" : 112, + "continuousMode" : false, + "monitors" : [ { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + }, { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.AgentToServerTest.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-tests/test/test_all_test_types_api.py b/thousandeyes-sdk-tests/test/test_all_test_types_api.py new file mode 100644 index 00000000..4f2d27f5 --- /dev/null +++ b/thousandeyes-sdk-tests/test/test_all_test_types_api.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Tests API + + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.tests.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.tests.api.all_test_types_api import AllTestTypesApi + + +class TestAllTestTypesApi(unittest.TestCase): + """AllTestTypesApi unit test stubs""" + + def setUp(self) -> None: + self.api = AllTestTypesApi() + + def tearDown(self) -> None: + pass + + def test_get_tests_models_validation(self) -> None: + """Test case for get_tests request and response models""" + + response_body_json = """ + { + "tests" : [ { + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "savedEvent" : true, + "description" : "ThousandEyes Test", + "type" : "agent-to-server", + "enabled" : true, + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test" + }, { + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "savedEvent" : true, + "description" : "ThousandEyes Test", + "type" : "agent-to-server", + "enabled" : true, + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test" + } ], + "_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" + } + } + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.Tests.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-tests/test/test_api_api.py b/thousandeyes-sdk-tests/test/test_api_api.py new file mode 100644 index 00000000..037c08e3 --- /dev/null +++ b/thousandeyes-sdk-tests/test/test_api_api.py @@ -0,0 +1,1248 @@ +# coding: utf-8 + +""" + Tests API + + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.tests.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.tests.api.api_api import APIApi + + +class TestAPIApi(unittest.TestCase): + """APIApi unit test stubs""" + + def setUp(self) -> None: + self.api = APIApi() + + def tearDown(self) -> None: + pass + + def test_create_api_test_models_validation(self) -> None: + """Test case for create_api_test request and response models""" + request_body_json = """ + { + "mtuMeasurements" : false, + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "credentials" : [ "3247", "1051" ], + "alertRules" : [ "344753", "212697" ], + "description" : "ThousandEyes Test", + "probeMode" : "auto", + "requests" : [ { + "headers" : [ { + "value" : "keep-alive", + "key" : "x-custom-header" + }, { + "value" : "keep-alive", + "key" : "x-custom-header" + } ], + "variables" : [ { + "name" : "myTestName", + "value" : "tests[0].name" + }, { + "name" : "myTestName", + "value" : "tests[0].name" + } ], + "method" : "get", + "body" : "body", + "url" : "https://api.thousandeyes.com/v7/status", + "password" : "basic_pw123", + "bearerToken" : "abcd-1234-...", + "name" : "Step 1", + "waitTimeMs" : 0, + "assertions" : [ { + "name" : "status-code", + "value" : "200", + "operator" : "is" + }, { + "name" : "status-code", + "value" : "200", + "operator" : "is" + } ], + "authType" : "none", + "collectApiResponse" : true, + "username" : "ThousandEyesUserName" + }, { + "headers" : [ { + "value" : "keep-alive", + "key" : "x-custom-header" + }, { + "value" : "keep-alive", + "key" : "x-custom-header" + } ], + "variables" : [ { + "name" : "myTestName", + "value" : "tests[0].name" + }, { + "name" : "myTestName", + "value" : "tests[0].name" + } ], + "method" : "get", + "body" : "body", + "url" : "https://api.thousandeyes.com/v7/status", + "password" : "basic_pw123", + "bearerToken" : "abcd-1234-...", + "name" : "Step 1", + "waitTimeMs" : 0, + "assertions" : [ { + "name" : "status-code", + "value" : "200", + "operator" : "is" + }, { + "name" : "status-code", + "value" : "200", + "operator" : "is" + } ], + "authType" : "none", + "collectApiResponse" : true, + "username" : "ThousandEyesUserName" + } ], + "type" : "api", + "usePublicBgp" : true, + "enabled" : true, + "protocol" : "tcp", + "followRedirects" : true, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test", + "numPathTraces" : 3, + "bgpMeasurements" : true, + "predefinedVariables" : [ { + "name" : "myUsername", + "value" : "ThousandEyesAccountUserName" + }, { + "name" : "myUsername", + "value" : "ThousandEyesAccountUserName" + } ], + "liveShare" : false, + "savedEvent" : true, + "networkMeasurements" : true, + "url" : "www.thousandeyes.com", + "labels" : [ "9842", "1283" ], + "agents" : [ { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + }, { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + } ], + "timeLimit" : 19, + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "sharedWithAccounts" : [ "1234", "12345" ], + "sslVersionId" : "0", + "targetTime" : 1, + "monitors" : [ { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + }, { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + } ] + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.tests.models.UpdateApiTest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "mtuMeasurements" : false, + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "credentials" : [ "3247", "1051" ], + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "description" : "ThousandEyes Test", + "probeMode" : "auto", + "requests" : [ { + "headers" : [ { + "value" : "keep-alive", + "key" : "x-custom-header" + }, { + "value" : "keep-alive", + "key" : "x-custom-header" + } ], + "variables" : [ { + "name" : "myTestName", + "value" : "tests[0].name" + }, { + "name" : "myTestName", + "value" : "tests[0].name" + } ], + "method" : "get", + "body" : "body", + "url" : "https://api.thousandeyes.com/v7/status", + "password" : "basic_pw123", + "bearerToken" : "abcd-1234-...", + "name" : "Step 1", + "waitTimeMs" : 0, + "assertions" : [ { + "name" : "status-code", + "value" : "200", + "operator" : "is" + }, { + "name" : "status-code", + "value" : "200", + "operator" : "is" + } ], + "authType" : "none", + "collectApiResponse" : true, + "username" : "ThousandEyesUserName" + }, { + "headers" : [ { + "value" : "keep-alive", + "key" : "x-custom-header" + }, { + "value" : "keep-alive", + "key" : "x-custom-header" + } ], + "variables" : [ { + "name" : "myTestName", + "value" : "tests[0].name" + }, { + "name" : "myTestName", + "value" : "tests[0].name" + } ], + "method" : "get", + "body" : "body", + "url" : "https://api.thousandeyes.com/v7/status", + "password" : "basic_pw123", + "bearerToken" : "abcd-1234-...", + "name" : "Step 1", + "waitTimeMs" : 0, + "assertions" : [ { + "name" : "status-code", + "value" : "200", + "operator" : "is" + }, { + "name" : "status-code", + "value" : "200", + "operator" : "is" + } ], + "authType" : "none", + "collectApiResponse" : true, + "username" : "ThousandEyesUserName" + } ], + "type" : "api", + "usePublicBgp" : true, + "enabled" : true, + "protocol" : "tcp", + "followRedirects" : true, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test", + "numPathTraces" : 3, + "bgpMeasurements" : true, + "predefinedVariables" : [ { + "name" : "myUsername", + "value" : "ThousandEyesAccountUserName" + }, { + "name" : "myUsername", + "value" : "ThousandEyesAccountUserName" + } ], + "liveShare" : false, + "savedEvent" : true, + "networkMeasurements" : true, + "url" : "www.thousandeyes.com", + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "agents" : [ { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + }, { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + } ], + "timeLimit" : 19, + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "sharedWithAccounts" : [ { + "name" : "Account name", + "aid" : "1234" + }, { + "name" : "Account name", + "aid" : "1234" + } ], + "sslVersionId" : "0", + "targetTime" : 1, + "monitors" : [ { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + }, { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.ApiTest.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_delete_api_test_models_validation(self) -> None: + """Test case for delete_api_test request and response models""" + + + def test_get_api_test_models_validation(self) -> None: + """Test case for get_api_test request and response models""" + + response_body_json = """ + { + "mtuMeasurements" : false, + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "credentials" : [ "3247", "1051" ], + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "description" : "ThousandEyes Test", + "probeMode" : "auto", + "requests" : [ { + "headers" : [ { + "value" : "keep-alive", + "key" : "x-custom-header" + }, { + "value" : "keep-alive", + "key" : "x-custom-header" + } ], + "variables" : [ { + "name" : "myTestName", + "value" : "tests[0].name" + }, { + "name" : "myTestName", + "value" : "tests[0].name" + } ], + "method" : "get", + "body" : "body", + "url" : "https://api.thousandeyes.com/v7/status", + "password" : "basic_pw123", + "bearerToken" : "abcd-1234-...", + "name" : "Step 1", + "waitTimeMs" : 0, + "assertions" : [ { + "name" : "status-code", + "value" : "200", + "operator" : "is" + }, { + "name" : "status-code", + "value" : "200", + "operator" : "is" + } ], + "authType" : "none", + "collectApiResponse" : true, + "username" : "ThousandEyesUserName" + }, { + "headers" : [ { + "value" : "keep-alive", + "key" : "x-custom-header" + }, { + "value" : "keep-alive", + "key" : "x-custom-header" + } ], + "variables" : [ { + "name" : "myTestName", + "value" : "tests[0].name" + }, { + "name" : "myTestName", + "value" : "tests[0].name" + } ], + "method" : "get", + "body" : "body", + "url" : "https://api.thousandeyes.com/v7/status", + "password" : "basic_pw123", + "bearerToken" : "abcd-1234-...", + "name" : "Step 1", + "waitTimeMs" : 0, + "assertions" : [ { + "name" : "status-code", + "value" : "200", + "operator" : "is" + }, { + "name" : "status-code", + "value" : "200", + "operator" : "is" + } ], + "authType" : "none", + "collectApiResponse" : true, + "username" : "ThousandEyesUserName" + } ], + "type" : "api", + "usePublicBgp" : true, + "enabled" : true, + "protocol" : "tcp", + "followRedirects" : true, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test", + "numPathTraces" : 3, + "bgpMeasurements" : true, + "predefinedVariables" : [ { + "name" : "myUsername", + "value" : "ThousandEyesAccountUserName" + }, { + "name" : "myUsername", + "value" : "ThousandEyesAccountUserName" + } ], + "liveShare" : false, + "savedEvent" : true, + "networkMeasurements" : true, + "url" : "www.thousandeyes.com", + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "agents" : [ { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + }, { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + } ], + "timeLimit" : 19, + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "sharedWithAccounts" : [ { + "name" : "Account name", + "aid" : "1234" + }, { + "name" : "Account name", + "aid" : "1234" + } ], + "sslVersionId" : "0", + "targetTime" : 1, + "monitors" : [ { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + }, { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.ApiTest.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_api_tests_models_validation(self) -> None: + """Test case for get_api_tests request and response models""" + + response_body_json = """ + { + "tests" : [ { + "mtuMeasurements" : false, + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "description" : "ThousandEyes Test", + "probeMode" : "auto", + "requests" : [ { + "headers" : [ { + "value" : "keep-alive", + "key" : "x-custom-header" + }, { + "value" : "keep-alive", + "key" : "x-custom-header" + } ], + "variables" : [ { + "name" : "myTestName", + "value" : "tests[0].name" + }, { + "name" : "myTestName", + "value" : "tests[0].name" + } ], + "method" : "get", + "body" : "body", + "url" : "https://api.thousandeyes.com/v7/status", + "password" : "basic_pw123", + "bearerToken" : "abcd-1234-...", + "name" : "Step 1", + "waitTimeMs" : 0, + "assertions" : [ { + "name" : "status-code", + "value" : "200", + "operator" : "is" + }, { + "name" : "status-code", + "value" : "200", + "operator" : "is" + } ], + "authType" : "none", + "collectApiResponse" : true, + "username" : "ThousandEyesUserName" + }, { + "headers" : [ { + "value" : "keep-alive", + "key" : "x-custom-header" + }, { + "value" : "keep-alive", + "key" : "x-custom-header" + } ], + "variables" : [ { + "name" : "myTestName", + "value" : "tests[0].name" + }, { + "name" : "myTestName", + "value" : "tests[0].name" + } ], + "method" : "get", + "body" : "body", + "url" : "https://api.thousandeyes.com/v7/status", + "password" : "basic_pw123", + "bearerToken" : "abcd-1234-...", + "name" : "Step 1", + "waitTimeMs" : 0, + "assertions" : [ { + "name" : "status-code", + "value" : "200", + "operator" : "is" + }, { + "name" : "status-code", + "value" : "200", + "operator" : "is" + } ], + "authType" : "none", + "collectApiResponse" : true, + "username" : "ThousandEyesUserName" + } ], + "type" : "api", + "usePublicBgp" : true, + "enabled" : true, + "protocol" : "tcp", + "followRedirects" : true, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test", + "numPathTraces" : 3, + "bgpMeasurements" : true, + "predefinedVariables" : [ { + "name" : "myUsername", + "value" : "ThousandEyesAccountUserName" + }, { + "name" : "myUsername", + "value" : "ThousandEyesAccountUserName" + } ], + "liveShare" : false, + "savedEvent" : true, + "networkMeasurements" : true, + "url" : "www.thousandeyes.com", + "timeLimit" : 19, + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "sslVersionId" : "0", + "targetTime" : 1 + }, { + "mtuMeasurements" : false, + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "description" : "ThousandEyes Test", + "probeMode" : "auto", + "requests" : [ { + "headers" : [ { + "value" : "keep-alive", + "key" : "x-custom-header" + }, { + "value" : "keep-alive", + "key" : "x-custom-header" + } ], + "variables" : [ { + "name" : "myTestName", + "value" : "tests[0].name" + }, { + "name" : "myTestName", + "value" : "tests[0].name" + } ], + "method" : "get", + "body" : "body", + "url" : "https://api.thousandeyes.com/v7/status", + "password" : "basic_pw123", + "bearerToken" : "abcd-1234-...", + "name" : "Step 1", + "waitTimeMs" : 0, + "assertions" : [ { + "name" : "status-code", + "value" : "200", + "operator" : "is" + }, { + "name" : "status-code", + "value" : "200", + "operator" : "is" + } ], + "authType" : "none", + "collectApiResponse" : true, + "username" : "ThousandEyesUserName" + }, { + "headers" : [ { + "value" : "keep-alive", + "key" : "x-custom-header" + }, { + "value" : "keep-alive", + "key" : "x-custom-header" + } ], + "variables" : [ { + "name" : "myTestName", + "value" : "tests[0].name" + }, { + "name" : "myTestName", + "value" : "tests[0].name" + } ], + "method" : "get", + "body" : "body", + "url" : "https://api.thousandeyes.com/v7/status", + "password" : "basic_pw123", + "bearerToken" : "abcd-1234-...", + "name" : "Step 1", + "waitTimeMs" : 0, + "assertions" : [ { + "name" : "status-code", + "value" : "200", + "operator" : "is" + }, { + "name" : "status-code", + "value" : "200", + "operator" : "is" + } ], + "authType" : "none", + "collectApiResponse" : true, + "username" : "ThousandEyesUserName" + } ], + "type" : "api", + "usePublicBgp" : true, + "enabled" : true, + "protocol" : "tcp", + "followRedirects" : true, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test", + "numPathTraces" : 3, + "bgpMeasurements" : true, + "predefinedVariables" : [ { + "name" : "myUsername", + "value" : "ThousandEyesAccountUserName" + }, { + "name" : "myUsername", + "value" : "ThousandEyesAccountUserName" + } ], + "liveShare" : false, + "savedEvent" : true, + "networkMeasurements" : true, + "url" : "www.thousandeyes.com", + "timeLimit" : 19, + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "sslVersionId" : "0", + "targetTime" : 1 + } ], + "_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" + } + } + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.ApiTests.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_update_api_test_models_validation(self) -> None: + """Test case for update_api_test request and response models""" + request_body_json = """ + { + "mtuMeasurements" : false, + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "credentials" : [ "3247", "1051" ], + "alertRules" : [ "344753", "212697" ], + "description" : "ThousandEyes Test", + "probeMode" : "auto", + "requests" : [ { + "headers" : [ { + "value" : "keep-alive", + "key" : "x-custom-header" + }, { + "value" : "keep-alive", + "key" : "x-custom-header" + } ], + "variables" : [ { + "name" : "myTestName", + "value" : "tests[0].name" + }, { + "name" : "myTestName", + "value" : "tests[0].name" + } ], + "method" : "get", + "body" : "body", + "url" : "https://api.thousandeyes.com/v7/status", + "password" : "basic_pw123", + "bearerToken" : "abcd-1234-...", + "name" : "Step 1", + "waitTimeMs" : 0, + "assertions" : [ { + "name" : "status-code", + "value" : "200", + "operator" : "is" + }, { + "name" : "status-code", + "value" : "200", + "operator" : "is" + } ], + "authType" : "none", + "collectApiResponse" : true, + "username" : "ThousandEyesUserName" + }, { + "headers" : [ { + "value" : "keep-alive", + "key" : "x-custom-header" + }, { + "value" : "keep-alive", + "key" : "x-custom-header" + } ], + "variables" : [ { + "name" : "myTestName", + "value" : "tests[0].name" + }, { + "name" : "myTestName", + "value" : "tests[0].name" + } ], + "method" : "get", + "body" : "body", + "url" : "https://api.thousandeyes.com/v7/status", + "password" : "basic_pw123", + "bearerToken" : "abcd-1234-...", + "name" : "Step 1", + "waitTimeMs" : 0, + "assertions" : [ { + "name" : "status-code", + "value" : "200", + "operator" : "is" + }, { + "name" : "status-code", + "value" : "200", + "operator" : "is" + } ], + "authType" : "none", + "collectApiResponse" : true, + "username" : "ThousandEyesUserName" + } ], + "type" : "api", + "usePublicBgp" : true, + "enabled" : true, + "protocol" : "tcp", + "followRedirects" : true, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test", + "numPathTraces" : 3, + "bgpMeasurements" : true, + "predefinedVariables" : [ { + "name" : "myUsername", + "value" : "ThousandEyesAccountUserName" + }, { + "name" : "myUsername", + "value" : "ThousandEyesAccountUserName" + } ], + "liveShare" : false, + "savedEvent" : true, + "networkMeasurements" : true, + "url" : "www.thousandeyes.com", + "labels" : [ "9842", "1283" ], + "agents" : [ { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + }, { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + } ], + "timeLimit" : 19, + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "sharedWithAccounts" : [ "1234", "12345" ], + "sslVersionId" : "0", + "targetTime" : 1, + "monitors" : [ { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + }, { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + } ] + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.tests.models.UpdateApiTest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "mtuMeasurements" : false, + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "credentials" : [ "3247", "1051" ], + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "description" : "ThousandEyes Test", + "probeMode" : "auto", + "requests" : [ { + "headers" : [ { + "value" : "keep-alive", + "key" : "x-custom-header" + }, { + "value" : "keep-alive", + "key" : "x-custom-header" + } ], + "variables" : [ { + "name" : "myTestName", + "value" : "tests[0].name" + }, { + "name" : "myTestName", + "value" : "tests[0].name" + } ], + "method" : "get", + "body" : "body", + "url" : "https://api.thousandeyes.com/v7/status", + "password" : "basic_pw123", + "bearerToken" : "abcd-1234-...", + "name" : "Step 1", + "waitTimeMs" : 0, + "assertions" : [ { + "name" : "status-code", + "value" : "200", + "operator" : "is" + }, { + "name" : "status-code", + "value" : "200", + "operator" : "is" + } ], + "authType" : "none", + "collectApiResponse" : true, + "username" : "ThousandEyesUserName" + }, { + "headers" : [ { + "value" : "keep-alive", + "key" : "x-custom-header" + }, { + "value" : "keep-alive", + "key" : "x-custom-header" + } ], + "variables" : [ { + "name" : "myTestName", + "value" : "tests[0].name" + }, { + "name" : "myTestName", + "value" : "tests[0].name" + } ], + "method" : "get", + "body" : "body", + "url" : "https://api.thousandeyes.com/v7/status", + "password" : "basic_pw123", + "bearerToken" : "abcd-1234-...", + "name" : "Step 1", + "waitTimeMs" : 0, + "assertions" : [ { + "name" : "status-code", + "value" : "200", + "operator" : "is" + }, { + "name" : "status-code", + "value" : "200", + "operator" : "is" + } ], + "authType" : "none", + "collectApiResponse" : true, + "username" : "ThousandEyesUserName" + } ], + "type" : "api", + "usePublicBgp" : true, + "enabled" : true, + "protocol" : "tcp", + "followRedirects" : true, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test", + "numPathTraces" : 3, + "bgpMeasurements" : true, + "predefinedVariables" : [ { + "name" : "myUsername", + "value" : "ThousandEyesAccountUserName" + }, { + "name" : "myUsername", + "value" : "ThousandEyesAccountUserName" + } ], + "liveShare" : false, + "savedEvent" : true, + "networkMeasurements" : true, + "url" : "www.thousandeyes.com", + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "agents" : [ { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + }, { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + } ], + "timeLimit" : 19, + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "sharedWithAccounts" : [ { + "name" : "Account name", + "aid" : "1234" + }, { + "name" : "Account name", + "aid" : "1234" + } ], + "sslVersionId" : "0", + "targetTime" : 1, + "monitors" : [ { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + }, { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.ApiTest.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-tests/test/test_bgp_api.py b/thousandeyes-sdk-tests/test/test_bgp_api.py new file mode 100644 index 00000000..264ccd20 --- /dev/null +++ b/thousandeyes-sdk-tests/test/test_bgp_api.py @@ -0,0 +1,516 @@ +# coding: utf-8 + +""" + Tests API + + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.tests.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.tests.api.bgp_api import BGPApi + + +class TestBGPApi(unittest.TestCase): + """BGPApi unit test stubs""" + + def setUp(self) -> None: + self.api = BGPApi() + + def tearDown(self) -> None: + pass + + def test_create_bgp_test_models_validation(self) -> None: + """Test case for create_bgp_test request and response models""" + request_body_json = """ + { + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "prefix" : "prefix", + "savedEvent" : true, + "includeCoveredPrefixes" : true, + "alertRules" : [ "344753", "212697" ], + "description" : "ThousandEyes Test", + "type" : "bgp", + "usePublicBgp" : true, + "enabled" : true, + "labels" : [ "9842", "1283" ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "sharedWithAccounts" : [ "1234", "12345" ], + "alertsEnabled" : true, + "testName" : "ThousandEyes Test", + "monitors" : [ "17410", "5" ] + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.tests.models.UpdateBgpTest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "prefix" : "prefix", + "savedEvent" : true, + "includeCoveredPrefixes" : true, + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "description" : "ThousandEyes Test", + "type" : "bgp", + "usePublicBgp" : true, + "enabled" : true, + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "sharedWithAccounts" : [ { + "name" : "Account name", + "aid" : "1234" + }, { + "name" : "Account name", + "aid" : "1234" + } ], + "alertsEnabled" : true, + "testName" : "ThousandEyes Test", + "monitors" : [ { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + }, { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.BgpTest.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_delete_bgp_test_models_validation(self) -> None: + """Test case for delete_bgp_test request and response models""" + + + def test_get_bgp_test_models_validation(self) -> None: + """Test case for get_bgp_test request and response models""" + + response_body_json = """ + { + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "prefix" : "prefix", + "savedEvent" : true, + "includeCoveredPrefixes" : true, + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "description" : "ThousandEyes Test", + "type" : "bgp", + "usePublicBgp" : true, + "enabled" : true, + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "sharedWithAccounts" : [ { + "name" : "Account name", + "aid" : "1234" + }, { + "name" : "Account name", + "aid" : "1234" + } ], + "alertsEnabled" : true, + "testName" : "ThousandEyes Test", + "monitors" : [ { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + }, { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.BgpTest.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_bgp_tests_models_validation(self) -> None: + """Test case for get_bgp_tests request and response models""" + + response_body_json = """ + { + "tests" : [ { + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "prefix" : "prefix", + "savedEvent" : true, + "includeCoveredPrefixes" : true, + "description" : "ThousandEyes Test", + "type" : "bgp", + "usePublicBgp" : true, + "enabled" : true, + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test" + }, { + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "prefix" : "prefix", + "savedEvent" : true, + "includeCoveredPrefixes" : true, + "description" : "ThousandEyes Test", + "type" : "bgp", + "usePublicBgp" : true, + "enabled" : true, + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test" + } ], + "_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" + } + } + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.BgpTests.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_update_bgp_test_models_validation(self) -> None: + """Test case for update_bgp_test request and response models""" + request_body_json = """ + { + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "savedEvent" : true, + "includeCoveredPrefixes" : true, + "alertRules" : [ "344753", "212697" ], + "description" : "ThousandEyes Test", + "type" : "bgp", + "usePublicBgp" : true, + "enabled" : true, + "labels" : [ "9842", "1283" ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "sharedWithAccounts" : [ "1234", "12345" ], + "alertsEnabled" : true, + "testName" : "ThousandEyes Test", + "monitors" : [ "17410", "5" ] + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.tests.models.UpdateBgpTestRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "prefix" : "prefix", + "savedEvent" : true, + "includeCoveredPrefixes" : true, + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "description" : "ThousandEyes Test", + "type" : "bgp", + "usePublicBgp" : true, + "enabled" : true, + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "sharedWithAccounts" : [ { + "name" : "Account name", + "aid" : "1234" + }, { + "name" : "Account name", + "aid" : "1234" + } ], + "alertsEnabled" : true, + "testName" : "ThousandEyes Test", + "monitors" : [ { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + }, { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.BgpTest.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-tests/test/test_dns_server_api.py b/thousandeyes-sdk-tests/test/test_dns_server_api.py new file mode 100644 index 00000000..48b75738 --- /dev/null +++ b/thousandeyes-sdk-tests/test/test_dns_server_api.py @@ -0,0 +1,734 @@ +# coding: utf-8 + +""" + Tests API + + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.tests.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.tests.api.dns_server_api import DNSServerApi + + +class TestDNSServerApi(unittest.TestCase): + """DNSServerApi unit test stubs""" + + def setUp(self) -> None: + self.api = DNSServerApi() + + def tearDown(self) -> None: + pass + + def test_create_dns_server_test_models_validation(self) -> None: + """Test case for create_dns_server_test request and response models""" + request_body_json = """ + { + "mtuMeasurements" : false, + "ipv6Policy" : "use-agent-policy", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "alertRules" : [ "344753", "212697" ], + "bandwidthMeasurements" : true, + "description" : "ThousandEyes Test", + "dnsTransportProtocol" : "udp", + "probeMode" : "auto", + "type" : "dns-server", + "usePublicBgp" : true, + "enabled" : true, + "protocol" : "tcp", + "fixedPacketRate" : 50, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "dnsServers" : [ "dns-example.net", "8.8.8.8" ], + "alertsEnabled" : true, + "recursiveQueries" : true, + "testName" : "ThousandEyes Test", + "numPathTraces" : 3, + "bgpMeasurements" : true, + "dnsQueryClass" : "in", + "liveShare" : false, + "savedEvent" : true, + "networkMeasurements" : true, + "labels" : [ "9842", "1283" ], + "agents" : [ { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + }, { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "domain" : "www.thousandeyes.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "sharedWithAccounts" : [ "1234", "12345" ], + "monitors" : [ "17410", "5" ] + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.tests.models.UpdateDnsServerTest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "mtuMeasurements" : false, + "ipv6Policy" : "use-agent-policy", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "bandwidthMeasurements" : true, + "description" : "ThousandEyes Test", + "dnsTransportProtocol" : "udp", + "probeMode" : "auto", + "type" : "dns-server", + "usePublicBgp" : true, + "enabled" : true, + "protocol" : "tcp", + "fixedPacketRate" : 50, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "dnsServers" : [ { + "serverName" : "dns-example.net", + "serverId" : "1447" + }, { + "serverName" : "dns-example.net", + "serverId" : "1447" + } ], + "alertsEnabled" : true, + "recursiveQueries" : true, + "testName" : "ThousandEyes Test", + "numPathTraces" : 3, + "bgpMeasurements" : true, + "dnsQueryClass" : "in", + "liveShare" : false, + "savedEvent" : true, + "networkMeasurements" : true, + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "agents" : [ { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + }, { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "domain" : "www.thousandeyes.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "sharedWithAccounts" : [ { + "name" : "Account name", + "aid" : "1234" + }, { + "name" : "Account name", + "aid" : "1234" + } ], + "monitors" : [ { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + }, { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.DnsServerTest.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_delete_dns_server_test_models_validation(self) -> None: + """Test case for delete_dns_server_test request and response models""" + + + def test_get_dns_server_test_models_validation(self) -> None: + """Test case for get_dns_server_test request and response models""" + + response_body_json = """ + { + "mtuMeasurements" : false, + "ipv6Policy" : "use-agent-policy", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "bandwidthMeasurements" : true, + "description" : "ThousandEyes Test", + "dnsTransportProtocol" : "udp", + "probeMode" : "auto", + "type" : "dns-server", + "usePublicBgp" : true, + "enabled" : true, + "protocol" : "tcp", + "fixedPacketRate" : 50, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "dnsServers" : [ { + "serverName" : "dns-example.net", + "serverId" : "1447" + }, { + "serverName" : "dns-example.net", + "serverId" : "1447" + } ], + "alertsEnabled" : true, + "recursiveQueries" : true, + "testName" : "ThousandEyes Test", + "numPathTraces" : 3, + "bgpMeasurements" : true, + "dnsQueryClass" : "in", + "liveShare" : false, + "savedEvent" : true, + "networkMeasurements" : true, + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "agents" : [ { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + }, { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "domain" : "www.thousandeyes.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "sharedWithAccounts" : [ { + "name" : "Account name", + "aid" : "1234" + }, { + "name" : "Account name", + "aid" : "1234" + } ], + "monitors" : [ { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + }, { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.DnsServerTest.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_dns_server_tests_models_validation(self) -> None: + """Test case for get_dns_server_tests request and response models""" + + response_body_json = """ + { + "tests" : [ { + "mtuMeasurements" : false, + "ipv6Policy" : "use-agent-policy", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "bandwidthMeasurements" : true, + "description" : "ThousandEyes Test", + "dnsTransportProtocol" : "udp", + "probeMode" : "auto", + "type" : "dns-server", + "usePublicBgp" : true, + "enabled" : true, + "protocol" : "tcp", + "fixedPacketRate" : 50, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "dnsServers" : [ { + "serverName" : "dns-example.net", + "serverId" : "1447" + }, { + "serverName" : "dns-example.net", + "serverId" : "1447" + } ], + "alertsEnabled" : true, + "recursiveQueries" : true, + "testName" : "ThousandEyes Test", + "numPathTraces" : 3, + "bgpMeasurements" : true, + "dnsQueryClass" : "in", + "liveShare" : false, + "savedEvent" : true, + "networkMeasurements" : true, + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "domain" : "www.thousandeyes.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706" + }, { + "mtuMeasurements" : false, + "ipv6Policy" : "use-agent-policy", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "bandwidthMeasurements" : true, + "description" : "ThousandEyes Test", + "dnsTransportProtocol" : "udp", + "probeMode" : "auto", + "type" : "dns-server", + "usePublicBgp" : true, + "enabled" : true, + "protocol" : "tcp", + "fixedPacketRate" : 50, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "dnsServers" : [ { + "serverName" : "dns-example.net", + "serverId" : "1447" + }, { + "serverName" : "dns-example.net", + "serverId" : "1447" + } ], + "alertsEnabled" : true, + "recursiveQueries" : true, + "testName" : "ThousandEyes Test", + "numPathTraces" : 3, + "bgpMeasurements" : true, + "dnsQueryClass" : "in", + "liveShare" : false, + "savedEvent" : true, + "networkMeasurements" : true, + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "domain" : "www.thousandeyes.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706" + } ], + "_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" + } + } + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.DnsServerTests.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_update_dns_server_test_models_validation(self) -> None: + """Test case for update_dns_server_test request and response models""" + request_body_json = """ + { + "mtuMeasurements" : false, + "ipv6Policy" : "use-agent-policy", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "alertRules" : [ "344753", "212697" ], + "bandwidthMeasurements" : true, + "description" : "ThousandEyes Test", + "dnsTransportProtocol" : "udp", + "probeMode" : "auto", + "type" : "dns-server", + "usePublicBgp" : true, + "enabled" : true, + "protocol" : "tcp", + "fixedPacketRate" : 50, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "dnsServers" : [ "dns-example.net", "8.8.8.8" ], + "alertsEnabled" : true, + "recursiveQueries" : true, + "testName" : "ThousandEyes Test", + "numPathTraces" : 3, + "bgpMeasurements" : true, + "dnsQueryClass" : "in", + "liveShare" : false, + "savedEvent" : true, + "networkMeasurements" : true, + "labels" : [ "9842", "1283" ], + "agents" : [ { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + }, { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "domain" : "www.thousandeyes.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "sharedWithAccounts" : [ "1234", "12345" ], + "monitors" : [ "17410", "5" ] + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.tests.models.UpdateDnsServerTest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "mtuMeasurements" : false, + "ipv6Policy" : "use-agent-policy", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "bandwidthMeasurements" : true, + "description" : "ThousandEyes Test", + "dnsTransportProtocol" : "udp", + "probeMode" : "auto", + "type" : "dns-server", + "usePublicBgp" : true, + "enabled" : true, + "protocol" : "tcp", + "fixedPacketRate" : 50, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "dnsServers" : [ { + "serverName" : "dns-example.net", + "serverId" : "1447" + }, { + "serverName" : "dns-example.net", + "serverId" : "1447" + } ], + "alertsEnabled" : true, + "recursiveQueries" : true, + "testName" : "ThousandEyes Test", + "numPathTraces" : 3, + "bgpMeasurements" : true, + "dnsQueryClass" : "in", + "liveShare" : false, + "savedEvent" : true, + "networkMeasurements" : true, + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "agents" : [ { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + }, { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "domain" : "www.thousandeyes.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "sharedWithAccounts" : [ { + "name" : "Account name", + "aid" : "1234" + }, { + "name" : "Account name", + "aid" : "1234" + } ], + "monitors" : [ { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + }, { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.DnsServerTest.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-tests/test/test_dns_trace_api.py b/thousandeyes-sdk-tests/test/test_dns_trace_api.py new file mode 100644 index 00000000..a82fd4b8 --- /dev/null +++ b/thousandeyes-sdk-tests/test/test_dns_trace_api.py @@ -0,0 +1,566 @@ +# coding: utf-8 + +""" + Tests API + + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.tests.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.tests.api.dns_trace_api import DNSTraceApi + + +class TestDNSTraceApi(unittest.TestCase): + """DNSTraceApi unit test stubs""" + + def setUp(self) -> None: + self.api = DNSTraceApi() + + def tearDown(self) -> None: + pass + + def test_create_dns_trace_test_models_validation(self) -> None: + """Test case for create_dns_trace_test request and response models""" + request_body_json = """ + { + "dnsQueryClass" : "in", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "alertRules" : [ "344753", "212697" ], + "savedEvent" : true, + "description" : "ThousandEyes Test", + "dnsTransportProtocol" : "udp", + "type" : "dns-trace", + "enabled" : true, + "labels" : [ "9842", "1283" ], + "agents" : [ { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + }, { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "domain" : "www.thousandeyes.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "sharedWithAccounts" : [ "1234", "12345" ], + "alertsEnabled" : true, + "testName" : "ThousandEyes Test" + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.tests.models.UpdateDnsTraceTest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "dnsQueryClass" : "in", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "savedEvent" : true, + "description" : "ThousandEyes Test", + "dnsTransportProtocol" : "udp", + "type" : "dns-trace", + "enabled" : true, + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "agents" : [ { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + }, { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "domain" : "www.thousandeyes.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "sharedWithAccounts" : [ { + "name" : "Account name", + "aid" : "1234" + }, { + "name" : "Account name", + "aid" : "1234" + } ], + "alertsEnabled" : true, + "testName" : "ThousandEyes Test" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.DnsTraceTest.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_delete_dns_trace_test_models_validation(self) -> None: + """Test case for delete_dns_trace_test request and response models""" + + + def test_get_dns_trace_test_models_validation(self) -> None: + """Test case for get_dns_trace_test request and response models""" + + response_body_json = """ + { + "dnsQueryClass" : "in", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "savedEvent" : true, + "description" : "ThousandEyes Test", + "dnsTransportProtocol" : "udp", + "type" : "dns-trace", + "enabled" : true, + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "agents" : [ { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + }, { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "domain" : "www.thousandeyes.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "sharedWithAccounts" : [ { + "name" : "Account name", + "aid" : "1234" + }, { + "name" : "Account name", + "aid" : "1234" + } ], + "alertsEnabled" : true, + "testName" : "ThousandEyes Test" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.DnsTraceTest.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_dns_trace_tests_models_validation(self) -> None: + """Test case for get_dns_trace_tests request and response models""" + + response_body_json = """ + { + "tests" : [ { + "dnsQueryClass" : "in", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "savedEvent" : true, + "description" : "ThousandEyes Test", + "dnsTransportProtocol" : "udp", + "type" : "dns-trace", + "enabled" : true, + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "domain" : "www.thousandeyes.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test" + }, { + "dnsQueryClass" : "in", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "savedEvent" : true, + "description" : "ThousandEyes Test", + "dnsTransportProtocol" : "udp", + "type" : "dns-trace", + "enabled" : true, + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "domain" : "www.thousandeyes.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test" + } ], + "_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" + } + } + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.DnsTraceTests.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_update_dns_trace_test_models_validation(self) -> None: + """Test case for update_dns_trace_test request and response models""" + request_body_json = """ + { + "dnsQueryClass" : "in", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "alertRules" : [ "344753", "212697" ], + "savedEvent" : true, + "description" : "ThousandEyes Test", + "dnsTransportProtocol" : "udp", + "type" : "dns-trace", + "enabled" : true, + "labels" : [ "9842", "1283" ], + "agents" : [ { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + }, { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "domain" : "www.thousandeyes.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "sharedWithAccounts" : [ "1234", "12345" ], + "alertsEnabled" : true, + "testName" : "ThousandEyes Test" + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.tests.models.UpdateDnsTraceTest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "dnsQueryClass" : "in", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "savedEvent" : true, + "description" : "ThousandEyes Test", + "dnsTransportProtocol" : "udp", + "type" : "dns-trace", + "enabled" : true, + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "agents" : [ { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + }, { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "domain" : "www.thousandeyes.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "sharedWithAccounts" : [ { + "name" : "Account name", + "aid" : "1234" + }, { + "name" : "Account name", + "aid" : "1234" + } ], + "alertsEnabled" : true, + "testName" : "ThousandEyes Test" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.DnsTraceTest.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-tests/test/test_dnssec_api.py b/thousandeyes-sdk-tests/test/test_dnssec_api.py new file mode 100644 index 00000000..58bed4fc --- /dev/null +++ b/thousandeyes-sdk-tests/test/test_dnssec_api.py @@ -0,0 +1,559 @@ +# coding: utf-8 + +""" + Tests API + + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.tests.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.tests.api.dnssec_api import DNSSECApi + + +class TestDNSSECApi(unittest.TestCase): + """DNSSECApi unit test stubs""" + + def setUp(self) -> None: + self.api = DNSSECApi() + + def tearDown(self) -> None: + pass + + def test_create_dns_sec_test_models_validation(self) -> None: + """Test case for create_dns_sec_test request and response models""" + request_body_json = """ + { + "dnsQueryClass" : "in", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "alertRules" : [ "344753", "212697" ], + "savedEvent" : true, + "description" : "ThousandEyes Test", + "type" : "dnssec", + "enabled" : true, + "labels" : [ "9842", "1283" ], + "agents" : [ { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + }, { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "domain" : "www.thousandeyes.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "sharedWithAccounts" : [ "1234", "12345" ], + "alertsEnabled" : true, + "testName" : "ThousandEyes Test" + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.tests.models.UpdateDnsSecTest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "dnsQueryClass" : "in", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "savedEvent" : true, + "description" : "ThousandEyes Test", + "type" : "dnssec", + "enabled" : true, + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "agents" : [ { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + }, { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "domain" : "www.thousandeyes.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "sharedWithAccounts" : [ { + "name" : "Account name", + "aid" : "1234" + }, { + "name" : "Account name", + "aid" : "1234" + } ], + "alertsEnabled" : true, + "testName" : "ThousandEyes Test" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.DnsSecTest.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_delete_dns_sec_test_models_validation(self) -> None: + """Test case for delete_dns_sec_test request and response models""" + + + def test_get_dns_sec_test_models_validation(self) -> None: + """Test case for get_dns_sec_test request and response models""" + + response_body_json = """ + { + "dnsQueryClass" : "in", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "savedEvent" : true, + "description" : "ThousandEyes Test", + "type" : "dnssec", + "enabled" : true, + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "agents" : [ { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + }, { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "domain" : "www.thousandeyes.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "sharedWithAccounts" : [ { + "name" : "Account name", + "aid" : "1234" + }, { + "name" : "Account name", + "aid" : "1234" + } ], + "alertsEnabled" : true, + "testName" : "ThousandEyes Test" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.DnsSecTest.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_dns_sec_tests_models_validation(self) -> None: + """Test case for get_dns_sec_tests request and response models""" + + response_body_json = """ + { + "tests" : [ { + "dnsQueryClass" : "in", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "savedEvent" : true, + "description" : "ThousandEyes Test", + "type" : "dnssec", + "enabled" : true, + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "domain" : "www.thousandeyes.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test" + }, { + "dnsQueryClass" : "in", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "savedEvent" : true, + "description" : "ThousandEyes Test", + "type" : "dnssec", + "enabled" : true, + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "domain" : "www.thousandeyes.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test" + } ], + "_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" + } + } + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.DnsSecTests.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_update_dns_sec_test_models_validation(self) -> None: + """Test case for update_dns_sec_test request and response models""" + request_body_json = """ + { + "dnsQueryClass" : "in", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "alertRules" : [ "344753", "212697" ], + "savedEvent" : true, + "description" : "ThousandEyes Test", + "type" : "dnssec", + "enabled" : true, + "labels" : [ "9842", "1283" ], + "agents" : [ { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + }, { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "domain" : "www.thousandeyes.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "sharedWithAccounts" : [ "1234", "12345" ], + "alertsEnabled" : true, + "testName" : "ThousandEyes Test" + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.tests.models.UpdateDnsSecTest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "dnsQueryClass" : "in", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "liveShare" : false, + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "savedEvent" : true, + "description" : "ThousandEyes Test", + "type" : "dnssec", + "enabled" : true, + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "agents" : [ { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + }, { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "domain" : "www.thousandeyes.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "modifiedBy" : "user@user.com", + "testId" : "281474976710706", + "sharedWithAccounts" : [ { + "name" : "Account name", + "aid" : "1234" + }, { + "name" : "Account name", + "aid" : "1234" + } ], + "alertsEnabled" : true, + "testName" : "ThousandEyes Test" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.DnsSecTest.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-tests/test/test_ftp_server_api.py b/thousandeyes-sdk-tests/test/test_ftp_server_api.py new file mode 100644 index 00000000..7a44e524 --- /dev/null +++ b/thousandeyes-sdk-tests/test/test_ftp_server_api.py @@ -0,0 +1,732 @@ +# coding: utf-8 + +""" + Tests API + + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.tests.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.tests.api.ftp_server_api import FTPServerApi + + +class TestFTPServerApi(unittest.TestCase): + """FTPServerApi unit test stubs""" + + def setUp(self) -> None: + self.api = FTPServerApi() + + def tearDown(self) -> None: + pass + + def test_create_ftp_server_test_models_validation(self) -> None: + """Test case for create_ftp_server_test request and response models""" + request_body_json = """ + { + "mtuMeasurements" : false, + "ipv6Policy" : "use-agent-policy", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "downloadLimit" : 1048576, + "alertRules" : [ "344753", "212697" ], + "bandwidthMeasurements" : true, + "description" : "ThousandEyes Test", + "useExplicitFtps" : false, + "probeMode" : "auto", + "type" : "ftp-server", + "usePublicBgp" : true, + "enabled" : true, + "password" : "password", + "protocol" : "tcp", + "fixedPacketRate" : 50, + "ftpTargetTime" : 1400, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test", + "numPathTraces" : 3, + "bgpMeasurements" : true, + "requestType" : "download", + "liveShare" : false, + "savedEvent" : true, + "networkMeasurements" : true, + "url" : "www.thousandeyes.com", + "labels" : [ "9842", "1283" ], + "agents" : [ { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + }, { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "ftpTimeLimit" : 10, + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "sharedWithAccounts" : [ "1234", "12345" ], + "useActiveFtp" : false, + "username" : "username", + "monitors" : [ "17410", "5" ] + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.tests.models.UpdateFtpServerTest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "mtuMeasurements" : false, + "ipv6Policy" : "use-agent-policy", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "downloadLimit" : 1048576, + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "bandwidthMeasurements" : true, + "description" : "ThousandEyes Test", + "useExplicitFtps" : false, + "probeMode" : "auto", + "type" : "ftp-server", + "usePublicBgp" : true, + "enabled" : true, + "password" : "password", + "protocol" : "tcp", + "fixedPacketRate" : 50, + "ftpTargetTime" : 1400, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test", + "numPathTraces" : 3, + "bgpMeasurements" : true, + "requestType" : "download", + "liveShare" : false, + "savedEvent" : true, + "networkMeasurements" : true, + "url" : "www.thousandeyes.com", + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "agents" : [ { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + }, { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "ftpTimeLimit" : 10, + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "sharedWithAccounts" : [ { + "name" : "Account name", + "aid" : "1234" + }, { + "name" : "Account name", + "aid" : "1234" + } ], + "useActiveFtp" : false, + "username" : "username", + "monitors" : [ { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + }, { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.FtpServerTest.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_delete_ftp_server_test_models_validation(self) -> None: + """Test case for delete_ftp_server_test request and response models""" + + + def test_get_ftp_server_test_models_validation(self) -> None: + """Test case for get_ftp_server_test request and response models""" + + response_body_json = """ + { + "mtuMeasurements" : false, + "ipv6Policy" : "use-agent-policy", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "downloadLimit" : 1048576, + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "bandwidthMeasurements" : true, + "description" : "ThousandEyes Test", + "useExplicitFtps" : false, + "probeMode" : "auto", + "type" : "ftp-server", + "usePublicBgp" : true, + "enabled" : true, + "password" : "password", + "protocol" : "tcp", + "fixedPacketRate" : 50, + "ftpTargetTime" : 1400, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test", + "numPathTraces" : 3, + "bgpMeasurements" : true, + "requestType" : "download", + "liveShare" : false, + "savedEvent" : true, + "networkMeasurements" : true, + "url" : "www.thousandeyes.com", + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "agents" : [ { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + }, { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "ftpTimeLimit" : 10, + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "sharedWithAccounts" : [ { + "name" : "Account name", + "aid" : "1234" + }, { + "name" : "Account name", + "aid" : "1234" + } ], + "useActiveFtp" : false, + "username" : "username", + "monitors" : [ { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + }, { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.FtpServerTest.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_ftp_server_tests_models_validation(self) -> None: + """Test case for get_ftp_server_tests request and response models""" + + response_body_json = """ + { + "tests" : [ { + "mtuMeasurements" : false, + "ipv6Policy" : "use-agent-policy", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "downloadLimit" : 1048576, + "bandwidthMeasurements" : true, + "description" : "ThousandEyes Test", + "useExplicitFtps" : false, + "probeMode" : "auto", + "type" : "ftp-server", + "usePublicBgp" : true, + "enabled" : true, + "password" : "password", + "protocol" : "tcp", + "fixedPacketRate" : 50, + "ftpTargetTime" : 1400, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test", + "numPathTraces" : 3, + "bgpMeasurements" : true, + "requestType" : "download", + "liveShare" : false, + "savedEvent" : true, + "networkMeasurements" : true, + "url" : "www.thousandeyes.com", + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "ftpTimeLimit" : 10, + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "useActiveFtp" : false, + "username" : "username" + }, { + "mtuMeasurements" : false, + "ipv6Policy" : "use-agent-policy", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "downloadLimit" : 1048576, + "bandwidthMeasurements" : true, + "description" : "ThousandEyes Test", + "useExplicitFtps" : false, + "probeMode" : "auto", + "type" : "ftp-server", + "usePublicBgp" : true, + "enabled" : true, + "password" : "password", + "protocol" : "tcp", + "fixedPacketRate" : 50, + "ftpTargetTime" : 1400, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test", + "numPathTraces" : 3, + "bgpMeasurements" : true, + "requestType" : "download", + "liveShare" : false, + "savedEvent" : true, + "networkMeasurements" : true, + "url" : "www.thousandeyes.com", + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "ftpTimeLimit" : 10, + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "useActiveFtp" : false, + "username" : "username" + } ], + "_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" + } + } + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.FtpServerTests.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_update_ftp_server_test_models_validation(self) -> None: + """Test case for update_ftp_server_test request and response models""" + request_body_json = """ + { + "mtuMeasurements" : false, + "ipv6Policy" : "use-agent-policy", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "downloadLimit" : 1048576, + "alertRules" : [ "344753", "212697" ], + "bandwidthMeasurements" : true, + "description" : "ThousandEyes Test", + "useExplicitFtps" : false, + "probeMode" : "auto", + "type" : "ftp-server", + "usePublicBgp" : true, + "enabled" : true, + "password" : "password", + "protocol" : "tcp", + "fixedPacketRate" : 50, + "ftpTargetTime" : 1400, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test", + "numPathTraces" : 3, + "bgpMeasurements" : true, + "requestType" : "download", + "liveShare" : false, + "savedEvent" : true, + "networkMeasurements" : true, + "url" : "www.thousandeyes.com", + "labels" : [ "9842", "1283" ], + "agents" : [ { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + }, { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "ftpTimeLimit" : 10, + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "sharedWithAccounts" : [ "1234", "12345" ], + "useActiveFtp" : false, + "username" : "username", + "monitors" : [ "17410", "5" ] + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.tests.models.UpdateFtpServerTest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "mtuMeasurements" : false, + "ipv6Policy" : "use-agent-policy", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "downloadLimit" : 1048576, + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "bandwidthMeasurements" : true, + "description" : "ThousandEyes Test", + "useExplicitFtps" : false, + "probeMode" : "auto", + "type" : "ftp-server", + "usePublicBgp" : true, + "enabled" : true, + "password" : "password", + "protocol" : "tcp", + "fixedPacketRate" : 50, + "ftpTargetTime" : 1400, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test", + "numPathTraces" : 3, + "bgpMeasurements" : true, + "requestType" : "download", + "liveShare" : false, + "savedEvent" : true, + "networkMeasurements" : true, + "url" : "www.thousandeyes.com", + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "agents" : [ { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + }, { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "ftpTimeLimit" : 10, + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "sharedWithAccounts" : [ { + "name" : "Account name", + "aid" : "1234" + }, { + "name" : "Account name", + "aid" : "1234" + } ], + "useActiveFtp" : false, + "username" : "username", + "monitors" : [ { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + }, { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.FtpServerTest.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-tests/test/test_http_server_api.py b/thousandeyes-sdk-tests/test/test_http_server_api.py new file mode 100644 index 00000000..d5ecc907 --- /dev/null +++ b/thousandeyes-sdk-tests/test/test_http_server_api.py @@ -0,0 +1,914 @@ +# coding: utf-8 + +""" + Tests API + + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.tests.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.tests.api.http_server_api import HTTPServerApi + + +class TestHTTPServerApi(unittest.TestCase): + """HTTPServerApi unit test stubs""" + + def setUp(self) -> None: + self.api = HTTPServerApi() + + def tearDown(self) -> None: + pass + + def test_create_http_server_test_models_validation(self) -> None: + """Test case for create_http_server_test request and response models""" + request_body_json = """ + { + "clientCertificate" : "-----BEGIN PRIVATE KEY-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END PRIVATE KEY-----\\n-----BEGIN CERTIFICATE-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END CERTIFICATE-----\\n", + "mtuMeasurements" : false, + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "dnsOverride" : "8.8.8.8", + "bandwidthMeasurements" : true, + "probeMode" : "auto", + "includeHeaders" : true, + "type" : "http-server", + "password" : "password", + "protocol" : "tcp", + "followRedirects" : true, + "contentRegex" : "(regex)+", + "testName" : "ThousandEyes Test", + "verifyCertificate" : false, + "liveShare" : false, + "labels" : [ "9842", "1283" ], + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "sharedWithAccounts" : [ "1234", "12345" ], + "monitors" : [ "17410", "5" ], + "sslVersion" : "Auto", + "useNtlm" : false, + "ipv6Policy" : "use-agent-policy", + "downloadLimit" : 2048, + "alertRules" : [ "344753", "212697" ], + "description" : "ThousandEyes Test", + "httpTimeLimit" : 5, + "usePublicBgp" : true, + "enabled" : true, + "allowUnsafeLegacyRenegotiation" : true, + "fixedPacketRate" : 50, + "httpVersion" : 2, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "authType" : "none", + "alertsEnabled" : true, + "customHeaders" : { + "root" : { + "header1" : "value1" + }, + "domains" : { + "domain1.com" : { + "header2" : "value2" + } + }, + "all" : { + "header3" : "value3" + } + }, + "headers" : [ "header1: value1", "header2: value2" ], + "numPathTraces" : 3, + "bgpMeasurements" : true, + "savedEvent" : true, + "userAgent" : "curl", + "networkMeasurements" : true, + "url" : "www.thousandeyes.com", + "agents" : [ { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + }, { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "postBody" : "{ \\"example\\" : \\"value\\"}", + "createdBy" : "user@user.com", + "testId" : "281474976710706", + "desiredStatusCode" : "200", + "httpTargetTime" : 100, + "sslVersionId" : "0", + "username" : "username" + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.tests.models.UpdateHttpServerTest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "clientCertificate" : "-----BEGIN PRIVATE KEY-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END PRIVATE KEY-----\\n-----BEGIN CERTIFICATE-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END CERTIFICATE-----\\n", + "mtuMeasurements" : false, + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "dnsOverride" : "8.8.8.8", + "bandwidthMeasurements" : true, + "probeMode" : "auto", + "includeHeaders" : true, + "type" : "http-server", + "password" : "password", + "protocol" : "tcp", + "followRedirects" : true, + "contentRegex" : "(regex)+", + "testName" : "ThousandEyes Test", + "verifyCertificate" : false, + "liveShare" : false, + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "sharedWithAccounts" : [ { + "name" : "Account name", + "aid" : "1234" + }, { + "name" : "Account name", + "aid" : "1234" + } ], + "monitors" : [ { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + }, { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + } ], + "sslVersion" : "Auto", + "useNtlm" : false, + "ipv6Policy" : "use-agent-policy", + "downloadLimit" : 2048, + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "description" : "ThousandEyes Test", + "httpTimeLimit" : 5, + "usePublicBgp" : true, + "enabled" : true, + "allowUnsafeLegacyRenegotiation" : true, + "fixedPacketRate" : 50, + "httpVersion" : 2, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "authType" : "none", + "alertsEnabled" : true, + "customHeaders" : { + "root" : { + "header1" : "value1" + }, + "domains" : { + "domain1.com" : { + "header2" : "value2" + } + }, + "all" : { + "header3" : "value3" + } + }, + "headers" : [ "header1: value1", "header2: value2" ], + "numPathTraces" : 3, + "bgpMeasurements" : true, + "savedEvent" : true, + "userAgent" : "curl", + "networkMeasurements" : true, + "url" : "www.thousandeyes.com", + "agents" : [ { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + }, { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "postBody" : "{ \\"example\\" : \\"value\\"}", + "createdBy" : "user@user.com", + "testId" : "281474976710706", + "desiredStatusCode" : "200", + "httpTargetTime" : 100, + "sslVersionId" : "0", + "username" : "username" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.HttpServerTest.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_delete_http_server_test_models_validation(self) -> None: + """Test case for delete_http_server_test request and response models""" + + + def test_get_http_server_test_models_validation(self) -> None: + """Test case for get_http_server_test request and response models""" + + response_body_json = """ + { + "clientCertificate" : "-----BEGIN PRIVATE KEY-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END PRIVATE KEY-----\\n-----BEGIN CERTIFICATE-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END CERTIFICATE-----\\n", + "mtuMeasurements" : false, + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "dnsOverride" : "8.8.8.8", + "bandwidthMeasurements" : true, + "probeMode" : "auto", + "includeHeaders" : true, + "type" : "http-server", + "password" : "password", + "protocol" : "tcp", + "followRedirects" : true, + "contentRegex" : "(regex)+", + "testName" : "ThousandEyes Test", + "verifyCertificate" : false, + "liveShare" : false, + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "sharedWithAccounts" : [ { + "name" : "Account name", + "aid" : "1234" + }, { + "name" : "Account name", + "aid" : "1234" + } ], + "monitors" : [ { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + }, { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + } ], + "sslVersion" : "Auto", + "useNtlm" : false, + "ipv6Policy" : "use-agent-policy", + "downloadLimit" : 2048, + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "description" : "ThousandEyes Test", + "httpTimeLimit" : 5, + "usePublicBgp" : true, + "enabled" : true, + "allowUnsafeLegacyRenegotiation" : true, + "fixedPacketRate" : 50, + "httpVersion" : 2, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "authType" : "none", + "alertsEnabled" : true, + "customHeaders" : { + "root" : { + "header1" : "value1" + }, + "domains" : { + "domain1.com" : { + "header2" : "value2" + } + }, + "all" : { + "header3" : "value3" + } + }, + "headers" : [ "header1: value1", "header2: value2" ], + "numPathTraces" : 3, + "bgpMeasurements" : true, + "savedEvent" : true, + "userAgent" : "curl", + "networkMeasurements" : true, + "url" : "www.thousandeyes.com", + "agents" : [ { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + }, { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "postBody" : "{ \\"example\\" : \\"value\\"}", + "createdBy" : "user@user.com", + "testId" : "281474976710706", + "desiredStatusCode" : "200", + "httpTargetTime" : 100, + "sslVersionId" : "0", + "username" : "username" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.HttpServerTest.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_http_server_tests_models_validation(self) -> None: + """Test case for get_http_server_tests request and response models""" + + response_body_json = """ + { + "tests" : [ { + "clientCertificate" : "-----BEGIN PRIVATE KEY-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END PRIVATE KEY-----\\n-----BEGIN CERTIFICATE-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END CERTIFICATE-----\\n", + "mtuMeasurements" : false, + "sslVersion" : "Auto", + "useNtlm" : false, + "ipv6Policy" : "use-agent-policy", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "downloadLimit" : 2048, + "dnsOverride" : "8.8.8.8", + "bandwidthMeasurements" : true, + "description" : "ThousandEyes Test", + "httpTimeLimit" : 5, + "probeMode" : "auto", + "includeHeaders" : true, + "type" : "http-server", + "usePublicBgp" : true, + "enabled" : true, + "password" : "password", + "protocol" : "tcp", + "allowUnsafeLegacyRenegotiation" : true, + "fixedPacketRate" : 50, + "httpVersion" : 2, + "followRedirects" : true, + "pathTraceMode" : "classic", + "contentRegex" : "(regex)+", + "modifiedBy" : "user@user.com", + "authType" : "none", + "alertsEnabled" : true, + "customHeaders" : { + "root" : { + "header1" : "value1" + }, + "domains" : { + "domain1.com" : { + "header2" : "value2" + } + }, + "all" : { + "header3" : "value3" + } + }, + "testName" : "ThousandEyes Test", + "headers" : [ "header1: value1", "header2: value2" ], + "numPathTraces" : 3, + "bgpMeasurements" : true, + "verifyCertificate" : false, + "liveShare" : false, + "savedEvent" : true, + "userAgent" : "curl", + "networkMeasurements" : true, + "url" : "www.thousandeyes.com", + "createdDate" : "2022-07-17T22:00:54Z", + "postBody" : "{ \\"example\\" : \\"value\\"}", + "createdBy" : "user@user.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "desiredStatusCode" : "200", + "httpTargetTime" : 100, + "sslVersionId" : "0", + "username" : "username" + }, { + "clientCertificate" : "-----BEGIN PRIVATE KEY-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END PRIVATE KEY-----\\n-----BEGIN CERTIFICATE-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END CERTIFICATE-----\\n", + "mtuMeasurements" : false, + "sslVersion" : "Auto", + "useNtlm" : false, + "ipv6Policy" : "use-agent-policy", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "downloadLimit" : 2048, + "dnsOverride" : "8.8.8.8", + "bandwidthMeasurements" : true, + "description" : "ThousandEyes Test", + "httpTimeLimit" : 5, + "probeMode" : "auto", + "includeHeaders" : true, + "type" : "http-server", + "usePublicBgp" : true, + "enabled" : true, + "password" : "password", + "protocol" : "tcp", + "allowUnsafeLegacyRenegotiation" : true, + "fixedPacketRate" : 50, + "httpVersion" : 2, + "followRedirects" : true, + "pathTraceMode" : "classic", + "contentRegex" : "(regex)+", + "modifiedBy" : "user@user.com", + "authType" : "none", + "alertsEnabled" : true, + "customHeaders" : { + "root" : { + "header1" : "value1" + }, + "domains" : { + "domain1.com" : { + "header2" : "value2" + } + }, + "all" : { + "header3" : "value3" + } + }, + "testName" : "ThousandEyes Test", + "headers" : [ "header1: value1", "header2: value2" ], + "numPathTraces" : 3, + "bgpMeasurements" : true, + "verifyCertificate" : false, + "liveShare" : false, + "savedEvent" : true, + "userAgent" : "curl", + "networkMeasurements" : true, + "url" : "www.thousandeyes.com", + "createdDate" : "2022-07-17T22:00:54Z", + "postBody" : "{ \\"example\\" : \\"value\\"}", + "createdBy" : "user@user.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "testId" : "281474976710706", + "desiredStatusCode" : "200", + "httpTargetTime" : 100, + "sslVersionId" : "0", + "username" : "username" + } ], + "_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" + } + } + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.HttpServerTests.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_update_http_server_test_models_validation(self) -> None: + """Test case for update_http_server_test request and response models""" + request_body_json = """ + { + "clientCertificate" : "-----BEGIN PRIVATE KEY-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END PRIVATE KEY-----\\n-----BEGIN CERTIFICATE-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END CERTIFICATE-----\\n", + "mtuMeasurements" : false, + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "dnsOverride" : "8.8.8.8", + "bandwidthMeasurements" : true, + "probeMode" : "auto", + "includeHeaders" : true, + "type" : "http-server", + "password" : "password", + "protocol" : "tcp", + "followRedirects" : true, + "contentRegex" : "(regex)+", + "testName" : "ThousandEyes Test", + "verifyCertificate" : false, + "liveShare" : false, + "labels" : [ "9842", "1283" ], + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "sharedWithAccounts" : [ "1234", "12345" ], + "monitors" : [ "17410", "5" ], + "sslVersion" : "Auto", + "useNtlm" : false, + "ipv6Policy" : "use-agent-policy", + "downloadLimit" : 2048, + "alertRules" : [ "344753", "212697" ], + "description" : "ThousandEyes Test", + "httpTimeLimit" : 5, + "usePublicBgp" : true, + "enabled" : true, + "allowUnsafeLegacyRenegotiation" : true, + "fixedPacketRate" : 50, + "httpVersion" : 2, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "authType" : "none", + "alertsEnabled" : true, + "customHeaders" : { + "root" : { + "header1" : "value1" + }, + "domains" : { + "domain1.com" : { + "header2" : "value2" + } + }, + "all" : { + "header3" : "value3" + } + }, + "headers" : [ "header1: value1", "header2: value2" ], + "numPathTraces" : 3, + "bgpMeasurements" : true, + "savedEvent" : true, + "userAgent" : "curl", + "networkMeasurements" : true, + "url" : "www.thousandeyes.com", + "agents" : [ { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + }, { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "postBody" : "{ \\"example\\" : \\"value\\"}", + "createdBy" : "user@user.com", + "testId" : "281474976710706", + "desiredStatusCode" : "200", + "httpTargetTime" : 100, + "sslVersionId" : "0", + "username" : "username" + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.tests.models.UpdateHttpServerTest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "clientCertificate" : "-----BEGIN PRIVATE KEY-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END PRIVATE KEY-----\\n-----BEGIN CERTIFICATE-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END CERTIFICATE-----\\n", + "mtuMeasurements" : false, + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "dnsOverride" : "8.8.8.8", + "bandwidthMeasurements" : true, + "probeMode" : "auto", + "includeHeaders" : true, + "type" : "http-server", + "password" : "password", + "protocol" : "tcp", + "followRedirects" : true, + "contentRegex" : "(regex)+", + "testName" : "ThousandEyes Test", + "verifyCertificate" : false, + "liveShare" : false, + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "sharedWithAccounts" : [ { + "name" : "Account name", + "aid" : "1234" + }, { + "name" : "Account name", + "aid" : "1234" + } ], + "monitors" : [ { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + }, { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + } ], + "sslVersion" : "Auto", + "useNtlm" : false, + "ipv6Policy" : "use-agent-policy", + "downloadLimit" : 2048, + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "description" : "ThousandEyes Test", + "httpTimeLimit" : 5, + "usePublicBgp" : true, + "enabled" : true, + "allowUnsafeLegacyRenegotiation" : true, + "fixedPacketRate" : 50, + "httpVersion" : 2, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "authType" : "none", + "alertsEnabled" : true, + "customHeaders" : { + "root" : { + "header1" : "value1" + }, + "domains" : { + "domain1.com" : { + "header2" : "value2" + } + }, + "all" : { + "header3" : "value3" + } + }, + "headers" : [ "header1: value1", "header2: value2" ], + "numPathTraces" : 3, + "bgpMeasurements" : true, + "savedEvent" : true, + "userAgent" : "curl", + "networkMeasurements" : true, + "url" : "www.thousandeyes.com", + "agents" : [ { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + }, { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "postBody" : "{ \\"example\\" : \\"value\\"}", + "createdBy" : "user@user.com", + "testId" : "281474976710706", + "desiredStatusCode" : "200", + "httpTargetTime" : 100, + "sslVersionId" : "0", + "username" : "username" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.HttpServerTest.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-tests/test/test_page_load_api.py b/thousandeyes-sdk-tests/test/test_page_load_api.py new file mode 100644 index 00000000..c6261fa0 --- /dev/null +++ b/thousandeyes-sdk-tests/test/test_page_load_api.py @@ -0,0 +1,956 @@ +# coding: utf-8 + +""" + Tests API + + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.tests.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.tests.api.page_load_api import PageLoadApi + + +class TestPageLoadApi(unittest.TestCase): + """PageLoadApi unit test stubs""" + + def setUp(self) -> None: + self.api = PageLoadApi() + + def tearDown(self) -> None: + pass + + def test_create_page_load_test_models_validation(self) -> None: + """Test case for create_page_load_test request and response models""" + request_body_json = """ + { + "clientCertificate" : "-----BEGIN PRIVATE KEY-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END PRIVATE KEY-----\\n-----BEGIN CERTIFICATE-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END CERTIFICATE-----\\n", + "mtuMeasurements" : false, + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "bandwidthMeasurements" : true, + "probeMode" : "auto", + "includeHeaders" : true, + "type" : "page-load", + "password" : "password", + "protocol" : "tcp", + "followRedirects" : true, + "contentRegex" : "(regex)+", + "pageLoadingStrategy" : "normal", + "testName" : "ThousandEyes Test", + "allowMicAndCamera" : false, + "browserLanguage" : "en-US", + "verifyCertificate" : false, + "liveShare" : false, + "labels" : [ "9842", "1283" ], + "httpInterval" : 120, + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "emulatedDeviceId" : "2", + "sharedWithAccounts" : [ "1234", "12345" ], + "monitors" : [ "17410", "5" ], + "sslVersion" : "Auto", + "useNtlm" : false, + "alertRules" : [ "344753", "212697" ], + "description" : "ThousandEyes Test", + "httpTimeLimit" : 5, + "blockDomains" : "domain.com/", + "usePublicBgp" : true, + "enabled" : true, + "allowGeolocation" : false, + "allowUnsafeLegacyRenegotiation" : true, + "fixedPacketRate" : 50, + "httpVersion" : 2, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "authType" : "none", + "alertsEnabled" : true, + "customHeaders" : { + "root" : { + "header1" : "value1" + }, + "domains" : { + "domain1.com" : { + "header2" : "value2" + } + }, + "all" : { + "header3" : "value3" + } + }, + "pageLoadTargetTime" : 10, + "numPathTraces" : 3, + "bgpMeasurements" : true, + "savedEvent" : true, + "pageLoadTimeLimit" : 10, + "userAgent" : "curl", + "networkMeasurements" : true, + "url" : "www.thousandeyes.com", + "agents" : [ { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + }, { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "disableScreenshot" : false, + "createdBy" : "user@user.com", + "testId" : "281474976710706", + "subinterval" : 60, + "desiredStatusCode" : "200", + "httpTargetTime" : 100, + "sslVersionId" : "0", + "username" : "username" + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.tests.models.UpdatePageLoadTest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "clientCertificate" : "-----BEGIN PRIVATE KEY-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END PRIVATE KEY-----\\n-----BEGIN CERTIFICATE-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END CERTIFICATE-----\\n", + "mtuMeasurements" : false, + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "bandwidthMeasurements" : true, + "probeMode" : "auto", + "includeHeaders" : true, + "type" : "page-load", + "password" : "password", + "protocol" : "tcp", + "followRedirects" : true, + "contentRegex" : "(regex)+", + "pageLoadingStrategy" : "normal", + "testName" : "ThousandEyes Test", + "allowMicAndCamera" : false, + "browserLanguage" : "en-US", + "verifyCertificate" : false, + "liveShare" : false, + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "httpInterval" : 120, + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "emulatedDeviceId" : "2", + "sharedWithAccounts" : [ { + "name" : "Account name", + "aid" : "1234" + }, { + "name" : "Account name", + "aid" : "1234" + } ], + "monitors" : [ { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + }, { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + } ], + "sslVersion" : "Auto", + "useNtlm" : false, + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "description" : "ThousandEyes Test", + "httpTimeLimit" : 5, + "blockDomains" : "domain.com/", + "usePublicBgp" : true, + "enabled" : true, + "allowGeolocation" : false, + "allowUnsafeLegacyRenegotiation" : true, + "fixedPacketRate" : 50, + "httpVersion" : 2, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "authType" : "none", + "alertsEnabled" : true, + "customHeaders" : { + "root" : { + "header1" : "value1" + }, + "domains" : { + "domain1.com" : { + "header2" : "value2" + } + }, + "all" : { + "header3" : "value3" + } + }, + "pageLoadTargetTime" : 10, + "numPathTraces" : 3, + "bgpMeasurements" : true, + "savedEvent" : true, + "pageLoadTimeLimit" : 10, + "userAgent" : "curl", + "networkMeasurements" : true, + "url" : "www.thousandeyes.com", + "agents" : [ { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + }, { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "disableScreenshot" : false, + "createdBy" : "user@user.com", + "testId" : "281474976710706", + "subinterval" : 60, + "desiredStatusCode" : "200", + "httpTargetTime" : 100, + "sslVersionId" : "0", + "username" : "username" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.PageLoadTest.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_delete_page_load_test_models_validation(self) -> None: + """Test case for delete_page_load_test request and response models""" + + + def test_get_page_load_test_models_validation(self) -> None: + """Test case for get_page_load_test request and response models""" + + response_body_json = """ + { + "clientCertificate" : "-----BEGIN PRIVATE KEY-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END PRIVATE KEY-----\\n-----BEGIN CERTIFICATE-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END CERTIFICATE-----\\n", + "mtuMeasurements" : false, + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "bandwidthMeasurements" : true, + "probeMode" : "auto", + "includeHeaders" : true, + "type" : "page-load", + "password" : "password", + "protocol" : "tcp", + "followRedirects" : true, + "contentRegex" : "(regex)+", + "pageLoadingStrategy" : "normal", + "testName" : "ThousandEyes Test", + "allowMicAndCamera" : false, + "browserLanguage" : "en-US", + "verifyCertificate" : false, + "liveShare" : false, + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "httpInterval" : 120, + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "emulatedDeviceId" : "2", + "sharedWithAccounts" : [ { + "name" : "Account name", + "aid" : "1234" + }, { + "name" : "Account name", + "aid" : "1234" + } ], + "monitors" : [ { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + }, { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + } ], + "sslVersion" : "Auto", + "useNtlm" : false, + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "description" : "ThousandEyes Test", + "httpTimeLimit" : 5, + "blockDomains" : "domain.com/", + "usePublicBgp" : true, + "enabled" : true, + "allowGeolocation" : false, + "allowUnsafeLegacyRenegotiation" : true, + "fixedPacketRate" : 50, + "httpVersion" : 2, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "authType" : "none", + "alertsEnabled" : true, + "customHeaders" : { + "root" : { + "header1" : "value1" + }, + "domains" : { + "domain1.com" : { + "header2" : "value2" + } + }, + "all" : { + "header3" : "value3" + } + }, + "pageLoadTargetTime" : 10, + "numPathTraces" : 3, + "bgpMeasurements" : true, + "savedEvent" : true, + "pageLoadTimeLimit" : 10, + "userAgent" : "curl", + "networkMeasurements" : true, + "url" : "www.thousandeyes.com", + "agents" : [ { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + }, { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "disableScreenshot" : false, + "createdBy" : "user@user.com", + "testId" : "281474976710706", + "subinterval" : 60, + "desiredStatusCode" : "200", + "httpTargetTime" : 100, + "sslVersionId" : "0", + "username" : "username" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.PageLoadTest.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_page_load_tests_models_validation(self) -> None: + """Test case for get_page_load_tests request and response models""" + + response_body_json = """ + { + "tests" : [ { + "clientCertificate" : "-----BEGIN PRIVATE KEY-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END PRIVATE KEY-----\\n-----BEGIN CERTIFICATE-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END CERTIFICATE-----\\n", + "mtuMeasurements" : false, + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "bandwidthMeasurements" : true, + "probeMode" : "auto", + "includeHeaders" : true, + "type" : "page-load", + "password" : "password", + "protocol" : "tcp", + "followRedirects" : true, + "contentRegex" : "(regex)+", + "pageLoadingStrategy" : "normal", + "testName" : "ThousandEyes Test", + "allowMicAndCamera" : false, + "browserLanguage" : "en-US", + "verifyCertificate" : false, + "liveShare" : false, + "httpInterval" : 120, + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "emulatedDeviceId" : "2", + "sslVersion" : "Auto", + "useNtlm" : false, + "description" : "ThousandEyes Test", + "httpTimeLimit" : 5, + "blockDomains" : "domain.com/", + "usePublicBgp" : true, + "enabled" : true, + "allowGeolocation" : false, + "allowUnsafeLegacyRenegotiation" : true, + "fixedPacketRate" : 50, + "httpVersion" : 2, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "authType" : "none", + "alertsEnabled" : true, + "customHeaders" : { + "root" : { + "header1" : "value1" + }, + "domains" : { + "domain1.com" : { + "header2" : "value2" + } + }, + "all" : { + "header3" : "value3" + } + }, + "pageLoadTargetTime" : 10, + "numPathTraces" : 3, + "bgpMeasurements" : true, + "savedEvent" : true, + "pageLoadTimeLimit" : 10, + "userAgent" : "curl", + "networkMeasurements" : true, + "url" : "www.thousandeyes.com", + "createdDate" : "2022-07-17T22:00:54Z", + "disableScreenshot" : false, + "createdBy" : "user@user.com", + "testId" : "281474976710706", + "subinterval" : 60, + "desiredStatusCode" : "200", + "httpTargetTime" : 100, + "sslVersionId" : "0", + "username" : "username" + }, { + "clientCertificate" : "-----BEGIN PRIVATE KEY-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END PRIVATE KEY-----\\n-----BEGIN CERTIFICATE-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END CERTIFICATE-----\\n", + "mtuMeasurements" : false, + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "bandwidthMeasurements" : true, + "probeMode" : "auto", + "includeHeaders" : true, + "type" : "page-load", + "password" : "password", + "protocol" : "tcp", + "followRedirects" : true, + "contentRegex" : "(regex)+", + "pageLoadingStrategy" : "normal", + "testName" : "ThousandEyes Test", + "allowMicAndCamera" : false, + "browserLanguage" : "en-US", + "verifyCertificate" : false, + "liveShare" : false, + "httpInterval" : 120, + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "emulatedDeviceId" : "2", + "sslVersion" : "Auto", + "useNtlm" : false, + "description" : "ThousandEyes Test", + "httpTimeLimit" : 5, + "blockDomains" : "domain.com/", + "usePublicBgp" : true, + "enabled" : true, + "allowGeolocation" : false, + "allowUnsafeLegacyRenegotiation" : true, + "fixedPacketRate" : 50, + "httpVersion" : 2, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "authType" : "none", + "alertsEnabled" : true, + "customHeaders" : { + "root" : { + "header1" : "value1" + }, + "domains" : { + "domain1.com" : { + "header2" : "value2" + } + }, + "all" : { + "header3" : "value3" + } + }, + "pageLoadTargetTime" : 10, + "numPathTraces" : 3, + "bgpMeasurements" : true, + "savedEvent" : true, + "pageLoadTimeLimit" : 10, + "userAgent" : "curl", + "networkMeasurements" : true, + "url" : "www.thousandeyes.com", + "createdDate" : "2022-07-17T22:00:54Z", + "disableScreenshot" : false, + "createdBy" : "user@user.com", + "testId" : "281474976710706", + "subinterval" : 60, + "desiredStatusCode" : "200", + "httpTargetTime" : 100, + "sslVersionId" : "0", + "username" : "username" + } ], + "_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" + } + } + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.PageLoadTests.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_update_page_load_test_models_validation(self) -> None: + """Test case for update_page_load_test request and response models""" + request_body_json = """ + { + "clientCertificate" : "-----BEGIN PRIVATE KEY-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END PRIVATE KEY-----\\n-----BEGIN CERTIFICATE-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END CERTIFICATE-----\\n", + "mtuMeasurements" : false, + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "bandwidthMeasurements" : true, + "probeMode" : "auto", + "includeHeaders" : true, + "type" : "page-load", + "password" : "password", + "protocol" : "tcp", + "followRedirects" : true, + "contentRegex" : "(regex)+", + "pageLoadingStrategy" : "normal", + "testName" : "ThousandEyes Test", + "allowMicAndCamera" : false, + "browserLanguage" : "en-US", + "verifyCertificate" : false, + "liveShare" : false, + "labels" : [ "9842", "1283" ], + "httpInterval" : 120, + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "emulatedDeviceId" : "2", + "sharedWithAccounts" : [ "1234", "12345" ], + "monitors" : [ "17410", "5" ], + "sslVersion" : "Auto", + "useNtlm" : false, + "alertRules" : [ "344753", "212697" ], + "description" : "ThousandEyes Test", + "httpTimeLimit" : 5, + "blockDomains" : "domain.com/", + "usePublicBgp" : true, + "enabled" : true, + "allowGeolocation" : false, + "allowUnsafeLegacyRenegotiation" : true, + "fixedPacketRate" : 50, + "httpVersion" : 2, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "authType" : "none", + "alertsEnabled" : true, + "customHeaders" : { + "root" : { + "header1" : "value1" + }, + "domains" : { + "domain1.com" : { + "header2" : "value2" + } + }, + "all" : { + "header3" : "value3" + } + }, + "pageLoadTargetTime" : 10, + "numPathTraces" : 3, + "bgpMeasurements" : true, + "savedEvent" : true, + "pageLoadTimeLimit" : 10, + "userAgent" : "curl", + "networkMeasurements" : true, + "url" : "www.thousandeyes.com", + "agents" : [ { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + }, { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "disableScreenshot" : false, + "createdBy" : "user@user.com", + "testId" : "281474976710706", + "subinterval" : 60, + "desiredStatusCode" : "200", + "httpTargetTime" : 100, + "sslVersionId" : "0", + "username" : "username" + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.tests.models.UpdatePageLoadTest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "clientCertificate" : "-----BEGIN PRIVATE KEY-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END PRIVATE KEY-----\\n-----BEGIN CERTIFICATE-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END CERTIFICATE-----\\n", + "mtuMeasurements" : false, + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "bandwidthMeasurements" : true, + "probeMode" : "auto", + "includeHeaders" : true, + "type" : "page-load", + "password" : "password", + "protocol" : "tcp", + "followRedirects" : true, + "contentRegex" : "(regex)+", + "pageLoadingStrategy" : "normal", + "testName" : "ThousandEyes Test", + "allowMicAndCamera" : false, + "browserLanguage" : "en-US", + "verifyCertificate" : false, + "liveShare" : false, + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "httpInterval" : 120, + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "emulatedDeviceId" : "2", + "sharedWithAccounts" : [ { + "name" : "Account name", + "aid" : "1234" + }, { + "name" : "Account name", + "aid" : "1234" + } ], + "monitors" : [ { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + }, { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + } ], + "sslVersion" : "Auto", + "useNtlm" : false, + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "description" : "ThousandEyes Test", + "httpTimeLimit" : 5, + "blockDomains" : "domain.com/", + "usePublicBgp" : true, + "enabled" : true, + "allowGeolocation" : false, + "allowUnsafeLegacyRenegotiation" : true, + "fixedPacketRate" : 50, + "httpVersion" : 2, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "authType" : "none", + "alertsEnabled" : true, + "customHeaders" : { + "root" : { + "header1" : "value1" + }, + "domains" : { + "domain1.com" : { + "header2" : "value2" + } + }, + "all" : { + "header3" : "value3" + } + }, + "pageLoadTargetTime" : 10, + "numPathTraces" : 3, + "bgpMeasurements" : true, + "savedEvent" : true, + "pageLoadTimeLimit" : 10, + "userAgent" : "curl", + "networkMeasurements" : true, + "url" : "www.thousandeyes.com", + "agents" : [ { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + }, { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "disableScreenshot" : false, + "createdBy" : "user@user.com", + "testId" : "281474976710706", + "subinterval" : 60, + "desiredStatusCode" : "200", + "httpTargetTime" : 100, + "sslVersionId" : "0", + "username" : "username" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.PageLoadTest.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-tests/test/test_path_visualization_interface_groups_api.py b/thousandeyes-sdk-tests/test/test_path_visualization_interface_groups_api.py new file mode 100644 index 00000000..77994193 --- /dev/null +++ b/thousandeyes-sdk-tests/test/test_path_visualization_interface_groups_api.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + Tests API + + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.tests.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.tests.api.path_visualization_interface_groups_api import PathVisualizationInterfaceGroupsApi + + +class TestPathVisualizationInterfaceGroupsApi(unittest.TestCase): + """PathVisualizationInterfaceGroupsApi unit test stubs""" + + def setUp(self) -> None: + self.api = PathVisualizationInterfaceGroupsApi() + + def tearDown(self) -> None: + pass + + def test_create_path_vis_interface_groups_models_validation(self) -> None: + """Test case for create_path_vis_interface_groups request and response models""" + request_body_json = """ + { + "groupName" : "PathVis Interface Group", + "rdnsRegexes" : [ "aggr403b-1.iad3.rackspace.net", "aggr403c-1.iad3.rackspace.net" ], + "groupId" : "281474976710706", + "ipAddresses" : [ "1.1.1.1", "8.8.8.8" ], + "aid" : "1234" + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.tests.models.InterfaceGroup.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "groupName" : "PathVis Interface Group", + "rdnsRegexes" : [ "aggr403b-1.iad3.rackspace.net", "aggr403c-1.iad3.rackspace.net" ], + "groupId" : "281474976710706", + "ipAddresses" : [ "1.1.1.1", "8.8.8.8" ], + "aid" : "1234" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.InterfaceGroup.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_delete_path_vis_interface_group_models_validation(self) -> None: + """Test case for delete_path_vis_interface_group request and response models""" + + + def test_get_path_vis_interface_groups_models_validation(self) -> None: + """Test case for get_path_vis_interface_groups request and response models""" + + response_body_json = """ + { + "pathVisInterfaceGroups" : [ { + "groupName" : "PathVis Interface Group", + "rdnsRegexes" : [ "aggr403b-1.iad3.rackspace.net", "aggr403c-1.iad3.rackspace.net" ], + "groupId" : "281474976710706", + "ipAddresses" : [ "1.1.1.1", "8.8.8.8" ], + "aid" : "1234" + }, { + "groupName" : "PathVis Interface Group", + "rdnsRegexes" : [ "aggr403b-1.iad3.rackspace.net", "aggr403c-1.iad3.rackspace.net" ], + "groupId" : "281474976710706", + "ipAddresses" : [ "1.1.1.1", "8.8.8.8" ], + "aid" : "1234" + } ], + "_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" + } + } + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.InterfaceGroups.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_update_path_vis_interface_group_models_validation(self) -> None: + """Test case for update_path_vis_interface_group request and response models""" + request_body_json = """ + { + "groupName" : "PathVis Interface Group", + "rdnsRegexes" : [ "aggr403b-1.iad3.rackspace.net", "aggr403c-1.iad3.rackspace.net" ], + "groupId" : "281474976710706", + "ipAddresses" : [ "1.1.1.1", "8.8.8.8" ], + "aid" : "1234" + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.tests.models.InterfaceGroup.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "groupName" : "PathVis Interface Group", + "rdnsRegexes" : [ "aggr403b-1.iad3.rackspace.net", "aggr403c-1.iad3.rackspace.net" ], + "groupId" : "281474976710706", + "ipAddresses" : [ "1.1.1.1", "8.8.8.8" ], + "aid" : "1234" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.InterfaceGroup.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-tests/test/test_sip_server_api.py b/thousandeyes-sdk-tests/test/test_sip_server_api.py new file mode 100644 index 00000000..092ad155 --- /dev/null +++ b/thousandeyes-sdk-tests/test/test_sip_server_api.py @@ -0,0 +1,757 @@ +# coding: utf-8 + +""" + Tests API + + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.tests.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.tests.api.sip_server_api import SIPServerApi + + +class TestSIPServerApi(unittest.TestCase): + """SIPServerApi unit test stubs""" + + def setUp(self) -> None: + self.api = SIPServerApi() + + def tearDown(self) -> None: + pass + + def test_create_sip_server_test_models_validation(self) -> None: + """Test case for create_sip_server_test request and response models""" + request_body_json = """ + { + "mtuMeasurements" : false, + "ipv6Policy" : "use-agent-policy", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "registerEnabled" : false, + "alertRules" : [ "344753", "212697" ], + "description" : "ThousandEyes Test", + "probeMode" : "auto", + "type" : "sip-server", + "usePublicBgp" : true, + "enabled" : true, + "fixedPacketRate" : 50, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "alertsEnabled" : true, + "targetSipCredentials" : { + "password" : "password", + "protocol" : "tcp", + "port" : 49153, + "sipRegistrar" : "voice.thousandeyes.com", + "authUser" : "username", + "user" : "username" + }, + "testName" : "ThousandEyes Test", + "sipTargetTime" : 1000, + "numPathTraces" : 3, + "bgpMeasurements" : true, + "optionsRegex" : "[\\"a-z\\"]", + "liveShare" : false, + "savedEvent" : true, + "networkMeasurements" : true, + "labels" : [ "9842", "1283" ], + "agents" : [ { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + }, { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "sipTimeLimit" : 5, + "interval" : 120, + "testId" : "281474976710706", + "sharedWithAccounts" : [ "1234", "12345" ], + "monitors" : [ { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + }, { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + } ] + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.tests.models.UpdateSipServerTest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "mtuMeasurements" : false, + "ipv6Policy" : "use-agent-policy", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "registerEnabled" : false, + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "description" : "ThousandEyes Test", + "probeMode" : "auto", + "type" : "sip-server", + "authUser" : "username", + "usePublicBgp" : true, + "enabled" : true, + "fixedPacketRate" : 50, + "password" : "password", + "protocol" : "tcp", + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test", + "sipTargetTime" : 1000, + "numPathTraces" : 3, + "bgpMeasurements" : true, + "optionsRegex" : "[\\"a-z\\"]", + "liveShare" : false, + "savedEvent" : true, + "sipRegistrar" : "voice.thousandeyes.com", + "networkMeasurements" : true, + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "agents" : [ { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + }, { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "port" : 49153, + "modifiedDate" : "2022-07-17T22:00:54Z", + "sipTimeLimit" : 5, + "interval" : 120, + "testId" : "281474976710706", + "sharedWithAccounts" : [ { + "name" : "Account name", + "aid" : "1234" + }, { + "name" : "Account name", + "aid" : "1234" + } ], + "user" : "username", + "monitors" : [ { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + }, { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.SipServerTest.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_delete_sip_server_test_models_validation(self) -> None: + """Test case for delete_sip_server_test request and response models""" + + + def test_get_sip_server_test_models_validation(self) -> None: + """Test case for get_sip_server_test request and response models""" + + response_body_json = """ + { + "mtuMeasurements" : false, + "ipv6Policy" : "use-agent-policy", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "registerEnabled" : false, + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "description" : "ThousandEyes Test", + "probeMode" : "auto", + "type" : "sip-server", + "authUser" : "username", + "usePublicBgp" : true, + "enabled" : true, + "fixedPacketRate" : 50, + "password" : "password", + "protocol" : "tcp", + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test", + "sipTargetTime" : 1000, + "numPathTraces" : 3, + "bgpMeasurements" : true, + "optionsRegex" : "[\\"a-z\\"]", + "liveShare" : false, + "savedEvent" : true, + "sipRegistrar" : "voice.thousandeyes.com", + "networkMeasurements" : true, + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "agents" : [ { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + }, { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "port" : 49153, + "modifiedDate" : "2022-07-17T22:00:54Z", + "sipTimeLimit" : 5, + "interval" : 120, + "testId" : "281474976710706", + "sharedWithAccounts" : [ { + "name" : "Account name", + "aid" : "1234" + }, { + "name" : "Account name", + "aid" : "1234" + } ], + "user" : "username", + "monitors" : [ { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + }, { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.SipServerTest.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_sip_server_tests_models_validation(self) -> None: + """Test case for get_sip_server_tests request and response models""" + + response_body_json = """ + { + "tests" : [ { + "mtuMeasurements" : false, + "ipv6Policy" : "use-agent-policy", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "registerEnabled" : false, + "description" : "ThousandEyes Test", + "probeMode" : "auto", + "type" : "sip-server", + "authUser" : "username", + "usePublicBgp" : true, + "enabled" : true, + "fixedPacketRate" : 50, + "password" : "password", + "protocol" : "tcp", + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test", + "sipTargetTime" : 1000, + "numPathTraces" : 3, + "bgpMeasurements" : true, + "optionsRegex" : "[\\"a-z\\"]", + "liveShare" : false, + "savedEvent" : true, + "sipRegistrar" : "voice.thousandeyes.com", + "networkMeasurements" : true, + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "port" : 49153, + "modifiedDate" : "2022-07-17T22:00:54Z", + "sipTimeLimit" : 5, + "interval" : 120, + "testId" : "281474976710706", + "user" : "username" + }, { + "mtuMeasurements" : false, + "ipv6Policy" : "use-agent-policy", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "registerEnabled" : false, + "description" : "ThousandEyes Test", + "probeMode" : "auto", + "type" : "sip-server", + "authUser" : "username", + "usePublicBgp" : true, + "enabled" : true, + "fixedPacketRate" : 50, + "password" : "password", + "protocol" : "tcp", + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test", + "sipTargetTime" : 1000, + "numPathTraces" : 3, + "bgpMeasurements" : true, + "optionsRegex" : "[\\"a-z\\"]", + "liveShare" : false, + "savedEvent" : true, + "sipRegistrar" : "voice.thousandeyes.com", + "networkMeasurements" : true, + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "port" : 49153, + "modifiedDate" : "2022-07-17T22:00:54Z", + "sipTimeLimit" : 5, + "interval" : 120, + "testId" : "281474976710706", + "user" : "username" + } ], + "_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" + } + } + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.SipServerTests.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_update_sip_server_test_models_validation(self) -> None: + """Test case for update_sip_server_test request and response models""" + request_body_json = """ + { + "mtuMeasurements" : false, + "ipv6Policy" : "use-agent-policy", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "registerEnabled" : false, + "alertRules" : [ "344753", "212697" ], + "description" : "ThousandEyes Test", + "probeMode" : "auto", + "type" : "sip-server", + "usePublicBgp" : true, + "enabled" : true, + "fixedPacketRate" : 50, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "alertsEnabled" : true, + "targetSipCredentials" : { + "password" : "password", + "protocol" : "tcp", + "port" : 49153, + "sipRegistrar" : "voice.thousandeyes.com", + "authUser" : "username", + "user" : "username" + }, + "testName" : "ThousandEyes Test", + "sipTargetTime" : 1000, + "numPathTraces" : 3, + "bgpMeasurements" : true, + "optionsRegex" : "[\\"a-z\\"]", + "liveShare" : false, + "savedEvent" : true, + "networkMeasurements" : true, + "labels" : [ "9842", "1283" ], + "agents" : [ { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + }, { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "modifiedDate" : "2022-07-17T22:00:54Z", + "sipTimeLimit" : 5, + "interval" : 120, + "testId" : "281474976710706", + "sharedWithAccounts" : [ "1234", "12345" ], + "monitors" : [ { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + }, { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + } ] + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.tests.models.UpdateSipServerTest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "mtuMeasurements" : false, + "ipv6Policy" : "use-agent-policy", + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "registerEnabled" : false, + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "description" : "ThousandEyes Test", + "probeMode" : "auto", + "type" : "sip-server", + "authUser" : "username", + "usePublicBgp" : true, + "enabled" : true, + "fixedPacketRate" : 50, + "password" : "password", + "protocol" : "tcp", + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test", + "sipTargetTime" : 1000, + "numPathTraces" : 3, + "bgpMeasurements" : true, + "optionsRegex" : "[\\"a-z\\"]", + "liveShare" : false, + "savedEvent" : true, + "sipRegistrar" : "voice.thousandeyes.com", + "networkMeasurements" : true, + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "agents" : [ { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + }, { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + } ], + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "port" : 49153, + "modifiedDate" : "2022-07-17T22:00:54Z", + "sipTimeLimit" : 5, + "interval" : 120, + "testId" : "281474976710706", + "sharedWithAccounts" : [ { + "name" : "Account name", + "aid" : "1234" + }, { + "name" : "Account name", + "aid" : "1234" + } ], + "user" : "username", + "monitors" : [ { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + }, { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.SipServerTest.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-tests/test/test_utils.py b/thousandeyes-sdk-tests/test/test_utils.py new file mode 100644 index 00000000..930528d9 --- /dev/null +++ b/thousandeyes-sdk-tests/test/test_utils.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +import json +import unittest + +from pydantic import BaseModel + + +def assert_constructed_model_matches_example_json(model: BaseModel, loaded_json: dict): + test_case = unittest.TestCase() + test_case.maxDiff = None + test_case.assertIsNotNone(model) + constructed_json = json.loads(model.to_json()) + sorted_loaded_json = json.dumps(loaded_json, sort_keys=True) + sorted_constructed_json = json.dumps(constructed_json, sort_keys=True) + test_case.assertEqual(sorted_loaded_json, sorted_constructed_json) diff --git a/thousandeyes-sdk-tests/test/test_voice_api.py b/thousandeyes-sdk-tests/test/test_voice_api.py new file mode 100644 index 00000000..317e69a5 --- /dev/null +++ b/thousandeyes-sdk-tests/test/test_voice_api.py @@ -0,0 +1,697 @@ +# coding: utf-8 + +""" + Tests API + + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.tests.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.tests.api.voice_api import VoiceApi + + +class TestVoiceApi(unittest.TestCase): + """VoiceApi unit test stubs""" + + def setUp(self) -> None: + self.api = VoiceApi() + + def tearDown(self) -> None: + pass + + def test_create_voice_test_models_validation(self) -> None: + """Test case for create_voice_test request and response models""" + request_body_json = """ + { + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "alertRules" : [ "344753", "212697" ], + "description" : "ThousandEyes Test", + "type" : "voice", + "usePublicBgp" : true, + "enabled" : true, + "jitterBuffer" : 40, + "dscpId" : "0", + "duration" : 5, + "dscp" : "Best Effort (DSCP 0)", + "modifiedBy" : "user@user.com", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test", + "numPathTraces" : 3, + "bgpMeasurements" : true, + "liveShare" : false, + "savedEvent" : true, + "labels" : [ "9842", "1283" ], + "agents" : [ { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + }, { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + } ], + "codec" : "G.711 @ 64 Kbps", + "codecId" : "0", + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "port" : 1024, + "modifiedDate" : "2022-07-17T22:00:54Z", + "targetAgentId" : "281474976710706", + "interval" : 120, + "testId" : "281474976710706", + "sharedWithAccounts" : [ "1234", "12345" ], + "monitors" : [ { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + }, { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + } ] + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.tests.models.UpdateVoiceTest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "description" : "ThousandEyes Test", + "type" : "voice", + "usePublicBgp" : true, + "enabled" : true, + "jitterBuffer" : 40, + "dscpId" : "0", + "duration" : 5, + "dscp" : "Best Effort (DSCP 0)", + "modifiedBy" : "user@user.com", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test", + "numPathTraces" : 3, + "bgpMeasurements" : true, + "liveShare" : false, + "savedEvent" : true, + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "agents" : [ { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + }, { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + } ], + "codec" : "G.711 @ 64 Kbps", + "codecId" : "0", + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "port" : 1024, + "modifiedDate" : "2022-07-17T22:00:54Z", + "targetAgentId" : "281474976710706", + "interval" : 120, + "testId" : "281474976710706", + "sharedWithAccounts" : [ { + "name" : "Account name", + "aid" : "1234" + }, { + "name" : "Account name", + "aid" : "1234" + } ], + "monitors" : [ { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + }, { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.VoiceTest.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_delete_voice_test_models_validation(self) -> None: + """Test case for delete_voice_test request and response models""" + + + def test_get_voice_test_models_validation(self) -> None: + """Test case for get_voice_test request and response models""" + + response_body_json = """ + { + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "description" : "ThousandEyes Test", + "type" : "voice", + "usePublicBgp" : true, + "enabled" : true, + "jitterBuffer" : 40, + "dscpId" : "0", + "duration" : 5, + "dscp" : "Best Effort (DSCP 0)", + "modifiedBy" : "user@user.com", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test", + "numPathTraces" : 3, + "bgpMeasurements" : true, + "liveShare" : false, + "savedEvent" : true, + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "agents" : [ { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + }, { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + } ], + "codec" : "G.711 @ 64 Kbps", + "codecId" : "0", + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "port" : 1024, + "modifiedDate" : "2022-07-17T22:00:54Z", + "targetAgentId" : "281474976710706", + "interval" : 120, + "testId" : "281474976710706", + "sharedWithAccounts" : [ { + "name" : "Account name", + "aid" : "1234" + }, { + "name" : "Account name", + "aid" : "1234" + } ], + "monitors" : [ { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + }, { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.VoiceTest.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_voice_tests_models_validation(self) -> None: + """Test case for get_voice_tests request and response models""" + + response_body_json = """ + { + "tests" : [ { + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "description" : "ThousandEyes Test", + "type" : "voice", + "usePublicBgp" : true, + "enabled" : true, + "jitterBuffer" : 40, + "dscpId" : "0", + "duration" : 5, + "dscp" : "Best Effort (DSCP 0)", + "modifiedBy" : "user@user.com", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test", + "numPathTraces" : 3, + "bgpMeasurements" : true, + "liveShare" : false, + "savedEvent" : true, + "codec" : "G.711 @ 64 Kbps", + "codecId" : "0", + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "port" : 1024, + "modifiedDate" : "2022-07-17T22:00:54Z", + "targetAgentId" : "281474976710706", + "interval" : 120, + "testId" : "281474976710706" + }, { + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "description" : "ThousandEyes Test", + "type" : "voice", + "usePublicBgp" : true, + "enabled" : true, + "jitterBuffer" : 40, + "dscpId" : "0", + "duration" : 5, + "dscp" : "Best Effort (DSCP 0)", + "modifiedBy" : "user@user.com", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test", + "numPathTraces" : 3, + "bgpMeasurements" : true, + "liveShare" : false, + "savedEvent" : true, + "codec" : "G.711 @ 64 Kbps", + "codecId" : "0", + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "port" : 1024, + "modifiedDate" : "2022-07-17T22:00:54Z", + "targetAgentId" : "281474976710706", + "interval" : 120, + "testId" : "281474976710706" + } ], + "_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" + } + } + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.VoiceTests.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_update_voice_test_models_validation(self) -> None: + """Test case for update_voice_test request and response models""" + request_body_json = """ + { + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "alertRules" : [ "344753", "212697" ], + "description" : "ThousandEyes Test", + "type" : "voice", + "usePublicBgp" : true, + "enabled" : true, + "jitterBuffer" : 40, + "dscpId" : "0", + "duration" : 5, + "dscp" : "Best Effort (DSCP 0)", + "modifiedBy" : "user@user.com", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test", + "numPathTraces" : 3, + "bgpMeasurements" : true, + "liveShare" : false, + "savedEvent" : true, + "labels" : [ "9842", "1283" ], + "agents" : [ { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + }, { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + } ], + "codec" : "G.711 @ 64 Kbps", + "codecId" : "0", + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "port" : 1024, + "modifiedDate" : "2022-07-17T22:00:54Z", + "targetAgentId" : "281474976710706", + "interval" : 120, + "testId" : "281474976710706", + "sharedWithAccounts" : [ "1234", "12345" ], + "monitors" : [ { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + }, { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + } ] + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.tests.models.UpdateVoiceTest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "description" : "ThousandEyes Test", + "type" : "voice", + "usePublicBgp" : true, + "enabled" : true, + "jitterBuffer" : 40, + "dscpId" : "0", + "duration" : 5, + "dscp" : "Best Effort (DSCP 0)", + "modifiedBy" : "user@user.com", + "alertsEnabled" : true, + "testName" : "ThousandEyes Test", + "numPathTraces" : 3, + "bgpMeasurements" : true, + "liveShare" : false, + "savedEvent" : true, + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "agents" : [ { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + }, { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + } ], + "codec" : "G.711 @ 64 Kbps", + "codecId" : "0", + "createdDate" : "2022-07-17T22:00:54Z", + "createdBy" : "user@user.com", + "port" : 1024, + "modifiedDate" : "2022-07-17T22:00:54Z", + "targetAgentId" : "281474976710706", + "interval" : 120, + "testId" : "281474976710706", + "sharedWithAccounts" : [ { + "name" : "Account name", + "aid" : "1234" + }, { + "name" : "Account name", + "aid" : "1234" + } ], + "monitors" : [ { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + }, { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.VoiceTest.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-tests/test/test_web_transaction_api.py b/thousandeyes-sdk-tests/test/test_web_transaction_api.py new file mode 100644 index 00000000..9f9f8985 --- /dev/null +++ b/thousandeyes-sdk-tests/test/test_web_transaction_api.py @@ -0,0 +1,961 @@ +# coding: utf-8 + +""" + Tests API + + This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.tests.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.tests.api.web_transaction_api import WebTransactionApi + + +class TestWebTransactionApi(unittest.TestCase): + """WebTransactionApi unit test stubs""" + + def setUp(self) -> None: + self.api = WebTransactionApi() + + def tearDown(self) -> None: + pass + + def test_create_web_transactions_test_models_validation(self) -> None: + """Test case for create_web_transactions_test request and response models""" + request_body_json = """ + { + "clientCertificate" : "-----BEGIN PRIVATE KEY-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END PRIVATE KEY-----\\n-----BEGIN CERTIFICATE-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END CERTIFICATE-----\\n", + "mtuMeasurements" : false, + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "bandwidthMeasurements" : true, + "probeMode" : "auto", + "includeHeaders" : true, + "type" : "web-transactions", + "password" : "password", + "protocol" : "tcp", + "followRedirects" : true, + "contentRegex" : "(regex)+", + "pageLoadingStrategy" : "normal", + "testName" : "ThousandEyes Test", + "allowMicAndCamera" : false, + "browserLanguage" : "en-US", + "verifyCertificate" : false, + "liveShare" : false, + "labels" : [ "9842", "1283" ], + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "emulatedDeviceId" : "2", + "sharedWithAccounts" : [ "1234", "12345" ], + "monitors" : [ "17410", "5" ], + "sslVersion" : "Auto", + "useNtlm" : false, + "credentials" : [ "3247", "1051" ], + "alertRules" : [ "344753", "212697" ], + "description" : "ThousandEyes Test", + "httpTimeLimit" : 5, + "blockDomains" : "domain.com/", + "usePublicBgp" : true, + "enabled" : true, + "allowGeolocation" : false, + "allowUnsafeLegacyRenegotiation" : true, + "fixedPacketRate" : 50, + "httpVersion" : 2, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "authType" : "none", + "alertsEnabled" : true, + "customHeaders" : { + "root" : { + "header1" : "value1" + }, + "domains" : { + "domain1.com" : { + "header2" : "value2" + } + }, + "all" : { + "header3" : "value3" + } + }, + "numPathTraces" : 3, + "bgpMeasurements" : true, + "transactionScript" : "if (true) { return true; }", + "savedEvent" : true, + "userAgent" : "curl", + "networkMeasurements" : true, + "url" : "www.thousandeyes.com", + "agents" : [ { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + }, { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + } ], + "timeLimit" : 30, + "createdDate" : "2022-07-17T22:00:54Z", + "disableScreenshot" : false, + "createdBy" : "user@user.com", + "testId" : "281474976710706", + "subinterval" : 60, + "desiredStatusCode" : "200", + "httpTargetTime" : 100, + "sslVersionId" : "0", + "targetTime" : 1, + "username" : "username" + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.tests.models.UpdateWebTransactionTest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "clientCertificate" : "-----BEGIN PRIVATE KEY-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END PRIVATE KEY-----\\n-----BEGIN CERTIFICATE-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END CERTIFICATE-----\\n", + "mtuMeasurements" : false, + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "bandwidthMeasurements" : true, + "probeMode" : "auto", + "includeHeaders" : true, + "type" : "web-transactions", + "password" : "password", + "protocol" : "tcp", + "followRedirects" : true, + "contentRegex" : "(regex)+", + "pageLoadingStrategy" : "normal", + "testName" : "ThousandEyes Test", + "allowMicAndCamera" : false, + "browserLanguage" : "en-US", + "verifyCertificate" : false, + "liveShare" : false, + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "emulatedDeviceId" : "2", + "sharedWithAccounts" : [ { + "name" : "Account name", + "aid" : "1234" + }, { + "name" : "Account name", + "aid" : "1234" + } ], + "monitors" : [ { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + }, { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + } ], + "sslVersion" : "Auto", + "useNtlm" : false, + "credentials" : [ "3247", "1051" ], + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "description" : "ThousandEyes Test", + "httpTimeLimit" : 5, + "blockDomains" : "domain.com/", + "usePublicBgp" : true, + "enabled" : true, + "allowGeolocation" : false, + "allowUnsafeLegacyRenegotiation" : true, + "fixedPacketRate" : 50, + "httpVersion" : 2, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "authType" : "none", + "alertsEnabled" : true, + "customHeaders" : { + "root" : { + "header1" : "value1" + }, + "domains" : { + "domain1.com" : { + "header2" : "value2" + } + }, + "all" : { + "header3" : "value3" + } + }, + "numPathTraces" : 3, + "bgpMeasurements" : true, + "transactionScript" : "if (true) { return true; }", + "savedEvent" : true, + "userAgent" : "curl", + "networkMeasurements" : true, + "url" : "www.thousandeyes.com", + "agents" : [ { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + }, { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + } ], + "timeLimit" : 30, + "createdDate" : "2022-07-17T22:00:54Z", + "disableScreenshot" : false, + "createdBy" : "user@user.com", + "testId" : "281474976710706", + "subinterval" : 60, + "desiredStatusCode" : "200", + "httpTargetTime" : 100, + "sslVersionId" : "0", + "targetTime" : 1, + "username" : "username" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.WebTransactionTest.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_delete_web_transactions_test_models_validation(self) -> None: + """Test case for delete_web_transactions_test request and response models""" + + + def test_get_web_transactions_test_models_validation(self) -> None: + """Test case for get_web_transactions_test request and response models""" + + response_body_json = """ + { + "clientCertificate" : "-----BEGIN PRIVATE KEY-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END PRIVATE KEY-----\\n-----BEGIN CERTIFICATE-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END CERTIFICATE-----\\n", + "mtuMeasurements" : false, + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "bandwidthMeasurements" : true, + "probeMode" : "auto", + "includeHeaders" : true, + "type" : "web-transactions", + "password" : "password", + "protocol" : "tcp", + "followRedirects" : true, + "contentRegex" : "(regex)+", + "pageLoadingStrategy" : "normal", + "testName" : "ThousandEyes Test", + "allowMicAndCamera" : false, + "browserLanguage" : "en-US", + "verifyCertificate" : false, + "liveShare" : false, + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "emulatedDeviceId" : "2", + "sharedWithAccounts" : [ { + "name" : "Account name", + "aid" : "1234" + }, { + "name" : "Account name", + "aid" : "1234" + } ], + "monitors" : [ { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + }, { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + } ], + "sslVersion" : "Auto", + "useNtlm" : false, + "credentials" : [ "3247", "1051" ], + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "description" : "ThousandEyes Test", + "httpTimeLimit" : 5, + "blockDomains" : "domain.com/", + "usePublicBgp" : true, + "enabled" : true, + "allowGeolocation" : false, + "allowUnsafeLegacyRenegotiation" : true, + "fixedPacketRate" : 50, + "httpVersion" : 2, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "authType" : "none", + "alertsEnabled" : true, + "customHeaders" : { + "root" : { + "header1" : "value1" + }, + "domains" : { + "domain1.com" : { + "header2" : "value2" + } + }, + "all" : { + "header3" : "value3" + } + }, + "numPathTraces" : 3, + "bgpMeasurements" : true, + "transactionScript" : "if (true) { return true; }", + "savedEvent" : true, + "userAgent" : "curl", + "networkMeasurements" : true, + "url" : "www.thousandeyes.com", + "agents" : [ { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + }, { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + } ], + "timeLimit" : 30, + "createdDate" : "2022-07-17T22:00:54Z", + "disableScreenshot" : false, + "createdBy" : "user@user.com", + "testId" : "281474976710706", + "subinterval" : 60, + "desiredStatusCode" : "200", + "httpTargetTime" : 100, + "sslVersionId" : "0", + "targetTime" : 1, + "username" : "username" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.WebTransactionTest.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_web_transactions_tests_models_validation(self) -> None: + """Test case for get_web_transactions_tests request and response models""" + + response_body_json = """ + { + "tests" : [ { + "clientCertificate" : "-----BEGIN PRIVATE KEY-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END PRIVATE KEY-----\\n-----BEGIN CERTIFICATE-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END CERTIFICATE-----\\n", + "mtuMeasurements" : false, + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "bandwidthMeasurements" : true, + "probeMode" : "auto", + "includeHeaders" : true, + "type" : "web-transactions", + "password" : "password", + "protocol" : "tcp", + "followRedirects" : true, + "contentRegex" : "(regex)+", + "pageLoadingStrategy" : "normal", + "testName" : "ThousandEyes Test", + "allowMicAndCamera" : false, + "browserLanguage" : "en-US", + "verifyCertificate" : false, + "liveShare" : false, + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "emulatedDeviceId" : "2", + "sslVersion" : "Auto", + "useNtlm" : false, + "description" : "ThousandEyes Test", + "httpTimeLimit" : 5, + "blockDomains" : "domain.com/", + "usePublicBgp" : true, + "enabled" : true, + "allowGeolocation" : false, + "allowUnsafeLegacyRenegotiation" : true, + "fixedPacketRate" : 50, + "httpVersion" : 2, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "authType" : "none", + "alertsEnabled" : true, + "customHeaders" : { + "root" : { + "header1" : "value1" + }, + "domains" : { + "domain1.com" : { + "header2" : "value2" + } + }, + "all" : { + "header3" : "value3" + } + }, + "numPathTraces" : 3, + "bgpMeasurements" : true, + "transactionScript" : "if (true) { return true; }", + "savedEvent" : true, + "userAgent" : "curl", + "networkMeasurements" : true, + "url" : "www.thousandeyes.com", + "timeLimit" : 30, + "createdDate" : "2022-07-17T22:00:54Z", + "disableScreenshot" : false, + "createdBy" : "user@user.com", + "testId" : "281474976710706", + "subinterval" : 60, + "desiredStatusCode" : "200", + "httpTargetTime" : 100, + "sslVersionId" : "0", + "targetTime" : 1, + "username" : "username" + }, { + "clientCertificate" : "-----BEGIN PRIVATE KEY-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END PRIVATE KEY-----\\n-----BEGIN CERTIFICATE-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END CERTIFICATE-----\\n", + "mtuMeasurements" : false, + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "bandwidthMeasurements" : true, + "probeMode" : "auto", + "includeHeaders" : true, + "type" : "web-transactions", + "password" : "password", + "protocol" : "tcp", + "followRedirects" : true, + "contentRegex" : "(regex)+", + "pageLoadingStrategy" : "normal", + "testName" : "ThousandEyes Test", + "allowMicAndCamera" : false, + "browserLanguage" : "en-US", + "verifyCertificate" : false, + "liveShare" : false, + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "emulatedDeviceId" : "2", + "sslVersion" : "Auto", + "useNtlm" : false, + "description" : "ThousandEyes Test", + "httpTimeLimit" : 5, + "blockDomains" : "domain.com/", + "usePublicBgp" : true, + "enabled" : true, + "allowGeolocation" : false, + "allowUnsafeLegacyRenegotiation" : true, + "fixedPacketRate" : 50, + "httpVersion" : 2, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "authType" : "none", + "alertsEnabled" : true, + "customHeaders" : { + "root" : { + "header1" : "value1" + }, + "domains" : { + "domain1.com" : { + "header2" : "value2" + } + }, + "all" : { + "header3" : "value3" + } + }, + "numPathTraces" : 3, + "bgpMeasurements" : true, + "transactionScript" : "if (true) { return true; }", + "savedEvent" : true, + "userAgent" : "curl", + "networkMeasurements" : true, + "url" : "www.thousandeyes.com", + "timeLimit" : 30, + "createdDate" : "2022-07-17T22:00:54Z", + "disableScreenshot" : false, + "createdBy" : "user@user.com", + "testId" : "281474976710706", + "subinterval" : 60, + "desiredStatusCode" : "200", + "httpTargetTime" : 100, + "sslVersionId" : "0", + "targetTime" : 1, + "username" : "username" + } ], + "_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" + } + } + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.WebTransactionTests.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_update_web_transactions_test_models_validation(self) -> None: + """Test case for update_web_transactions_test request and response models""" + request_body_json = """ + { + "clientCertificate" : "-----BEGIN PRIVATE KEY-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END PRIVATE KEY-----\\n-----BEGIN CERTIFICATE-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END CERTIFICATE-----\\n", + "mtuMeasurements" : false, + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "bandwidthMeasurements" : true, + "probeMode" : "auto", + "includeHeaders" : true, + "type" : "web-transactions", + "password" : "password", + "protocol" : "tcp", + "followRedirects" : true, + "contentRegex" : "(regex)+", + "pageLoadingStrategy" : "normal", + "testName" : "ThousandEyes Test", + "allowMicAndCamera" : false, + "browserLanguage" : "en-US", + "verifyCertificate" : false, + "liveShare" : false, + "labels" : [ "9842", "1283" ], + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "emulatedDeviceId" : "2", + "sharedWithAccounts" : [ "1234", "12345" ], + "monitors" : [ "17410", "5" ], + "sslVersion" : "Auto", + "useNtlm" : false, + "credentials" : [ "3247", "1051" ], + "alertRules" : [ "344753", "212697" ], + "description" : "ThousandEyes Test", + "httpTimeLimit" : 5, + "blockDomains" : "domain.com/", + "usePublicBgp" : true, + "enabled" : true, + "allowGeolocation" : false, + "allowUnsafeLegacyRenegotiation" : true, + "fixedPacketRate" : 50, + "httpVersion" : 2, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "authType" : "none", + "alertsEnabled" : true, + "customHeaders" : { + "root" : { + "header1" : "value1" + }, + "domains" : { + "domain1.com" : { + "header2" : "value2" + } + }, + "all" : { + "header3" : "value3" + } + }, + "numPathTraces" : 3, + "bgpMeasurements" : true, + "transactionScript" : "if (true) { return true; }", + "savedEvent" : true, + "userAgent" : "curl", + "networkMeasurements" : true, + "url" : "www.thousandeyes.com", + "agents" : [ { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + }, { + "agentId" : "125", + "sourceIpAddress" : "1.1.1.1" + } ], + "timeLimit" : 30, + "createdDate" : "2022-07-17T22:00:54Z", + "disableScreenshot" : false, + "createdBy" : "user@user.com", + "testId" : "281474976710706", + "subinterval" : 60, + "desiredStatusCode" : "200", + "httpTargetTime" : 100, + "sslVersionId" : "0", + "targetTime" : 1, + "username" : "username" + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.tests.models.UpdateWebTransactionTest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "clientCertificate" : "-----BEGIN PRIVATE KEY-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END PRIVATE KEY-----\\n-----BEGIN CERTIFICATE-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END CERTIFICATE-----\\n", + "mtuMeasurements" : false, + "_links" : { + "testResults" : [ { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" + }, { + "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" + } ], + "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" + } + }, + "bandwidthMeasurements" : true, + "probeMode" : "auto", + "includeHeaders" : true, + "type" : "web-transactions", + "password" : "password", + "protocol" : "tcp", + "followRedirects" : true, + "contentRegex" : "(regex)+", + "pageLoadingStrategy" : "normal", + "testName" : "ThousandEyes Test", + "allowMicAndCamera" : false, + "browserLanguage" : "en-US", + "verifyCertificate" : false, + "liveShare" : false, + "labels" : [ { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + }, { + "labelId" : "961", + "name" : "Artem label", + "isBuiltin" : false + } ], + "modifiedDate" : "2022-07-17T22:00:54Z", + "interval" : 120, + "emulatedDeviceId" : "2", + "sharedWithAccounts" : [ { + "name" : "Account name", + "aid" : "1234" + }, { + "name" : "Account name", + "aid" : "1234" + } ], + "monitors" : [ { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + }, { + "monitorType" : "public", + "monitorId" : "1234", + "monitorName" : "Seattle, WA", + "ipAddress" : "4.69.184.193", + "countryId" : "GB", + "network" : "Level 3 Communications, Inc. (AS 3356)" + } ], + "sslVersion" : "Auto", + "useNtlm" : false, + "credentials" : [ "3247", "1051" ], + "alertRules" : [ { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + }, { + "severity" : "major", + "roundsViolatingOutOf" : 5, + "roundsViolatingRequired" : 2, + "isDefault" : true, + "expression" : "((hops((hopDelay >= 100 ms))))", + "alertType" : "http-server", + "minimumSourcesPct" : 99, + "ruleName" : "The End of the Internet", + "minimumSources" : 10, + "roundsViolatingMode" : "exact", + "ruleId" : "127094", + "direction" : "to-target" + } ], + "description" : "ThousandEyes Test", + "httpTimeLimit" : 5, + "blockDomains" : "domain.com/", + "usePublicBgp" : true, + "enabled" : true, + "allowGeolocation" : false, + "allowUnsafeLegacyRenegotiation" : true, + "fixedPacketRate" : 50, + "httpVersion" : 2, + "pathTraceMode" : "classic", + "modifiedBy" : "user@user.com", + "authType" : "none", + "alertsEnabled" : true, + "customHeaders" : { + "root" : { + "header1" : "value1" + }, + "domains" : { + "domain1.com" : { + "header2" : "value2" + } + }, + "all" : { + "header3" : "value3" + } + }, + "numPathTraces" : 3, + "bgpMeasurements" : true, + "transactionScript" : "if (true) { return true; }", + "savedEvent" : true, + "userAgent" : "curl", + "networkMeasurements" : true, + "url" : "www.thousandeyes.com", + "agents" : [ { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + }, { + "agentId" : "281474976710706", + "agentType" : "enterprise-cluster", + "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ], + "prefix" : "99.128.0.0/11", + "agentName" : "thousandeyes-stg-va-254", + "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ], + "location" : "San Francisco Bay Area", + "countryId" : "US", + "enabled" : true, + "network" : "AT&T Services, Inc. (AS 7018)", + "verifySslCertificates" : true + } ], + "timeLimit" : 30, + "createdDate" : "2022-07-17T22:00:54Z", + "disableScreenshot" : false, + "createdBy" : "user@user.com", + "testId" : "281474976710706", + "subinterval" : 60, + "desiredStatusCode" : "200", + "httpTargetTime" : 100, + "sslVersionId" : "0", + "targetTime" : 1, + "username" : "username" + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.tests.models.WebTransactionTest.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-usage/.openapi-generator/FILES b/thousandeyes-sdk-usage/.openapi-generator/FILES index e4830640..bdf28372 100644 --- a/thousandeyes-sdk-usage/.openapi-generator/FILES +++ b/thousandeyes-sdk-usage/.openapi-generator/FILES @@ -75,35 +75,6 @@ src/thousandeyes_sdk/usage/models/validation_error.py src/thousandeyes_sdk/usage/models/validation_error_item.py src/thousandeyes_sdk/usage/py.typed test/__init__.py -test/test_account_group_quota.py -test/test_endpoint_agents.py -test/test_endpoint_agents_embedded.py -test/test_endpoint_agents_essentials.py -test/test_enterprise_agent_units.py -test/test_enterprise_agent_units_by_test_owner_account_group.py -test/test_enterprise_agents.py -test/test_enterprise_agents_usage.py -test/test_error.py -test/test_expand.py -test/test_link.py -test/test_organization_quota.py -test/test_organization_quota_assignment.py -test/test_organization_quota_unassignment.py -test/test_organizations_quotas_assign.py -test/test_organizations_quotas_unassign.py -test/test_pagination_links.py -test/test_quota.py -test/test_quotas.py -test/test_quotas_assign_request.py -test/test_quotas_assign_response.py -test/test_quotas_unassign.py -test/test_self_links.py -test/test_tests.py -test/test_tests_usage.py -test/test_unauthorized_error.py -test/test_units_by_tests.py -test/test_usage.py -test/test_usage_details.py -test/test_usage_quota.py -test/test_validation_error.py -test/test_validation_error_item.py +test/test_quotas_api.py +test/test_usage_api.py +test/test_utils.py diff --git a/thousandeyes-sdk-usage/README.md b/thousandeyes-sdk-usage/README.md index b021f44b..ba77467a 100644 --- a/thousandeyes-sdk-usage/README.md +++ b/thousandeyes-sdk-usage/README.md @@ -17,8 +17,7 @@ Refer to the Usage API endpoints for detailed usage instructions and optional pa This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 7.0.4 -- Package version: 1.0.0 +- API version: 7.0.6 - Generator version: 7.6.0 - Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator @@ -32,9 +31,9 @@ Python 3.7+ If the python package is hosted on a repository, you can install directly using: ```sh -pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +pip install -e git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git#egg=thousandeyes-sdk-usage\&subdirectory=thousandeyes-sdk-usage ``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) +(you may need to run `pip` with root permission: `sudo pip install -e git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git#egg=thousandeyes-sdk-usage\&subdirectory=thousandeyes-sdk-usage`) Then import the package: ```python @@ -115,7 +114,7 @@ Class | Method | HTTP request | Description *QuotasApi* | [**unassign_organizations_account_groups_quotas**](docs/QuotasApi.md#unassign_organizations_account_groups_quotas) | **POST** /v7/quotas/account-groups/unassign | Remove account group quotas from organizations *QuotasApi* | [**unassign_organizations_quotas**](docs/QuotasApi.md#unassign_organizations_quotas) | **POST** /v7/quotas/unassign | Remove organization quotas *UsageApi* | [**get_enterprise_agents_units_usage**](docs/UsageApi.md#get_enterprise_agents_units_usage) | **GET** /v7/usage/units/enterprise-agents | Get enterprise agent usage -*UsageApi* | [**get_test_units_usage**](docs/UsageApi.md#get_test_units_usage) | **GET** /v7/usage/units/tests | Get cloud and enterprise agents units usage +*UsageApi* | [**get_tests_units_usage**](docs/UsageApi.md#get_tests_units_usage) | **GET** /v7/usage/units/tests | Get cloud and enterprise agents units usage *UsageApi* | [**get_usage**](docs/UsageApi.md#get_usage) | **GET** /v7/usage | Get usage information for the last month diff --git a/thousandeyes-sdk-usage/docs/QuotasApi.md b/thousandeyes-sdk-usage/docs/QuotasApi.md index 104ad8cc..9b3dff20 100644 --- a/thousandeyes-sdk-usage/docs/QuotasApi.md +++ b/thousandeyes-sdk-usage/docs/QuotasApi.md @@ -79,7 +79,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -164,7 +164,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -244,7 +244,7 @@ This endpoint does not need any parameter. ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -326,7 +326,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/problem+json + - **Accept**: application/json, application/problem+json ### HTTP response details @@ -408,7 +408,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/problem+json + - **Accept**: application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-usage/docs/UsageApi.md b/thousandeyes-sdk-usage/docs/UsageApi.md index acbfdc16..2f50cbcb 100644 --- a/thousandeyes-sdk-usage/docs/UsageApi.md +++ b/thousandeyes-sdk-usage/docs/UsageApi.md @@ -5,7 +5,7 @@ All URIs are relative to *https://api.thousandeyes.com* Method | HTTP request | Description ------------- | ------------- | ------------- [**get_enterprise_agents_units_usage**](UsageApi.md#get_enterprise_agents_units_usage) | **GET** /v7/usage/units/enterprise-agents | Get enterprise agent usage -[**get_test_units_usage**](UsageApi.md#get_test_units_usage) | **GET** /v7/usage/units/tests | Get cloud and enterprise agents units usage +[**get_tests_units_usage**](UsageApi.md#get_tests_units_usage) | **GET** /v7/usage/units/tests | Get cloud and enterprise agents units usage [**get_usage**](UsageApi.md#get_usage) | **GET** /v7/usage | Get usage information for the last month @@ -14,7 +14,7 @@ Method | HTTP request | Description Get enterprise agent usage -This endpoint returns the organization's enterprise agents usage for a specific time period, or the curent billing cycle if no time period is specified. In the `/v7/usage` API, a shared entprise agent's usage is reported in the account group where the agent was created (i.e Primary Account Group). However in this API, the shared agent's usage is distributed among all the account groups where the tests are running on the particular agent. This API is also only available to customers on usage based pricing model. +This endpoint returns the organization's enterprise agents usage for a specific time period, or the curent billing cycle if no time period is specified. In the `/v7/usage` API, a shared enterprise agent's usage is reported in the account group where the agent was created (i.e Primary Account Group). However in this API, the shared agent's usage is distributed among all the account groups where the tests are running on the particular agent. This API is also only available to customers on usage based pricing model. ### Example @@ -81,7 +81,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -97,12 +97,12 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_test_units_usage** -> TestsUsage get_test_units_usage(aid=aid, start_date=start_date, end_date=end_date, cursor=cursor) +# **get_tests_units_usage** +> TestsUsage get_tests_units_usage(aid=aid, start_date=start_date, end_date=end_date, cursor=cursor) Get cloud and enterprise agents units usage -This endpoint returns the cloud and enterprise agents usage for all the tests for a specific time period, or the curent billing cycle if no time period is specified. In the `/v7/usage` API, an entprise agent's usage is reported in the account group where the agent was created (i.e Primary Account Group). However in this API, the agent's usage is distributed among all the account groups where the tests are running on the particular agent. This API is also only available to customers on usage based pricing model. +This endpoint returns the cloud and enterprise agents usage for all the tests for a specific time period, or the curent billing cycle if no time period is specified. In the `/v7/usage` API, an enterprise agent's usage is reported in the account group where the agent was created (i.e Primary Account Group). However in this API, the agent's usage is distributed among all the account groups where the tests are running on the particular agent. This API is also only available to customers on usage based pricing model. ### Example @@ -141,11 +141,11 @@ with thousandeyes_sdk.usage.ApiClient(configuration) as api_client: try: # Get cloud and enterprise agents units usage - api_response = api_instance.get_test_units_usage(aid=aid, start_date=start_date, end_date=end_date, cursor=cursor) - print("The response of UsageApi->get_test_units_usage:\n") + api_response = api_instance.get_tests_units_usage(aid=aid, start_date=start_date, end_date=end_date, cursor=cursor) + print("The response of UsageApi->get_tests_units_usage:\n") pprint(api_response) except Exception as e: - print("Exception when calling UsageApi->get_test_units_usage: %s\n" % e) + print("Exception when calling UsageApi->get_tests_units_usage: %s\n" % e) ``` @@ -171,7 +171,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details @@ -258,7 +258,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/hal+json, application/problem+json + - **Accept**: application/hal+json, application/json, application/problem+json ### HTTP response details diff --git a/thousandeyes-sdk-usage/docs/ValidationErrorItem.md b/thousandeyes-sdk-usage/docs/ValidationErrorItem.md index 0cac14e9..32ecd692 100644 --- a/thousandeyes-sdk-usage/docs/ValidationErrorItem.md +++ b/thousandeyes-sdk-usage/docs/ValidationErrorItem.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **code** | **str** | (Optional) A unique error type/code that can be referenced in the documentation for further details. | [optional] -**var_field** | **int** | Identifies the field that triggered this particular error. | [optional] +**var_field** | **str** | Identifies the field that triggered this particular error. | [optional] **message** | **str** | A short, human-readable summary of the error. | [optional] ## Example diff --git a/thousandeyes-sdk-usage/pyproject.toml b/thousandeyes-sdk-usage/pyproject.toml index 7fd993d9..69cfb259 100644 --- a/thousandeyes-sdk-usage/pyproject.toml +++ b/thousandeyes-sdk-usage/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "thousandeyes-sdk-usage" -version = "1.0.0" +dynamic = ["version"] authors = [ { name = "ThousandEyes API Team", email = "api-team@thousandeyes.com" } ] @@ -11,9 +11,12 @@ dependencies = [ "python-dateutil >=2.8.2", "pydantic >=2", "typing-extensions >=4.7.1", - "thousandeyes-sdk-client==1.0.0", + "thousandeyes-sdk-core", ] +[tool.setuptools.dynamic] +version = {attr = "thousandeyes_sdk.client.__version__"} + [project.optional-dependencies] test = [ "pytest~=7.1.3", diff --git a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/__init__.py b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/__init__.py index 7f88a6c1..6831ccb9 100644 --- a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/__init__.py +++ b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/__init__.py @@ -7,15 +7,13 @@ These usage endpoints define the following operations: * **Usage**: Retrieve usage data for the specified time period (default is one month). * Users must have the `View Billing` permission to access this endpoint. * This endpoint offers visibility across all account groups within the organization. * Users with `View Billing` permission in multiple organizations should query the endpoint with the `aid` query string parameter (see optional parameters) for each organization. * **Quotas**: Obtain organization and account usage quotas. Additionally, users with the appropriate permissions can create, update, or delete these quotas. * Users must have the necessary permissions to perform quota-related actions. Refer to the Usage API endpoints for detailed usage instructions and optional parameters. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 -__version__ = "1.0.0" - # import apis into sdk package from thousandeyes_sdk.usage.api.quotas_api import QuotasApi from thousandeyes_sdk.usage.api.usage_api import UsageApi diff --git a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/api/quotas_api.py b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/api/quotas_api.py index 565ef9e3..83cebc53 100644 --- a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/api/quotas_api.py +++ b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/api/quotas_api.py @@ -5,7 +5,7 @@ These usage endpoints define the following operations: * **Usage**: Retrieve usage data for the specified time period (default is one month). * Users must have the `View Billing` permission to access this endpoint. * This endpoint offers visibility across all account groups within the organization. * Users with `View Billing` permission in multiple organizations should query the endpoint with the `aid` query string parameter (see optional parameters) for each organization. * **Quotas**: Obtain organization and account usage quotas. Additionally, users with the appropriate permissions can create, update, or delete these quotas. * Users must have the necessary permissions to perform quota-related actions. Refer to the Usage API endpoints for detailed usage instructions and optional parameters. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -29,6 +29,7 @@ from thousandeyes_sdk.usage.models.quotas_unassign import QuotasUnassign from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class QuotasApi: @@ -41,6 +42,7 @@ class QuotasApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @@ -295,6 +297,7 @@ class QuotasApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -587,6 +590,7 @@ class QuotasApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -864,6 +868,7 @@ class QuotasApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -1142,6 +1147,7 @@ class QuotasApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ + 'application/json', 'application/problem+json' ] ) @@ -1433,6 +1439,7 @@ class QuotasApi: # set the HTTP header `Accept` _header_params['Accept'] = self.api_client.select_header_accept( [ + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/api/usage_api.py b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/api/usage_api.py index 6fbf085b..ce8ba5e4 100644 --- a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/api/usage_api.py +++ b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/api/usage_api.py @@ -5,7 +5,7 @@ These usage endpoints define the following operations: * **Usage**: Retrieve usage data for the specified time period (default is one month). * Users must have the `View Billing` permission to access this endpoint. * This endpoint offers visibility across all account groups within the organization. * Users with `View Billing` permission in multiple organizations should query the endpoint with the `aid` query string parameter (see optional parameters) for each organization. * **Quotas**: Obtain organization and account usage quotas. Additionally, users with the appropriate permissions can create, update, or delete these quotas. * Users must have the necessary permissions to perform quota-related actions. Refer to the Usage API endpoints for detailed usage instructions and optional parameters. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -30,6 +30,7 @@ from thousandeyes_sdk.usage.models.usage import Usage from thousandeyes_sdk.client.api_client import ApiClient, RequestSerialized from thousandeyes_sdk.client.api_response import ApiResponse from thousandeyes_sdk.client.rest import RESTResponseType +from thousandeyes_sdk.client.version import Version class UsageApi: @@ -42,6 +43,7 @@ class UsageApi: def __init__(self, api_client=None) -> None: if api_client is None: api_client = ApiClient.get_default() + api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get()) self.api_client = api_client @@ -66,7 +68,7 @@ class UsageApi: ) -> EnterpriseAgentsUsage: """Get enterprise agent usage - This endpoint returns the organization's enterprise agents usage for a specific time period, or the curent billing cycle if no time period is specified. In the `/v7/usage` API, a shared entprise agent's usage is reported in the account group where the agent was created (i.e Primary Account Group). However in this API, the shared agent's usage is distributed among all the account groups where the tests are running on the particular agent. This API is also only available to customers on usage based pricing model. + This endpoint returns the organization's enterprise agents usage for a specific time period, or the curent billing cycle if no time period is specified. In the `/v7/usage` API, a shared enterprise agent's usage is reported in the account group where the agent was created (i.e Primary Account Group). However in this API, the shared agent's usage is distributed among all the account groups where the tests are running on the particular agent. This API is also only available to customers on usage based pricing model. :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 @@ -148,7 +150,7 @@ class UsageApi: ) -> ApiResponse[EnterpriseAgentsUsage]: """Get enterprise agent usage - This endpoint returns the organization's enterprise agents usage for a specific time period, or the curent billing cycle if no time period is specified. In the `/v7/usage` API, a shared entprise agent's usage is reported in the account group where the agent was created (i.e Primary Account Group). However in this API, the shared agent's usage is distributed among all the account groups where the tests are running on the particular agent. This API is also only available to customers on usage based pricing model. + This endpoint returns the organization's enterprise agents usage for a specific time period, or the curent billing cycle if no time period is specified. In the `/v7/usage` API, a shared enterprise agent's usage is reported in the account group where the agent was created (i.e Primary Account Group). However in this API, the shared agent's usage is distributed among all the account groups where the tests are running on the particular agent. This API is also only available to customers on usage based pricing model. :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 @@ -230,7 +232,7 @@ class UsageApi: ) -> RESTResponseType: """Get enterprise agent usage - This endpoint returns the organization's enterprise agents usage for a specific time period, or the curent billing cycle if no time period is specified. In the `/v7/usage` API, a shared entprise agent's usage is reported in the account group where the agent was created (i.e Primary Account Group). However in this API, the shared agent's usage is distributed among all the account groups where the tests are running on the particular agent. This API is also only available to customers on usage based pricing model. + This endpoint returns the organization's enterprise agents usage for a specific time period, or the curent billing cycle if no time period is specified. In the `/v7/usage` API, a shared enterprise agent's usage is reported in the account group where the agent was created (i.e Primary Account Group). However in this API, the shared agent's usage is distributed among all the account groups where the tests are running on the particular agent. This API is also only available to customers on usage based pricing model. :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 @@ -350,6 +352,7 @@ class UsageApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -379,7 +382,7 @@ class UsageApi: @validate_call - def get_test_units_usage( + def get_tests_units_usage( 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, 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, @@ -400,7 +403,7 @@ class UsageApi: ) -> TestsUsage: """Get cloud and enterprise agents units usage - This endpoint returns the cloud and enterprise agents usage for all the tests for a specific time period, or the curent billing cycle if no time period is specified. In the `/v7/usage` API, an entprise agent's usage is reported in the account group where the agent was created (i.e Primary Account Group). However in this API, the agent's usage is distributed among all the account groups where the tests are running on the particular agent. This API is also only available to customers on usage based pricing model. + This endpoint returns the cloud and enterprise agents usage for all the tests for a specific time period, or the curent billing cycle if no time period is specified. In the `/v7/usage` API, an enterprise agent's usage is reported in the account group where the agent was created (i.e Primary Account Group). However in this API, the agent's usage is distributed among all the account groups where the tests are running on the particular agent. This API is also only available to customers on usage based pricing model. :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 @@ -432,7 +435,7 @@ class UsageApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_units_usage_serialize( + _param = self._get_tests_units_usage_serialize( aid=aid, start_date=start_date, end_date=end_date, @@ -465,7 +468,7 @@ class UsageApi: @validate_call - def get_test_units_usage_with_http_info( + def get_tests_units_usage_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, 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, @@ -486,7 +489,7 @@ class UsageApi: ) -> ApiResponse[TestsUsage]: """Get cloud and enterprise agents units usage - This endpoint returns the cloud and enterprise agents usage for all the tests for a specific time period, or the curent billing cycle if no time period is specified. In the `/v7/usage` API, an entprise agent's usage is reported in the account group where the agent was created (i.e Primary Account Group). However in this API, the agent's usage is distributed among all the account groups where the tests are running on the particular agent. This API is also only available to customers on usage based pricing model. + This endpoint returns the cloud and enterprise agents usage for all the tests for a specific time period, or the curent billing cycle if no time period is specified. In the `/v7/usage` API, an enterprise agent's usage is reported in the account group where the agent was created (i.e Primary Account Group). However in this API, the agent's usage is distributed among all the account groups where the tests are running on the particular agent. This API is also only available to customers on usage based pricing model. :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 @@ -518,7 +521,7 @@ class UsageApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_units_usage_serialize( + _param = self._get_tests_units_usage_serialize( aid=aid, start_date=start_date, end_date=end_date, @@ -551,7 +554,7 @@ class UsageApi: @validate_call - def get_test_units_usage_without_preload_content( + def get_tests_units_usage_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, 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, @@ -572,7 +575,7 @@ class UsageApi: ) -> RESTResponseType: """Get cloud and enterprise agents units usage - This endpoint returns the cloud and enterprise agents usage for all the tests for a specific time period, or the curent billing cycle if no time period is specified. In the `/v7/usage` API, an entprise agent's usage is reported in the account group where the agent was created (i.e Primary Account Group). However in this API, the agent's usage is distributed among all the account groups where the tests are running on the particular agent. This API is also only available to customers on usage based pricing model. + This endpoint returns the cloud and enterprise agents usage for all the tests for a specific time period, or the curent billing cycle if no time period is specified. In the `/v7/usage` API, an enterprise agent's usage is reported in the account group where the agent was created (i.e Primary Account Group). However in this API, the agent's usage is distributed among all the account groups where the tests are running on the particular agent. This API is also only available to customers on usage based pricing model. :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 @@ -604,7 +607,7 @@ class UsageApi: :return: Returns the result object. """ # noqa: E501 - _param = self._get_test_units_usage_serialize( + _param = self._get_tests_units_usage_serialize( aid=aid, start_date=start_date, end_date=end_date, @@ -631,7 +634,7 @@ class UsageApi: return response_data.response - def _get_test_units_usage_serialize( + def _get_tests_units_usage_serialize( self, aid, start_date, @@ -700,6 +703,7 @@ class UsageApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) @@ -999,6 +1003,7 @@ class UsageApi: _header_params['Accept'] = self.api_client.select_header_accept( [ 'application/hal+json', + 'application/json', 'application/problem+json' ] ) diff --git a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/__init__.py b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/__init__.py index e4d95eec..c76c439b 100644 --- a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/__init__.py +++ b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/__init__.py @@ -6,7 +6,7 @@ These usage endpoints define the following operations: * **Usage**: Retrieve usage data for the specified time period (default is one month). * Users must have the `View Billing` permission to access this endpoint. * This endpoint offers visibility across all account groups within the organization. * Users with `View Billing` permission in multiple organizations should query the endpoint with the `aid` query string parameter (see optional parameters) for each organization. * **Quotas**: Obtain organization and account usage quotas. Additionally, users with the appropriate permissions can create, update, or delete these quotas. * Users must have the necessary permissions to perform quota-related actions. Refer to the Usage API endpoints for detailed usage instructions and optional parameters. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/account_group_quota.py b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/account_group_quota.py index e6ee3385..43825800 100644 --- a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/account_group_quota.py +++ b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/account_group_quota.py @@ -5,7 +5,7 @@ These usage endpoints define the following operations: * **Usage**: Retrieve usage data for the specified time period (default is one month). * Users must have the `View Billing` permission to access this endpoint. * This endpoint offers visibility across all account groups within the organization. * Users with `View Billing` permission in multiple organizations should query the endpoint with the `aid` query string parameter (see optional parameters) for each organization. * **Quotas**: Obtain organization and account usage quotas. Additionally, users with the appropriate permissions can create, update, or delete these quotas. * Users must have the necessary permissions to perform quota-related actions. Refer to the Usage API endpoints for detailed usage instructions and optional parameters. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class AccountGroupQuota(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class AccountGroupQuota(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/endpoint_agents.py b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/endpoint_agents.py index 33c3a8d0..38a2b14b 100644 --- a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/endpoint_agents.py +++ b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/endpoint_agents.py @@ -5,7 +5,7 @@ These usage endpoints define the following operations: * **Usage**: Retrieve usage data for the specified time period (default is one month). * Users must have the `View Billing` permission to access this endpoint. * This endpoint offers visibility across all account groups within the organization. * Users with `View Billing` permission in multiple organizations should query the endpoint with the `aid` query string parameter (see optional parameters) for each organization. * **Quotas**: Obtain organization and account usage quotas. Additionally, users with the appropriate permissions can create, update, or delete these quotas. * Users must have the necessary permissions to perform quota-related actions. Refer to the Usage API endpoints for detailed usage instructions and optional parameters. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class EndpointAgents(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class EndpointAgents(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/endpoint_agents_embedded.py b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/endpoint_agents_embedded.py index e2d3c28f..15325866 100644 --- a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/endpoint_agents_embedded.py +++ b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/endpoint_agents_embedded.py @@ -5,7 +5,7 @@ These usage endpoints define the following operations: * **Usage**: Retrieve usage data for the specified time period (default is one month). * Users must have the `View Billing` permission to access this endpoint. * This endpoint offers visibility across all account groups within the organization. * Users with `View Billing` permission in multiple organizations should query the endpoint with the `aid` query string parameter (see optional parameters) for each organization. * **Quotas**: Obtain organization and account usage quotas. Additionally, users with the appropriate permissions can create, update, or delete these quotas. * Users must have the necessary permissions to perform quota-related actions. Refer to the Usage API endpoints for detailed usage instructions and optional parameters. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class EndpointAgentsEmbedded(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class EndpointAgentsEmbedded(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/endpoint_agents_essentials.py b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/endpoint_agents_essentials.py index 940667ef..abb6d96a 100644 --- a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/endpoint_agents_essentials.py +++ b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/endpoint_agents_essentials.py @@ -5,7 +5,7 @@ These usage endpoints define the following operations: * **Usage**: Retrieve usage data for the specified time period (default is one month). * Users must have the `View Billing` permission to access this endpoint. * This endpoint offers visibility across all account groups within the organization. * Users with `View Billing` permission in multiple organizations should query the endpoint with the `aid` query string parameter (see optional parameters) for each organization. * **Quotas**: Obtain organization and account usage quotas. Additionally, users with the appropriate permissions can create, update, or delete these quotas. * Users must have the necessary permissions to perform quota-related actions. Refer to the Usage API endpoints for detailed usage instructions and optional parameters. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class EndpointAgentsEssentials(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class EndpointAgentsEssentials(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/enterprise_agent_units.py b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/enterprise_agent_units.py index 8549745f..340f2d52 100644 --- a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/enterprise_agent_units.py +++ b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/enterprise_agent_units.py @@ -5,7 +5,7 @@ These usage endpoints define the following operations: * **Usage**: Retrieve usage data for the specified time period (default is one month). * Users must have the `View Billing` permission to access this endpoint. * This endpoint offers visibility across all account groups within the organization. * Users with `View Billing` permission in multiple organizations should query the endpoint with the `aid` query string parameter (see optional parameters) for each organization. * **Quotas**: Obtain organization and account usage quotas. Additionally, users with the appropriate permissions can create, update, or delete these quotas. * Users must have the necessary permissions to perform quota-related actions. Refer to the Usage API endpoints for detailed usage instructions and optional parameters. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -39,6 +39,7 @@ class EnterpriseAgentUnits(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -49,7 +50,7 @@ class EnterpriseAgentUnits(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/enterprise_agent_units_by_test_owner_account_group.py b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/enterprise_agent_units_by_test_owner_account_group.py index b8fb270e..f29bdd8b 100644 --- a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/enterprise_agent_units_by_test_owner_account_group.py +++ b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/enterprise_agent_units_by_test_owner_account_group.py @@ -5,7 +5,7 @@ These usage endpoints define the following operations: * **Usage**: Retrieve usage data for the specified time period (default is one month). * Users must have the `View Billing` permission to access this endpoint. * This endpoint offers visibility across all account groups within the organization. * Users with `View Billing` permission in multiple organizations should query the endpoint with the `aid` query string parameter (see optional parameters) for each organization. * **Quotas**: Obtain organization and account usage quotas. Additionally, users with the appropriate permissions can create, update, or delete these quotas. * Users must have the necessary permissions to perform quota-related actions. Refer to the Usage API endpoints for detailed usage instructions and optional parameters. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -39,6 +39,7 @@ class EnterpriseAgentUnitsByTestOwnerAccountGroup(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -49,7 +50,7 @@ class EnterpriseAgentUnitsByTestOwnerAccountGroup(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/enterprise_agents.py b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/enterprise_agents.py index 713f4200..d5e9d0e8 100644 --- a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/enterprise_agents.py +++ b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/enterprise_agents.py @@ -5,7 +5,7 @@ These usage endpoints define the following operations: * **Usage**: Retrieve usage data for the specified time period (default is one month). * Users must have the `View Billing` permission to access this endpoint. * This endpoint offers visibility across all account groups within the organization. * Users with `View Billing` permission in multiple organizations should query the endpoint with the `aid` query string parameter (see optional parameters) for each organization. * **Quotas**: Obtain organization and account usage quotas. Additionally, users with the appropriate permissions can create, update, or delete these quotas. * Users must have the necessary permissions to perform quota-related actions. Refer to the Usage API endpoints for detailed usage instructions and optional parameters. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class EnterpriseAgents(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class EnterpriseAgents(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/enterprise_agents_usage.py b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/enterprise_agents_usage.py index 1a63573a..ca718290 100644 --- a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/enterprise_agents_usage.py +++ b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/enterprise_agents_usage.py @@ -5,7 +5,7 @@ These usage endpoints define the following operations: * **Usage**: Retrieve usage data for the specified time period (default is one month). * Users must have the `View Billing` permission to access this endpoint. * This endpoint offers visibility across all account groups within the organization. * Users with `View Billing` permission in multiple organizations should query the endpoint with the `aid` query string parameter (see optional parameters) for each organization. * **Quotas**: Obtain organization and account usage quotas. Additionally, users with the appropriate permissions can create, update, or delete these quotas. * Users must have the necessary permissions to perform quota-related actions. Refer to the Usage API endpoints for detailed usage instructions and optional parameters. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class EnterpriseAgentsUsage(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class EnterpriseAgentsUsage(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/error.py b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/error.py index 117e7755..2eb68972 100644 --- a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/error.py +++ b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/error.py @@ -5,7 +5,7 @@ These usage endpoints define the following operations: * **Usage**: Retrieve usage data for the specified time period (default is one month). * Users must have the `View Billing` permission to access this endpoint. * This endpoint offers visibility across all account groups within the organization. * Users with `View Billing` permission in multiple organizations should query the endpoint with the `aid` query string parameter (see optional parameters) for each organization. * **Quotas**: Obtain organization and account usage quotas. Additionally, users with the appropriate permissions can create, update, or delete these quotas. * Users must have the necessary permissions to perform quota-related actions. Refer to the Usage API endpoints for detailed usage instructions and optional parameters. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -37,6 +37,7 @@ class Error(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -47,7 +48,7 @@ class Error(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/expand.py b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/expand.py index fcdb356e..39520901 100644 --- a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/expand.py +++ b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/expand.py @@ -5,7 +5,7 @@ These usage endpoints define the following operations: * **Usage**: Retrieve usage data for the specified time period (default is one month). * Users must have the `View Billing` permission to access this endpoint. * This endpoint offers visibility across all account groups within the organization. * Users with `View Billing` permission in multiple organizations should query the endpoint with the `aid` query string parameter (see optional parameters) for each organization. * **Quotas**: Obtain organization and account usage quotas. Additionally, users with the appropriate permissions can create, update, or delete these quotas. * Users must have the necessary permissions to perform quota-related actions. Refer to the Usage API endpoints for detailed usage instructions and optional parameters. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/link.py b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/link.py index 9fd014c6..e76a9f9a 100644 --- a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/link.py +++ b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/link.py @@ -5,7 +5,7 @@ These usage endpoints define the following operations: * **Usage**: Retrieve usage data for the specified time period (default is one month). * Users must have the `View Billing` permission to access this endpoint. * This endpoint offers visibility across all account groups within the organization. * Users with `View Billing` permission in multiple organizations should query the endpoint with the `aid` query string parameter (see optional parameters) for each organization. * **Quotas**: Obtain organization and account usage quotas. Additionally, users with the appropriate permissions can create, update, or delete these quotas. * Users must have the necessary permissions to perform quota-related actions. Refer to the Usage API endpoints for detailed usage instructions and optional parameters. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -40,6 +40,7 @@ class Link(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -50,7 +51,7 @@ class Link(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/organization_quota.py b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/organization_quota.py index 1c605150..7f227452 100644 --- a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/organization_quota.py +++ b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/organization_quota.py @@ -5,7 +5,7 @@ These usage endpoints define the following operations: * **Usage**: Retrieve usage data for the specified time period (default is one month). * Users must have the `View Billing` permission to access this endpoint. * This endpoint offers visibility across all account groups within the organization. * Users with `View Billing` permission in multiple organizations should query the endpoint with the `aid` query string parameter (see optional parameters) for each organization. * **Quotas**: Obtain organization and account usage quotas. Additionally, users with the appropriate permissions can create, update, or delete these quotas. * Users must have the necessary permissions to perform quota-related actions. Refer to the Usage API endpoints for detailed usage instructions and optional parameters. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class OrganizationQuota(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class OrganizationQuota(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/organization_quota_assignment.py b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/organization_quota_assignment.py index 8c0fde8f..e3e2cc85 100644 --- a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/organization_quota_assignment.py +++ b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/organization_quota_assignment.py @@ -5,7 +5,7 @@ These usage endpoints define the following operations: * **Usage**: Retrieve usage data for the specified time period (default is one month). * Users must have the `View Billing` permission to access this endpoint. * This endpoint offers visibility across all account groups within the organization. * Users with `View Billing` permission in multiple organizations should query the endpoint with the `aid` query string parameter (see optional parameters) for each organization. * **Quotas**: Obtain organization and account usage quotas. Additionally, users with the appropriate permissions can create, update, or delete these quotas. * Users must have the necessary permissions to perform quota-related actions. Refer to the Usage API endpoints for detailed usage instructions and optional parameters. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,7 @@ class OrganizationQuotaAssignment(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class OrganizationQuotaAssignment(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/organization_quota_unassignment.py b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/organization_quota_unassignment.py index 14838b5e..9f54da6f 100644 --- a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/organization_quota_unassignment.py +++ b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/organization_quota_unassignment.py @@ -5,7 +5,7 @@ These usage endpoints define the following operations: * **Usage**: Retrieve usage data for the specified time period (default is one month). * Users must have the `View Billing` permission to access this endpoint. * This endpoint offers visibility across all account groups within the organization. * Users with `View Billing` permission in multiple organizations should query the endpoint with the `aid` query string parameter (see optional parameters) for each organization. * **Quotas**: Obtain organization and account usage quotas. Additionally, users with the appropriate permissions can create, update, or delete these quotas. * Users must have the necessary permissions to perform quota-related actions. Refer to the Usage API endpoints for detailed usage instructions and optional parameters. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class OrganizationQuotaUnassignment(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class OrganizationQuotaUnassignment(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/organizations_quotas_assign.py b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/organizations_quotas_assign.py index bbfcdf71..ba898811 100644 --- a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/organizations_quotas_assign.py +++ b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/organizations_quotas_assign.py @@ -5,7 +5,7 @@ These usage endpoints define the following operations: * **Usage**: Retrieve usage data for the specified time period (default is one month). * Users must have the `View Billing` permission to access this endpoint. * This endpoint offers visibility across all account groups within the organization. * Users with `View Billing` permission in multiple organizations should query the endpoint with the `aid` query string parameter (see optional parameters) for each organization. * **Quotas**: Obtain organization and account usage quotas. Additionally, users with the appropriate permissions can create, update, or delete these quotas. * Users must have the necessary permissions to perform quota-related actions. Refer to the Usage API endpoints for detailed usage instructions and optional parameters. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class OrganizationsQuotasAssign(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class OrganizationsQuotasAssign(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/organizations_quotas_unassign.py b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/organizations_quotas_unassign.py index 1e61fba1..74f91d94 100644 --- a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/organizations_quotas_unassign.py +++ b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/organizations_quotas_unassign.py @@ -5,7 +5,7 @@ These usage endpoints define the following operations: * **Usage**: Retrieve usage data for the specified time period (default is one month). * Users must have the `View Billing` permission to access this endpoint. * This endpoint offers visibility across all account groups within the organization. * Users with `View Billing` permission in multiple organizations should query the endpoint with the `aid` query string parameter (see optional parameters) for each organization. * **Quotas**: Obtain organization and account usage quotas. Additionally, users with the appropriate permissions can create, update, or delete these quotas. * Users must have the necessary permissions to perform quota-related actions. Refer to the Usage API endpoints for detailed usage instructions and optional parameters. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class OrganizationsQuotasUnassign(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class OrganizationsQuotasUnassign(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/pagination_links.py b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/pagination_links.py index 2c4381c1..077b0f73 100644 --- a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/pagination_links.py +++ b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/pagination_links.py @@ -5,7 +5,7 @@ These usage endpoints define the following operations: * **Usage**: Retrieve usage data for the specified time period (default is one month). * Users must have the `View Billing` permission to access this endpoint. * This endpoint offers visibility across all account groups within the organization. * Users with `View Billing` permission in multiple organizations should query the endpoint with the `aid` query string parameter (see optional parameters) for each organization. * **Quotas**: Obtain organization and account usage quotas. Additionally, users with the appropriate permissions can create, update, or delete these quotas. * Users must have the necessary permissions to perform quota-related actions. Refer to the Usage API endpoints for detailed usage instructions and optional parameters. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class PaginationLinks(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class PaginationLinks(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/quota.py b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/quota.py index d255f664..38c58114 100644 --- a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/quota.py +++ b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/quota.py @@ -5,7 +5,7 @@ These usage endpoints define the following operations: * **Usage**: Retrieve usage data for the specified time period (default is one month). * Users must have the `View Billing` permission to access this endpoint. * This endpoint offers visibility across all account groups within the organization. * Users with `View Billing` permission in multiple organizations should query the endpoint with the `aid` query string parameter (see optional parameters) for each organization. * **Quotas**: Obtain organization and account usage quotas. Additionally, users with the appropriate permissions can create, update, or delete these quotas. * Users must have the necessary permissions to perform quota-related actions. Refer to the Usage API endpoints for detailed usage instructions and optional parameters. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class Quota(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class Quota(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/quotas.py b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/quotas.py index c8c7bbd0..229d88ce 100644 --- a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/quotas.py +++ b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/quotas.py @@ -5,7 +5,7 @@ These usage endpoints define the following operations: * **Usage**: Retrieve usage data for the specified time period (default is one month). * Users must have the `View Billing` permission to access this endpoint. * This endpoint offers visibility across all account groups within the organization. * Users with `View Billing` permission in multiple organizations should query the endpoint with the `aid` query string parameter (see optional parameters) for each organization. * **Quotas**: Obtain organization and account usage quotas. Additionally, users with the appropriate permissions can create, update, or delete these quotas. * Users must have the necessary permissions to perform quota-related actions. Refer to the Usage API endpoints for detailed usage instructions and optional parameters. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class Quotas(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class Quotas(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/quotas_assign_request.py b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/quotas_assign_request.py index 9d864719..47557be8 100644 --- a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/quotas_assign_request.py +++ b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/quotas_assign_request.py @@ -5,7 +5,7 @@ These usage endpoints define the following operations: * **Usage**: Retrieve usage data for the specified time period (default is one month). * Users must have the `View Billing` permission to access this endpoint. * This endpoint offers visibility across all account groups within the organization. * Users with `View Billing` permission in multiple organizations should query the endpoint with the `aid` query string parameter (see optional parameters) for each organization. * **Quotas**: Obtain organization and account usage quotas. Additionally, users with the appropriate permissions can create, update, or delete these quotas. * Users must have the necessary permissions to perform quota-related actions. Refer to the Usage API endpoints for detailed usage instructions and optional parameters. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class QuotasAssignRequest(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class QuotasAssignRequest(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/quotas_assign_response.py b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/quotas_assign_response.py index 2490ea8c..29c68f10 100644 --- a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/quotas_assign_response.py +++ b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/quotas_assign_response.py @@ -5,7 +5,7 @@ These usage endpoints define the following operations: * **Usage**: Retrieve usage data for the specified time period (default is one month). * Users must have the `View Billing` permission to access this endpoint. * This endpoint offers visibility across all account groups within the organization. * Users with `View Billing` permission in multiple organizations should query the endpoint with the `aid` query string parameter (see optional parameters) for each organization. * **Quotas**: Obtain organization and account usage quotas. Additionally, users with the appropriate permissions can create, update, or delete these quotas. * Users must have the necessary permissions to perform quota-related actions. Refer to the Usage API endpoints for detailed usage instructions and optional parameters. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class QuotasAssignResponse(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class QuotasAssignResponse(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/quotas_unassign.py b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/quotas_unassign.py index 24eaa7ad..6cfc28b8 100644 --- a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/quotas_unassign.py +++ b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/quotas_unassign.py @@ -5,7 +5,7 @@ These usage endpoints define the following operations: * **Usage**: Retrieve usage data for the specified time period (default is one month). * Users must have the `View Billing` permission to access this endpoint. * This endpoint offers visibility across all account groups within the organization. * Users with `View Billing` permission in multiple organizations should query the endpoint with the `aid` query string parameter (see optional parameters) for each organization. * **Quotas**: Obtain organization and account usage quotas. Additionally, users with the appropriate permissions can create, update, or delete these quotas. * Users must have the necessary permissions to perform quota-related actions. Refer to the Usage API endpoints for detailed usage instructions and optional parameters. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -33,6 +33,7 @@ class QuotasUnassign(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -43,7 +44,7 @@ class QuotasUnassign(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/self_links.py b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/self_links.py index ba1cc403..f6c5b9ec 100644 --- a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/self_links.py +++ b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/self_links.py @@ -5,7 +5,7 @@ These usage endpoints define the following operations: * **Usage**: Retrieve usage data for the specified time period (default is one month). * Users must have the `View Billing` permission to access this endpoint. * This endpoint offers visibility across all account groups within the organization. * Users with `View Billing` permission in multiple organizations should query the endpoint with the `aid` query string parameter (see optional parameters) for each organization. * **Quotas**: Obtain organization and account usage quotas. Additionally, users with the appropriate permissions can create, update, or delete these quotas. * Users must have the necessary permissions to perform quota-related actions. Refer to the Usage API endpoints for detailed usage instructions and optional parameters. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class SelfLinks(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class SelfLinks(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/tests.py b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/tests.py index 1f477d7f..d2546337 100644 --- a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/tests.py +++ b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/tests.py @@ -5,7 +5,7 @@ These usage endpoints define the following operations: * **Usage**: Retrieve usage data for the specified time period (default is one month). * Users must have the `View Billing` permission to access this endpoint. * This endpoint offers visibility across all account groups within the organization. * Users with `View Billing` permission in multiple organizations should query the endpoint with the `aid` query string parameter (see optional parameters) for each organization. * **Quotas**: Obtain organization and account usage quotas. Additionally, users with the appropriate permissions can create, update, or delete these quotas. * Users must have the necessary permissions to perform quota-related actions. Refer to the Usage API endpoints for detailed usage instructions and optional parameters. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -39,6 +39,7 @@ class Tests(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -49,7 +50,7 @@ class Tests(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/tests_usage.py b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/tests_usage.py index a6810c19..6303da20 100644 --- a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/tests_usage.py +++ b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/tests_usage.py @@ -5,7 +5,7 @@ These usage endpoints define the following operations: * **Usage**: Retrieve usage data for the specified time period (default is one month). * Users must have the `View Billing` permission to access this endpoint. * This endpoint offers visibility across all account groups within the organization. * Users with `View Billing` permission in multiple organizations should query the endpoint with the `aid` query string parameter (see optional parameters) for each organization. * **Quotas**: Obtain organization and account usage quotas. Additionally, users with the appropriate permissions can create, update, or delete these quotas. * Users must have the necessary permissions to perform quota-related actions. Refer to the Usage API endpoints for detailed usage instructions and optional parameters. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class TestsUsage(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class TestsUsage(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/unauthorized_error.py b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/unauthorized_error.py index 28a897e1..d79d4e9d 100644 --- a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/unauthorized_error.py +++ b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/unauthorized_error.py @@ -5,7 +5,7 @@ These usage endpoints define the following operations: * **Usage**: Retrieve usage data for the specified time period (default is one month). * Users must have the `View Billing` permission to access this endpoint. * This endpoint offers visibility across all account groups within the organization. * Users with `View Billing` permission in multiple organizations should query the endpoint with the `aid` query string parameter (see optional parameters) for each organization. * **Quotas**: Obtain organization and account usage quotas. Additionally, users with the appropriate permissions can create, update, or delete these quotas. * Users must have the necessary permissions to perform quota-related actions. Refer to the Usage API endpoints for detailed usage instructions and optional parameters. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -34,6 +34,7 @@ class UnauthorizedError(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -44,7 +45,7 @@ class UnauthorizedError(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/units_by_tests.py b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/units_by_tests.py index 6fe7e912..2ecc53da 100644 --- a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/units_by_tests.py +++ b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/units_by_tests.py @@ -5,7 +5,7 @@ These usage endpoints define the following operations: * **Usage**: Retrieve usage data for the specified time period (default is one month). * Users must have the `View Billing` permission to access this endpoint. * This endpoint offers visibility across all account groups within the organization. * Users with `View Billing` permission in multiple organizations should query the endpoint with the `aid` query string parameter (see optional parameters) for each organization. * **Quotas**: Obtain organization and account usage quotas. Additionally, users with the appropriate permissions can create, update, or delete these quotas. * Users must have the necessary permissions to perform quota-related actions. Refer to the Usage API endpoints for detailed usage instructions and optional parameters. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -42,6 +42,7 @@ class UnitsByTests(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -52,7 +53,7 @@ class UnitsByTests(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/usage.py b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/usage.py index bc198170..49cdc4bf 100644 --- a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/usage.py +++ b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/usage.py @@ -5,7 +5,7 @@ These usage endpoints define the following operations: * **Usage**: Retrieve usage data for the specified time period (default is one month). * Users must have the `View Billing` permission to access this endpoint. * This endpoint offers visibility across all account groups within the organization. * Users with `View Billing` permission in multiple organizations should query the endpoint with the `aid` query string parameter (see optional parameters) for each organization. * **Quotas**: Obtain organization and account usage quotas. Additionally, users with the appropriate permissions can create, update, or delete these quotas. * Users must have the necessary permissions to perform quota-related actions. Refer to the Usage API endpoints for detailed usage instructions and optional parameters. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -36,6 +36,7 @@ class Usage(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -46,7 +47,7 @@ class Usage(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/usage_details.py b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/usage_details.py index 0fdcba3f..1f314e1a 100644 --- a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/usage_details.py +++ b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/usage_details.py @@ -5,7 +5,7 @@ These usage endpoints define the following operations: * **Usage**: Retrieve usage data for the specified time period (default is one month). * Users must have the `View Billing` permission to access this endpoint. * This endpoint offers visibility across all account groups within the organization. * Users with `View Billing` permission in multiple organizations should query the endpoint with the `aid` query string parameter (see optional parameters) for each organization. * **Quotas**: Obtain organization and account usage quotas. Additionally, users with the appropriate permissions can create, update, or delete these quotas. * Users must have the necessary permissions to perform quota-related actions. Refer to the Usage API endpoints for detailed usage instructions and optional parameters. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -56,6 +56,7 @@ class UsageDetails(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -66,7 +67,7 @@ class UsageDetails(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/usage_quota.py b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/usage_quota.py index 57573872..12a48c38 100644 --- a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/usage_quota.py +++ b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/usage_quota.py @@ -5,7 +5,7 @@ These usage endpoints define the following operations: * **Usage**: Retrieve usage data for the specified time period (default is one month). * Users must have the `View Billing` permission to access this endpoint. * This endpoint offers visibility across all account groups within the organization. * Users with `View Billing` permission in multiple organizations should query the endpoint with the `aid` query string parameter (see optional parameters) for each organization. * **Quotas**: Obtain organization and account usage quotas. Additionally, users with the appropriate permissions can create, update, or delete these quotas. * Users must have the necessary permissions to perform quota-related actions. Refer to the Usage API endpoints for detailed usage instructions and optional parameters. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -40,6 +40,7 @@ class UsageQuota(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -50,7 +51,7 @@ class UsageQuota(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/validation_error.py b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/validation_error.py index 67737e6d..b915585c 100644 --- a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/validation_error.py +++ b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/validation_error.py @@ -5,7 +5,7 @@ These usage endpoints define the following operations: * **Usage**: Retrieve usage data for the specified time period (default is one month). * Users must have the `View Billing` permission to access this endpoint. * This endpoint offers visibility across all account groups within the organization. * Users with `View Billing` permission in multiple organizations should query the endpoint with the `aid` query string parameter (see optional parameters) for each organization. * **Quotas**: Obtain organization and account usage quotas. Additionally, users with the appropriate permissions can create, update, or delete these quotas. * Users must have the necessary permissions to perform quota-related actions. Refer to the Usage API endpoints for detailed usage instructions and optional parameters. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -39,6 +39,7 @@ class ValidationError(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -49,7 +50,7 @@ class ValidationError(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/validation_error_item.py b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/validation_error_item.py index d9e389fd..13fffb48 100644 --- a/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/validation_error_item.py +++ b/thousandeyes-sdk-usage/src/thousandeyes_sdk/usage/models/validation_error_item.py @@ -5,7 +5,7 @@ These usage endpoints define the following operations: * **Usage**: Retrieve usage data for the specified time period (default is one month). * Users must have the `View Billing` permission to access this endpoint. * This endpoint offers visibility across all account groups within the organization. * Users with `View Billing` permission in multiple organizations should query the endpoint with the `aid` query string parameter (see optional parameters) for each organization. * **Quotas**: Obtain organization and account usage quotas. Additionally, users with the appropriate permissions can create, update, or delete these quotas. * Users must have the necessary permissions to perform quota-related actions. Refer to the Usage API endpoints for detailed usage instructions and optional parameters. - The version of the OpenAPI document: 7.0.4 + The version of the OpenAPI document: 7.0.6 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -17,7 +17,7 @@ import pprint import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +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 @@ -27,7 +27,7 @@ class ValidationErrorItem(BaseModel): ValidationErrorItem """ # noqa: E501 code: Optional[StrictStr] = Field(default=None, description="(Optional) A unique error type/code that can be referenced in the documentation for further details.") - var_field: Optional[StrictInt] = Field(default=None, description="Identifies the field that triggered this particular error.", alias="field") + var_field: Optional[StrictStr] = Field(default=None, description="Identifies the field that triggered this particular error.", alias="field") message: Optional[StrictStr] = Field(default=None, description="A short, human-readable summary of the error.") __properties: ClassVar[List[str]] = ["code", "field", "message"] @@ -35,6 +35,7 @@ class ValidationErrorItem(BaseModel): populate_by_name=True, validate_assignment=True, protected_namespaces=(), + extra="allow", ) @@ -45,7 +46,7 @@ class ValidationErrorItem(BaseModel): 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 json.dumps(self.to_dict()) + return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True) @classmethod def from_json(cls, json_str: str) -> Optional[Self]: diff --git a/thousandeyes-sdk-usage/test/test_quotas_api.py b/thousandeyes-sdk-usage/test/test_quotas_api.py new file mode 100644 index 00000000..8cc465f6 --- /dev/null +++ b/thousandeyes-sdk-usage/test/test_quotas_api.py @@ -0,0 +1,199 @@ +# coding: utf-8 + +""" + Usage API + + These usage endpoints define the following operations: * **Usage**: Retrieve usage data for the specified time period (default is one month). * Users must have the `View Billing` permission to access this endpoint. * This endpoint offers visibility across all account groups within the organization. * Users with `View Billing` permission in multiple organizations should query the endpoint with the `aid` query string parameter (see optional parameters) for each organization. * **Quotas**: Obtain organization and account usage quotas. Additionally, users with the appropriate permissions can create, update, or delete these quotas. * Users must have the necessary permissions to perform quota-related actions. Refer to the Usage API endpoints for detailed usage instructions and optional parameters. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.usage.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.usage.api.quotas_api import QuotasApi + + +class TestQuotasApi(unittest.TestCase): + """QuotasApi unit test stubs""" + + def setUp(self) -> None: + self.api = QuotasApi() + + def tearDown(self) -> None: + pass + + def test_assign_organizations_account_groups_quotas_models_validation(self) -> None: + """Test case for assign_organizations_account_groups_quotas request and response models""" + request_body_json = """ + { + "organizations" : [ { + "orgId" : "1234", + "accountGroups" : [ { + "value" : 12000, + "aid" : "1234" + }, { + "value" : 12000, + "aid" : "1234" + } ] + }, { + "orgId" : "1234", + "accountGroups" : [ { + "value" : 12000, + "aid" : "1234" + }, { + "value" : 12000, + "aid" : "1234" + } ] + } ] + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.usage.models.OrganizationsQuotasAssign.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "organizations" : [ { + "orgId" : "1234", + "accountGroups" : [ { + "value" : 12000, + "aid" : "1234" + }, { + "value" : 12000, + "aid" : "1234" + } ] + }, { + "orgId" : "1234", + "accountGroups" : [ { + "value" : 12000, + "aid" : "1234" + }, { + "value" : 12000, + "aid" : "1234" + } ] + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.usage.models.OrganizationsQuotasAssign.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_assign_organizations_quotas_models_validation(self) -> None: + """Test case for assign_organizations_quotas request and response models""" + request_body_json = """ + { + "organizations" : [ { + "value" : 12000 + }, { + "orgId" : "1234", + "value" : 10000 + } ] + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.usage.models.QuotasAssignRequest.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + response_body_json = """ + { + "organizations" : [ { + "orgId" : "1234", + "value" : 12000 + }, { + "orgId" : "12345", + "value" : 10000 + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.usage.models.QuotasAssignResponse.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_quotas_models_validation(self) -> None: + """Test case for get_quotas request and response models""" + + response_body_json = """ + { + "quotas" : [ { + "accountGroupQuotas" : [ { + "value" : 12000, + "aid" : "1234" + }, { + "value" : 10000, + "aid" : "12345" + } ], + "organizationQuota" : { + "value" : 22500, + "orgId" : "10" + } + }, { + "accountGroupQuotas" : [ { + "value" : 12000, + "aid" : "1234" + }, { + "value" : 10000, + "aid" : "12345" + } ], + "organizationQuota" : { + "value" : 22500, + "orgId" : "10" + } + } ], + "_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" + } + } + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.usage.models.Quotas.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_unassign_organizations_account_groups_quotas_models_validation(self) -> None: + """Test case for unassign_organizations_account_groups_quotas request and response models""" + request_body_json = """ + { + "organizations" : [ { + "orgId" : "1234", + "accountGroups" : [ "1234", "12345" ] + }, { + "orgId" : "1234", + "accountGroups" : [ "1234", "12345" ] + } ] + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.usage.models.OrganizationsQuotasUnassign.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + + def test_unassign_organizations_quotas_models_validation(self) -> None: + """Test case for unassign_organizations_quotas request and response models""" + request_body_json = """ + { + "organizations" : [ "1234", "12345" ] + }""" + + request_loaded_json = json.loads(request_body_json) + request_from_json = thousandeyes_sdk.usage.models.QuotasUnassign.from_json(request_body_json) + assert_constructed_model_matches_example_json(request_from_json, request_loaded_json) + + + +if __name__ == '__main__': + unittest.main() diff --git a/thousandeyes-sdk-usage/test/test_usage_api.py b/thousandeyes-sdk-usage/test/test_usage_api.py new file mode 100644 index 00000000..89a947d5 --- /dev/null +++ b/thousandeyes-sdk-usage/test/test_usage_api.py @@ -0,0 +1,272 @@ +# coding: utf-8 + +""" + Usage API + + These usage endpoints define the following operations: * **Usage**: Retrieve usage data for the specified time period (default is one month). * Users must have the `View Billing` permission to access this endpoint. * This endpoint offers visibility across all account groups within the organization. * Users with `View Billing` permission in multiple organizations should query the endpoint with the `aid` query string parameter (see optional parameters) for each organization. * **Quotas**: Obtain organization and account usage quotas. Additionally, users with the appropriate permissions can create, update, or delete these quotas. * Users must have the necessary permissions to perform quota-related actions. Refer to the Usage API endpoints for detailed usage instructions and optional parameters. + + The version of the OpenAPI document: 7.0.6 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import json +import unittest +import thousandeyes_sdk.usage.models + +from .test_utils import assert_constructed_model_matches_example_json +from thousandeyes_sdk.usage.api.usage_api import UsageApi + + +class TestUsageApi(unittest.TestCase): + """UsageApi unit test stubs""" + + def setUp(self) -> None: + self.api = UsageApi() + + def tearDown(self) -> None: + pass + + def test_get_enterprise_agents_units_usage_models_validation(self) -> None: + """Test case for get_enterprise_agents_units_usage request and response models""" + + response_body_json = """ + { + "_links" : { + "next" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + }, + "previous" : { + "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" + } + }, + "breakdowns" : [ { + "aid" : "1234", + "agentId" : "121404", + "accountGroupName" : "Support", + "agentName" : "TEVA-test-agent", + "enterpriseUnitsUsed" : 599878, + "enterpriseUnitsProjected" : 597808, + "vagentId" : "123456" + }, { + "aid" : "315", + "agentId" : "121404", + "accountGroupName" : "Documentation", + "agentName" : "lab-physical-appliance-1", + "enterpriseUnitsUsed" : 597123, + "enterpriseUnitsProjected" : 597808, + "vagentId" : "789" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.usage.models.EnterpriseAgentsUsage.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_tests_units_usage_models_validation(self) -> None: + """Test case for get_tests_units_usage request and response models""" + + response_body_json = """ + { + "_links" : { + "next" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + }, + "previous" : { + "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" + } + }, + "breakdowns" : [ { + "testId" : "1158", + "testName" : "https://app.thousandeyes.com", + "testType" : "Web-Page Load", + "enterpriseUnitsUsed" : 14050, + "enterpriseUnitsProjected" : 340674, + "cloudUnitsUsed" : 10000, + "cloudUnitsProjected" : 12000, + "aid" : "1234", + "accountGroupName" : "Support" + }, { + "testId" : "1221", + "testName" : "https://app.thousandeyes.com", + "testType" : "Web - HTTP Server", + "enterpriseUnitsUsed" : 194051, + "enterpriseUnitsProjected" : 30622, + "cloudUnitsUsed" : 12000, + "cloudUnitsProjected" : 13000, + "aid" : "1234", + "accountGroupName" : "Support" + } ] + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.usage.models.TestsUsage.from_json(response_body_json) + assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) + + def test_get_usage_models_validation(self) -> None: + """Test case for get_usage request and response models""" + + response_body_json = """ + { + "_links" : { + "self" : { + "hreflang" : "hreflang", + "templated" : true, + "profile" : "profile", + "name" : "name", + "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", + "type" : "type", + "deprecation" : "deprecation", + "title" : "title" + } + }, + "usage" : { + "cloudUnitsProjected" : 20993812, + "enterpriseAgentsUsed" : 58, + "endpointAgents" : [ { + "aid" : "1234", + "accountGroupName" : "Support", + "endpointAgentsUsed" : 22 + }, { + "aid" : "12345", + "accountGroupName" : "Documentation", + "endpointAgentsUsed" : 14 + } ], + "cloudUnitsNextBillingPeriod" : 25123456, + "enterpriseUnitsNextBillingPeriod" : 0, + "endpointAgentsUsed" : 42, + "enterpriseUnitsUsed" : 79640902, + "cloudUnitsUsed" : 8500489, + "tests" : [ { + "aid" : "1234", + "testId" : "1158", + "accountGroupName" : "Documentation", + "testName" : "https://app.thousandeyes.com", + "testType" : "Web-Page Load", + "cloudUnitsUsed" : 14050, + "cloudUnitsProjected" : 340674 + }, { + "aid" : "12345", + "testId" : "1159", + "accountGroupName" : "Documentation", + "testName" : "https://support.thousandeyes.com", + "testType" : "Web - HTTP Server", + "cloudUnitsUsed" : 64390, + "cloudUnitsProjected" : 164457 + } ], + "endpointAgentsEmbedded" : [ { + "aid" : "1234", + "accountGroupName" : "Support", + "endpointAgentsEmbeddedUsed" : 2 + }, { + "aid" : "12345", + "accountGroupName" : "Documentation", + "endpointAgentsEmbeddedUsed" : 3 + } ], + "endpointAgentsEssentialsUsed" : 5, + "quota" : { + "monthEnd" : "2020-02-05T08:00:00Z", + "endpointAgentsEmbeddedIncluded" : 10, + "enterpriseAgentsIncluded" : 25, + "monthStart" : "2020-01-05T08:00:00Z", + "cloudUnitsIncluded" : 4320000000, + "endpointAgentsIncluded" : 200, + "endpointAgentsEssentialsIncluded" : 10 + }, + "enterpriseUnitsProjected" : 108016317, + "endpointAgentsEmbeddedUsed" : 5, + "enterpriseAgents" : [ { + "aid" : "1234", + "accountGroupName" : "Support", + "enterpriseAgentsUsed" : 7 + }, { + "aid" : "12345", + "accountGroupName" : "Documentation", + "enterpriseAgentsUsed" : 1 + } ], + "enterpriseAgentUnits" : [ { + "aid" : "1234", + "agentId" : "121404", + "accountGroupName" : "Support", + "agentName" : "TEVA-test-agent", + "enterpriseUnitsUsed" : 599878, + "enterpriseUnitsProjected" : 597808, + "vagentId" : "123456" + }, { + "aid" : "315", + "agentId" : "121404", + "accountGroupName" : "Documentation", + "agentName" : "lab-physical-appliance-1", + "enterpriseUnitsUsed" : 597123, + "enterpriseUnitsProjected" : 597808, + "vagentId" : "789" + } ], + "endpointAgentsEssentials" : [ { + "aid" : "1234", + "accountGroupName" : "Support", + "endpointAgentsEssentialsUsed" : 2 + }, { + "aid" : "12345", + "accountGroupName" : "Documentation", + "endpointAgentsEssentialsUsed" : 3 + } ] + } + }""" + + response_loaded_json = json.loads(response_body_json) + response_from_json = thousandeyes_sdk.usage.models.Usage.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-usage/test/test_utils.py b/thousandeyes-sdk-usage/test/test_utils.py new file mode 100644 index 00000000..930528d9 --- /dev/null +++ b/thousandeyes-sdk-usage/test/test_utils.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +import json +import unittest + +from pydantic import BaseModel + + +def assert_constructed_model_matches_example_json(model: BaseModel, loaded_json: dict): + test_case = unittest.TestCase() + test_case.maxDiff = None + test_case.assertIsNotNone(model) + constructed_json = json.loads(model.to_json()) + sorted_loaded_json = json.dumps(loaded_json, sort_keys=True) + sorted_constructed_json = json.dumps(constructed_json, sort_keys=True) + test_case.assertEqual(sorted_loaded_json, sorted_constructed_json)